new labels
Opened this issue · 4 comments
GT[GT!=255]=0 in create_labels.py practically makes all pixels with value 0 which is weird
Yeah you are right. Any leads on solving the matter so far? I didn't run create_labels.py to generate enhanced labels for training. Instead I trained with the ground-truth labels of PASCAL-VOC dataset.
For me it happened because the labels from the dataset have their countours in a yellowish colour, not white.
By changing it to GT[GT!=220]=0, I now obtain only the contours.
Also added GT[GT==220]=255 to make them white.
Hope this helps!
GT [GT!= 220] = 0
GT [GT == 220] = 255
What do these two lines of code mean?
对我而言,发生这种情况是因为数据集中的标签的计数是淡黄色而不是白色。
通过将其更改为GT [GT!= 220] = 0,我现在仅获得轮廓。
还添加了GT [GT == 220] = 255使它们变为白色。
希望这可以帮助!
220 in my case was the intensity of the pixels of the contours.
Therefore, GT [GT!= 220] = 0 means 'make all that is not contour black' (pixel level = 0)
And GT [GT == 220] = 255 makes the contours truly white.