Closed waqarsqureshi closed 10 months ago
It is quite interesting. I was looking very closely at the masking label in the Idx images saved as 32bit images. I have 4 classes, background, road, sky, and sidewalk. 1,2,3, and 4. There were some border pixels between 1 and 3 that are marked as two. It could be some kind of interpolation or what? anyhow if this is a bug it has ruined the labeling i have done.
I further investigated the segmentation json file I see the polygon are saved as follows:
{"x":720,"y":113.5}
i.e. the y axis is saved in as a sub-pixel value. how is it handled while conversion to labels. Is it possible that while exporting to trainlabelIdx.png. it takes an interpolated value and that is why it took the value to 2 for border between 1 and 3 in my case. It is not noticeable unless you try to force change the label to other index values through a script and you realized that there are some border pixels that have a different label value. I think this issue needs to be addressed.
It is quite interesting. I think it's the html - canvas
doing the trick. Maybe it isn't a good way to export by js
. I will test for it. Thanks for your comment~
See the above image. Where we have a boundary between two classes of white(sky) and black (background), it interpolates some pixel of gray class (road).
See the above image. Where we have a boundary between two classes of white(sky) and black (background), it interpolates some pixel of gray class (road).
Yeah, I get it too. I need time to solve it.
@Kerwin-L Thank you. I tried looking into the util functions. As you said, it is the problem mentioned above. I suggest. For export, try calling a python script and convert Json to png using mmcv library function, OpenCV, PIL or ski. nodejs is new for me. 👯
Yeah, I still haven't found way to solve it by js
. If you have finished coding it by Python
, welcome to give us PR~
What is the color of the border pixels and size? can we keep the border pixel color the same as the label color?