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

AssertionError: negative labels: #857

Closed
shliang0603 opened this issue Aug 27, 2020 · 10 comments
Closed

AssertionError: negative labels: #857

shliang0603 opened this issue Aug 27, 2020 · 10 comments
Labels

Comments

@shliang0603
Copy link

@glenn-jocher when I train my custom dataset in yolov5 v3.0, The following error occurred:

image

Can you give me some advice ?

@shliang0603 shliang0603 added the bug Something isn't working label Aug 27, 2020
@github-actions
Copy link
Contributor

github-actions bot commented Aug 27, 2020

Hello @shliang0603, thank you for your interest in our work! Please visit our Custom Training Tutorial to get started, and see our Jupyter Notebook Open In Colab, Docker Image, and Google Cloud Quickstart Guide for example environments.

If this is a bug report, please provide screenshots and minimum viable code to reproduce your issue, otherwise we can not help you.

If this is a custom model or data training question, please note Ultralytics does not provide free personal support. As a leader in vision ML and AI, we do offer professional consulting, from simple expert advice up to delivery of fully customized, end-to-end production solutions for our clients, such as:

  • Cloud-based AI systems operating on hundreds of HD video streams in realtime.
  • Edge AI integrated into custom iOS and Android apps for realtime 30 FPS video inference.
  • Custom data training, hyperparameter evolution, and model exportation to any destination.

For more information please visit https://www.ultralytics.com.

@Aktcob
Copy link

Aktcob commented Aug 27, 2020

This repo doesn't support ignore(negative label -1 means ignore) labels right now.

@shliang0603
Copy link
Author

@Aktcob Thanks for your reply, I don't quite understand what you mean by negative label. I annotate the data set using the Labelimg tool, but the other previously annotated data sets have no problem in training

010854.txt label info:

22 0.4216666666666667 0.33 -0.7366666666666667 0.35333333333333333
22 0.415 0.6283333333333333 -0.6966666666666667 0.33666666666666667

And the annotation image 010854.jpg is as follows:
image

@Aktcob
Copy link

Aktcob commented Aug 27, 2020

Sorry. I made a mistake.

The reason is -0.7366666666666667<0, the x1y1x2y2 should be in 0~1

@ChBrockmann
Copy link

@Aktcob You are basically correct, but I just want to tell you, that those are not x1y1x2y2 values. Those are numbers in the normalized xywh format.
Meaning: x_center y_center width height
For more Information you should check out: #12

@Aktcob
Copy link

Aktcob commented Aug 27, 2020

@ChBrockmann Danke~

@glenn-jocher
Copy link
Member

glenn-jocher commented Aug 27, 2020

@Aktcob I made a new graphic to explain the normalized xywh labels. All classes must be >=0, and all box coordinates must also be 1 >= x >= 0. Does this explain it better?

I'll update the custom training tutorials with this so it's less confusing.

zidane_anotated

@shliang0603
Copy link
Author

@Aktcob @glenn-jocher Thanks for your reply, I've got the problem.

@glenn-jocher glenn-jocher removed the bug Something isn't working label Aug 31, 2020
@sp7414
Copy link

sp7414 commented Sep 19, 2020

你好,我也遇到了和您一样的问题,同样报错AssertionError: negative labels: data/coco/labels/train2017/000016_4.txt,检查发现确实存在负值,请问您解决了这个问题吗?可以分享一下吗,谢谢

@github-actions
Copy link
Contributor

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

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

No branches or pull requests

5 participants