CVxTz / medical_image_segmentation

Medical image segmentation ( Eye vessel segmentation)
MIT License
128 stars 46 forks source link

Question about Train and Test Scripts #12

Closed mfaramarzi closed 3 years ago

mfaramarzi commented 3 years ago

Hello Youness,@CVxTz

Why don't we use mask when we are training (e.g. in baseline_aug.py) train_data = list(zip(sorted(glob('../input/DRIVE/training/images/*.tif')), sorted(glob('../input/DRIVE/training/1st_manual/*.gif'))))

and why do we use annotations when are predicting?(e.g. in baseline_aug_predict.py) val_data = list(zip(sorted(glob('../input/DRIVE/test/images/*.tif')), sorted(glob('../input/DRIVE/test/2nd_manual/*.gif')), sorted(glob('../input/DRIVE/test/mask/*.gif'))))

CVxTz commented 3 years ago

The mask is mostly useful to do a more accurate evaluation, we want to focus our evaluation metric on the central region of the image (where the vessels are) and ignore the corners that are all black.

mfaramarzi commented 3 years ago

, we want to focus our evaluation metric on the central region of the image (where the vessels are) and ignore the corners that are all black.

Thanks for prompt response. I understand, but actually my question is something else.

  1. Why did NOT we use a mask in training?
  2. Why did we use annotations in prediction? (in prediction shouldn't we only need image and mask?)
CVxTz commented 3 years ago
  1. We don't need accurate evaluation during training so we don't use the mask.
  2. The model only sees the input image, the annotation are only used for the evaluation ( done in the same prediction script)