rezazad68 / BCDU-Net

BCDU-Net : Medical Image Segmentation
719 stars 265 forks source link

Retina weights #28

Closed k-apos closed 3 years ago

k-apos commented 3 years ago

Hello sir,

Thank you very much for this great repository. I used pretrained models for DRIVE dataset but i received a wrong mask. I have done the image grayscale before input and then I take this result. Αm i doing something wrong? retina

Thank you in advance

rezazad68 commented 3 years ago

Thanks for your interest. Are you using patch-wise learning or a single image?

k-apos commented 3 years ago

Thanks for your interest. Are you using patch-wise learning or a single image?

I am testing a single image.

rezazad68 commented 3 years ago

You need to patch your image and then apply the model on patches. Please see the evaluation code to find out more details. The model trained using patches, thus, whole image performance should be weak.

k-apos commented 3 years ago

Thank you very much for the immediate response!

k-apos commented 3 years ago

When I run evaluate.py I exchange weight_lstm.hdf5 with pretrained weight_retina.hdf5 and I get this error:

Traceback (most recent call last): File "C:/Users/Asus/PycharmProjects/BCDU-Net-df7258bdfeab3a5258f1d6913182aaab4a0008be/Retina Blood Vessel Segmentation/evaluate.py", line 103, in model.load_weights("weight_retina.hdf5") File "C:\Users\Asus\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\keras\engine\training.py", line 2227, in load_weights with h5py.File(filepath, 'r') as f: File "C:\Users\Asus\AppData\Local\Programs\Python\Python37\lib\site-packages\h5py_hl\files.py", line 408, in init swmr=swmr) File "C:\Users\Asus\AppData\Local\Programs\Python\Python37\lib\site-packages\h5py_hl\files.py", line 173, in make_fid fid = h5f.open(name, flags, fapl=fapl) File "h5py_objects.pyx", line 54, in h5py._objects.with_phil.wrapper File "h5py_objects.pyx", line 55, in h5py._objects.with_phil.wrapper File "h5py\h5f.pyx", line 88, in h5py.h5f.open OSError: Unable to open file (unable to open file: name = 'weight_retina.hdf5', errno = 2, error message = 'No such file or directory', flags = 0, o_flags = 0)

rezazad68 commented 3 years ago

'No such file or directory' means that it did not find your weight file. Make sure about the path to weight file

k-apos commented 3 years ago

Thank you very much!!