zhixuhao / unet

unet for image segmentation
MIT License
4.6k stars 2k forks source link

Predictions contain a white rectangle in the middle while using my own data set #163

Open DavidTu21 opened 4 years ago

DavidTu21 commented 4 years ago

Hi there, I have had a problem while using the UNet, and I will really appreciate that if someone could help me with this.

I have 13000 images of skin cancer with black and white (binary mask) to train and contains 30 test images to be produced a binary mask.

However, I kept having this error message for each test image, but the prediction could still be produced.

data/membrane/test/ISIC_0000031_downsampled 30/30 [==============================] - 2s 70ms/step /apps/python/3.6.1/lib/python3.6/site-packages/skimage/util/dtype.py:122: UserWarning: Possible precision loss when converting from float32 to uint16 .format(dtypeobj_in, dtypeobj_out)) /apps/python/3.6.1/lib/python3.6/site-packages/skimage/transform/_warps.py:84: UserWarning: The default mode, 'constant', will be changed to 'reflect' in skimage 0.15. warn("The default mode, 'constant', will be changed to 'reflect' in " /apps/python/3.6.1/lib/python3.6/site-packages/skimage/util/dtype.py:122: UserWarning: Possible precision loss when converting from float32 to uint16 .format(dtypeobj_in, dtypeobj_out)) (1, 256, 256, 3)

And I am not too sure what I shall put into the 'aug' folder in the /data/membrane

DavidTu21 commented 4 years ago

https://imgur.com/a/tAjhcvB here is the result of my own prediction mask

tamaraalshekhli commented 4 years ago

Hi, I have the same warning massages, and my prediction is not correct also , instead of extracting road the model gave me a lot of rectangles spread in random way, I used different model designed for multi-output, and I have 1584 images in my test set the prediction is only for 1 image for each output, and there is another issue my target size is 224x224 the predicted images are on size 224x1584 foR each , I dont know what I'm missing, is there any luck in your case ?

edcaron commented 4 years ago

comment the line img = img / 255 on the testGenerator method of file data.py

tamaraalshekhli commented 4 years ago

@edcaron thank you for your comment, Ive tried your suggestion it didn't work for me