MaybeShewill-CV / bisenetv2-tensorflow

Unofficial tensorflow implementation of real-time scene image segmentation model "BiSeNet V2: Bilateral Network with Guided Aggregation for Real-time Semantic Segmentation"
https://maybeshewill-cv.github.io/bisenetv2-tensorflow/
MIT License
224 stars 59 forks source link

About train miou and val miou #27

Closed Flyzanetothesky closed 3 years ago

Flyzanetothesky commented 4 years ago

Hi @MaybeShewill-CV , I had been finished model-training, and evaluated my model on the whole cityscapes validation dataset used your train code and val code with no changes. But i have a problem why train miou only achieve 0.68 and val miou only achieve 0.53 in the training process, but when I evaluated my model the miou can achieve 71.3 ? Thanks

the image is train results:

Screenshot from 2020-09-23 19-42-58 this one is the results of evaluate on whole validation dataset: Screenshot from 2020-09-22 20-50-38

MaybeShewill-CV commented 4 years ago

@Flyzanetothesky During training process the iou was computed within a batch of data and no moving avg was applied here. During eval the miou was computed within the whole validation dataset:)

Flyzanetothesky commented 4 years ago

@MaybeShewill-CV yeah, I know, the batch size of evaluation is 4 and the val data be shuffled during training process. https://github.com/MaybeShewill-CV/bisenetv2-tensorflow/blob/c750f3247def2f0738ee9daec89d306317589b61/config/cityscapes/cityscapes_bisenetv2.yaml#L57

But the max train miou and val miou only achieve 0.68 and 0.53 respectively during my training process. In my past experience, generally, the train miou should larger than test miou(eval on whole dataset) , and eval miou should roughly equal to test miou. but why is the difference so big ??? the moving avg only can improve a little miou ......