bigmb / Unet-Segmentation-Pytorch-Nest-of-Unets

Implementation of different kinds of Unet Models for Image Segmentation - Unet , RCNN-Unet, Attention Unet, RCNN-Attention Unet, Nested Unet
MIT License
1.87k stars 345 forks source link

Data transformation #53

Closed muhammedcanpirincci-sudo closed 2 years ago

muhammedcanpirincci-sudo commented 2 years ago

Hello. Thanks for sharing this beautiful work. I am using this dataset: https://www.kaggle.com/c/carvana-image-masking-challenge When I delete cropping on transformation everything works great, but when I don't delete, predictions are being incredibly awful. So in each iteration, I am changing my Dataloader randomly (in epoch for-loop). The batch will either will consist of cropped or not chopped pictures. Is my approach correct? What am I doing wrong do you think my images that cropped are giving me terrible results?

bigmb commented 2 years ago

Thanks. By crop do you mean center crop? Also did you try visualize the images , which are cropped and uncrowded before sending them to training? If yes, can you share me the images?

muhammedcanpirincci-sudo commented 2 years ago

Yes center crop. These are the images that are NOT being transformed during the training phase: image

These are images that are being transformed during the training phase: image

I am changing dataset in each epoch for better training(in one epoch I am using a transformed batch in another not transformed. Here is my code: ALSO (just an also :) )please check it out to see if my approach for changing each dataset in batch is correct or not :) : https://www.codepile.net/pile/klwjbJEX).

bigmb commented 2 years ago

Ok. So you re using center crop in your transformation. What happens in center crop is that it chooses the center part only. You don't have to use it in your problem. I used it becuase my problem required it to concentrate only on the middle part of the image. Rest of the information was useless. Thats not the case in your images. Did you visualize the images with center crop? Try to check those images. Let me know if that's that's case after visualization of those center crop images.

muhammedcanpirincci-sudo commented 2 years ago

Thats exactly how i thought. Thank you so much. I solved problem in my mind thanks to you :)