Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi-class vs multi-label segmentation #40

Open
xoiga123 opened this issue Jun 22, 2022 · 1 comment
Open

Multi-class vs multi-label segmentation #40

xoiga123 opened this issue Jun 22, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@xoiga123
Copy link
Collaborator

xoiga123 commented Jun 22, 2022

#15 #38
We were using multi-label dataloader, loss and metrics for a multi-class problem. Basically they work fine and the results are correct (maybe focal loss segment is a little bit off, who knows, will check further) but to someone reading the code, the semantic meaning is wrong.

TODO: Generalize to multi-class as default, with a switch to multi-label.
TODO in another issue: Multi-label for object detection.

@datvuthanh datvuthanh added the bug Something isn't working label Jun 22, 2022
@xoiga123
Copy link
Collaborator Author

For multi-label object detection, we're waiting for a best practice from yolov5. Currently, their dataloader is like this:

The training labels go to something like that.
cls_1, x1, y1, w1, h1
cls_2, x1, y1, w1, h1
cls_3, x2, y2, w2, h2
cls_4, x2, y2, w2, h2

After squeezing, the labels go to
row_num1, x1, y1, w1, h1
row_num2, x2, y2, w2, h2
[row_num1] cls_1, cls_2
[row_num2] cls_3, cls_4

Personally, I do not like this approach. But again, the results say otherwise. So if it works, it works. Unless anyone's got a better implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants