philipperemy / yolo-9000

YOLO9000: Better, Faster, Stronger - Real-Time Object Detection. 9000 classes!
Apache License 2.0
1.18k stars 309 forks source link

How can I build a tree structure with this file 9k.tree? #19

Closed yaxiongchi closed 6 years ago

yaxiongchi commented 6 years ago

can somebody explain what is the structure of 9000 label tree? In the file 9k.tree, for example the n0000245 -1, n0566538625 4, what does the -1 and 4 mean? How can I build a tree structure with this file 9k.tree?

anphunl commented 6 years ago

-1 means the root of tree 4: the index of father node

philipperemy commented 6 years ago

@yaxiongchi does it answer your question?

Thanks @anphunl :)

yaxiongchi commented 6 years ago

sure,very clear,thanks

Send from my vivo smart phone

Philippe Rémy notifications@github.com wrote:

@yaxiongchi does it answer your question? Thanks @anphunl :) — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

foocp commented 5 years ago

I'd like to visualize the tree structure, and I don't get it (possibly because I am an artist). Why are there only two values in each line? The line number is important, too, right?

@anphunl @yaxiongchi @philipperemy

ghost commented 2 years ago

@anphunl I didn't understand your explanation at all. Can you show with a small example what that means?

kulkarnikeerti commented 1 year ago

@ghost I understand that -1 or 4 represents the parent node but what does n0000245 or n0566538625 represents here in the following case? n0000245 -1, n0566538625 4 @yaxiongchi

anphunl commented 1 year ago

@ghost @kulkarnikeerti From the file https://github.com/pjreddie/darknet/blob/1e729804f61c8627eb257fba8b83f74e04945db7/data/9k.tree

So:

n00002452... are the labels https://github.com/pjreddie/darknet/blob/1e729804f61c8627eb257fba8b83f74e04945db7/data/9k.labels Their names are in https://github.com/pjreddie/darknet/blob/1e729804f61c8627eb257fba8b83f74e04945db7/data/9k.names

n00002452 -1
n00020827 -1
n00002684 -1
n11425580 -1
n05220461 0
n09225146 0
n05538625 4
n01900150 4
n05225602 4
n05418717 8
n05302499 8
n05578095 8
n09475179 5
n09376198 5
n14877585 1
n15046900 1
n00019613 1
n00021265 1
n15067877 14
n09436708 14
n14915184 15
n07555863 15
kulkarnikeerti commented 1 year ago

@anphunl Thanks a lot for the great explanation. I just have few more quarries regarding the yolo9000 as I could not find more cleared answers anywhere. If you have more information it would be great if you can please answer them.

  1. So n00021265 represents label given to a particular object. Are these labels manually given or auto assigned when the tree is created?
  2. If it were generated along with the tree, how one can create such a tree for a custom data (again, I failed to find more information on this)?
  3. I know, that for any yolo model we will have an img and .txt file with bounding boxes and label_id as an input to model training. How one can use these hierarchical data as an input to the model training? Because, we have separate files for .names, .labels and .tree. I don't understand how the input is given to the model

I hope I am not disturbing you with so many silly questions. But, unfortunately I could not find more information on this. Thanks in advance.