lorenmt / reco

The implementation of "Bootstrapping Semantic Segmentation with Regional Contrast" [ICLR 2022].
https://shikun.io/projects/regional-contrast
Other
162 stars 25 forks source link

RandomCrop when testing? #10

Closed Haochen-Wang409 closed 2 years ago

Haochen-Wang409 commented 2 years ago

Hi, sorry to bother you again.

I found a little mistake in your code: https://github.com/lorenmt/reco/blob/main/build_data.py#L44 It seems that images and labels will be cropped randomly even if in the testing stage, which may lead to different results when evaluating different times with the same model.

lorenmt commented 2 years ago

Actually no.

You need to check here where the test dataset is defined: https://github.com/lorenmt/reco/blob/3e856a316cd082f2e84bd3972d5f6c5fe24254bd/build_data.py#L386-L388

You can see here the crop_size is defined to be the image_size. So there is no random cropping during the test stage.