ayooshkathuria / YOLO_v3_tutorial_from_scratch

Accompanying code for Paperspace tutorial series "How to Implement YOLO v3 Object Detector from Scratch"
https://blog.paperspace.com/how-to-implement-a-yolo-object-detector-in-pytorch/
2.32k stars 724 forks source link

Hierarchy YOLO #1

Closed Oktai15 closed 6 years ago

Oktai15 commented 6 years ago

Hi! Thanks for work!

Is it Hierarchy YOLO like in original paper?

ayooshkathuria commented 6 years ago

I don't quite understand what you mean by hierarchy YOLO. Could you please elaborate?

Edit: If you're talking about using a hierarchical softmax to perform multilabel classification, (combining the datasets), then no. I'd elaborate on the choice to do so if that is indeed what you mean by 'hierarchy`.

Oktai15 commented 6 years ago

@ayooshkathuria yes, I mean hierarchical softmax.

Actually, it's really essential thing! It would be cool, if you tried to implement it :)

ayooshkathuria commented 6 years ago

There are multiple reasons as to why I've left it out.

First, this is accompanying code for a tutorial. The tutorial was already too long (5 - sub-2000 word articles). Trying to squeeze in stuff such as hierarchical softmax would have made it too long. However, you can open an issue over at my other repo which contains the evolving code for the Pytorch detector (working on training the model right now) Here.

Second, the reason hierarchical softmax was introduced in YOLO v2 to come up with a problem of combining two datasets which have mutually inclusive classes like a dog and a terrier. In YOLO v3, this approach has been dropped for multi-label classification. This means, that scores are not softmaxed, (since classes are not mutually exclusive), but just run through a sigmoid, and the ones with a score of greater than a threshold, is chosen as a label.

I could implement this, but before that, you need to realize that the weightsfile that the author has made available is the one trained on COCO dataset, which doesn't have mutually inclusive classes, and thus no need for multilabel classification. I'm working on the training module, and then, if we could train it on a dataset with multilabel data, then I could think of implementing it.