nyukat / GMIC

An interpretable classifier for high-resolution breast cancer screening images utilizing weakly supervised localization
https://doi.org/10.1016/j.media.2020.101908
GNU Affero General Public License v3.0
168 stars 48 forks source link

Potential issue with dataloading flips #7

Closed meetps closed 4 years ago

meetps commented 4 years ago

Hi,

Thanks a lot for the nice codebase, I'm trying to run inference on my own dataset and I'm seeing poor performance. I see that in the run_model script, horizontal_flip is always set to false (a boolean) 1, but in flip_image it is checked against a string 2 ('YES' or 'NO') -- is this intended behaviour?

meetps commented 4 years ago

Hi @seyiqi

In training did you also use this transformations?

seyiqi commented 4 years ago

Hi @meetshah1995 ,

Thanks for pointing out the inconsistency for the flip code. In fact, all of the images in sample_data are already flipped. You can see this by observing that the images of the right breasts have the same orientations as those for the left breasts. So there shouldn't be any horizontal flipping necessary for these input images. But I certainly agree that setting them to 1 is not a good idea.

During training, we directly load the raw images, unlike those in sample_data which are flipped and cropped. Therefore, we used these transformation codes along with augmentation to preprocess each image on the fly.

Hope this helps :)

meetps commented 4 years ago

Thanks!

I clearly see this being an artifact left when porting internal training code to open-source version :-)

Thanks again for the explanation!