You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
notebook to simulate OD segmentation on DRIONS DB, It works perfectly fine when i use your pre-trained model from folder
05.03,02_40,U-Net light, on DRIONS-DB 256 px fold 0, SGD, high augm, CLAHE, log_dice loss
to segment images from your "DRIONS_DB.hdf5" But
When I load image from DRIONS db, and predict segmentation using the following code, then I see very bad segmentation.
img_path = 'E:/DRIONS/DRIONS-DB/images/image_001.jpg'
im = np.array(Image.open(img_path))
im = im[0:, 40:]
print(im.shape)
im = cv2.resize(im, (256,256))
print(im.shape)
plt.imshow(im), plt.show()
im = np.expand_dims(im, axis=0)
im = tf_to_th_encoding(im)
prediction = (model.predict(im)[0, 0]).astype(np.float64)
plt.imshow(prediction>0.5, cmap=plt.cm.Greys_r), plt.show()
So can you help me out in understanding why it is working when using an image from your DRIONS_DB.hdf5 file and why it is failing while processing a new image?
The text was updated successfully, but these errors were encountered:
@Mahanteshambi, big apologies for not noticing your request in time.
Actually you just needed to add one line which rescales an image from uint8 [0, 255] scale to float [0, 1] scale of intensities:
Also, it's necessary to add CLAHE im = skimage.exposure.equalize_adapthist(im) right after the rescaling line im = im.astype(np.float64) / 255.0 in order to reproduce exactly the same results, since model expects images only after CLAHE was performed on them.
I am using your
notebook to simulate OD segmentation on DRIONS DB, It works perfectly fine when i use your pre-trained model from folder
to segment images from your "DRIONS_DB.hdf5" But
When I load image from DRIONS db, and predict segmentation using the following code, then I see very bad segmentation.
So can you help me out in understanding why it is working when using an image from your DRIONS_DB.hdf5 file and why it is failing while processing a new image?
The text was updated successfully, but these errors were encountered: