GuoxiaWang / DOOBNet

Caffe implementation of DOOBNet https://arxiv.org/abs/1806.03772
MIT License
29 stars 11 forks source link

How to generate the oritentation label? #10

Open SonwYang opened 2 years ago

SonwYang commented 2 years ago

I'am intersted in your work and want to use this method in my customized dataset but I have no idea how to generate the oritentation label according to the edge label. Can you provide some details about it? Thank your, bro!

GuoxiaWang commented 2 years ago

@SonwYang Whether the edge label has orientation? If not, you can use my InstanceLabelTool to annotate the edge orientation.

Here is code to calculate edge orientations, https://github.com/GuoxiaWang/InstanceLabelTool/issues/1#issuecomment-483087983

SonwYang commented 2 years ago

The edge label is a binary map. Is there a way to convert the edge label to oritentation label?

GuoxiaWang commented 2 years ago

The edge label is a binary map. Is there a way to convert the edge label to oritentation label?

You can not convert directly the edge label to the orientation label.

You need to get the edge segment orientation. e.g

edge points: [[0, 0], [1, 0], [1, 1], [2, 1], [2, 2]] edge segment orientation is : [0, 0] -> [2, 2]

or

edge points: [[2, 2], [2, 1], [1, 1], [1, 0], [0, 0]] edge segment orientation is : [2, 2] -> [0, 0]

【By the ”left” rule, the left side of each arrow indicates the foreground.】in DOOBNet paper Fig.1.

SonwYang commented 2 years ago

It means that I can convert the polygon label into the oritentation label, is that right?

GuoxiaWang commented 2 years ago

It means that I can convert the polygon label into the oritentation label, is that right?

yes, but first you need to annotate the edge segment direction.