Open ymmm-4 opened 2 days ago
Hi, thank you for your comment.
As you can see in the data_loader.py file:
label_org = cv2.imread(self.labels[x], 0) if self.binary: label_org = np.where(label_org > 1, 0, label_org)
The masks are stored with [0, 1] values, where 0 represents the background, and 1 represents a placental vessel. These masks are not visible to the human eye.
To visualize the masks, you can use the code from the FetReg2021 challenge: https://github.com/sophiabano/EndoVis-FetReg2021/blob/master/Visualisation/Segmentation/fetreg2021_segmentation_vis.py, The colormap function should include only the background and vessels, as shown below:
def get_colormap(): """ Returns FetReg colormap """ colormap = np.asarray( [ [0, 0, 0], # 0 - background [255, 0, 0], # 1 - vessel ] ) return colormap
How to read labels? There are black images without masks.