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

yolov5 classification question, AssertionError: Label class 2.0 exceeds nc=2 in ./data/custom_data.yaml. Possible class labels are 0-1 #4370

Closed
HarveyWa opened this issue Aug 10, 2021 · 2 comments · Fixed by #4385
Labels
question Further information is requested

Comments

@HarveyWa
Copy link

❔Question

Additional context

Hello, I have limited label for 0 or 1 in all samples,but i still encounter this problem during training, could you help me?
assert mlc < nc, f'Label class {mlc} exceeds nc={nc} in {data}. Possible class labels are 0-{nc - 1}'
AssertionError: Label class 2.0 exceeds nc=2 in ./data/custom_data.yaml. Possible class labels are 0-1

@HarveyWa HarveyWa added the question Further information is requested label Aug 10, 2021
@wudashuo
Copy link
Contributor

As it said, you have label 2.0 in your label file.

@glenn-jocher
Copy link
Member

@HarveyWa the error message is self-explanatory

@glenn-jocher glenn-jocher linked a pull request Aug 11, 2021 that will close this issue
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

Successfully merging a pull request may close this issue.

3 participants