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

cls loss #13016

Open
1 task done
ChenJian7578 opened this issue May 16, 2024 · 1 comment
Open
1 task done

cls loss #13016

ChenJian7578 opened this issue May 16, 2024 · 1 comment
Labels
question Further information is requested

Comments

@ChenJian7578
Copy link

Search before asking

Question

i find the cls-loss in yolov5 is BCEcls, when the detection task nc > 1, whether it will result in no mutual exclusion between different categories

Additional

No response

@ChenJian7578 ChenJian7578 added the question Further information is requested label May 16, 2024
@glenn-jocher
Copy link
Member

Hello! Thanks for bringing up your question about the classification loss (cls-loss) used in YOLOv5.

Indeed, the classification loss in YOLOv5 is the Binary Cross-Entropy Loss (BCE). When dealing with multiple classes (nc > 1), BCE allows a model to predict each class label as independent probabilities; this means that each class is treated separately and there is no built-in mutual exclusiveness between classes in the loss itself.

However, the mutual exclusion you are referring to is typically managed by the architecture and post-processing steps, ensuring that only the most probable class label is selected for each detection. If strict mutual exclusivity is required during training, alterations to the loss function or additional mechanisms might be considered.

Hope that helps clarify your query! 🌟

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants