unet icon indicating copy to clipboard operation
unet copied to clipboard

How to test on JPG images?

Open mfaramarzi opened this issue 5 years ago • 6 comments

@sainatarajan @zhixuhao When I try to test on custom images with .jpg format I get the following error:

FileNotFoundError: [Errno 2] No such file or directory: 'data/PID/test/1.png'

How can I fix that? I tried changing "png" to "jpg" in the line 87, data.py but the same error happened again.

mfaramarzi avatar Jun 08 '20 12:06 mfaramarzi

Can you try deleting the __pycache__ folder in your directory and then run again?

sainatarajan avatar Jun 08 '20 13:06 sainatarajan

@sainatarajan It worked. Thanks

mfaramarzi avatar Jun 08 '20 13:06 mfaramarzi

@zhixuhao I am trying to use this trained model to detect crack on the road. However, when I test on 10 sample road images I get identical white output images for all those 10, like below:

9

9_predict

Do you think the problem is train and test datasets are very different or sth else? I have seen UNET trained on retinal images , could successfully detect road cracks as well

mfaramarzi avatar Jun 08 '20 13:06 mfaramarzi

It sounds interesting to me that a model trained on the retinal image dataset could detect road cracks. Can you give me more information? Was a transfer learning approach performed?

The reason why you're obtaining white images here is I think BatchNormalization() layers aren't added to this repo. I am also not sure whether it was updated or not. Maybe you could try my repo. I had made some changes regarding to BatchNormalization from this repo.

sainatarajan avatar Jun 08 '20 14:06 sainatarajan

@zhixuhao I am trying to use this trained model to detect crack on the road. However, when I test on 10 sample road images I get identical white output images for all those 10, like below:

9

9_predict

Do you think the problem is train and test datasets are very different or sth else? I have seen UNET trained on retinal images , could successfully detect road cracks as well

@zhixuhao WOULD YOU PLEASE HELP ME ON THIS? TNX

mfaramarzi avatar Jun 12 '20 15:06 mfaramarzi

Where can I find the test file? Why can't I find it? @mfaramarzi

happy20200 avatar Jun 17 '20 07:06 happy20200