cvat-ai / cvat

Annotate better with CVAT, the industry-leading data engine for machine learning. Used and trusted by teams at any scale, for data of any scale.
https://cvat.ai
MIT License
12.61k stars 3.01k forks source link

Incorrect Yolo label export #8291

Closed joeyhouser2 closed 2 months ago

joeyhouser2 commented 3 months ago

Actions before raising this issue

Steps to Reproduce

  1. Export task dataset
  2. Save images
  3. Label type as Yolo
  4. Download and extract
  5. All label files are correctly named, but their contents only contain a few of the bounding box coordinates (sometimes none) as opposed to 10-15 on every one of my images.

Expected Behavior

Yolo files are supposed to list the label number with 4 coordinates. I have 15 labels in each image so there should be 15 rows of data in each label file, but I am currently getting max ~3 and sometimes none in my exports on all of my task datasets.

Possible Solution

No response

Context

No response

Environment

No response

joeyhouser2 commented 3 months ago

Just tried exporting the dataset without saving images as well - same result. I am currently unable to to use any of the data that I've labeled.

prashantkatoch12 commented 2 months ago

Facing the same issue. Tasks - export task dataset - export format - YOLO 1.1 - ok. Saved the downloaded dataset, but out of 44 annotation txt files only first three have Bounding Box coordinates, rest all txt files are blank. Please let me know if you find some solution to it. May be they give it for paid version only.

Screenshot 2024-08-29 153052

dataScience-noob commented 2 months ago

I will try to explain this based on my experience so far. While annotating, did you rotate the bounding boxes to match the orientation of the object in the image? In the YOLO format, bounding boxes are expected to be axis-aligned with the image (the sides of the bounding box should always align with the sides of the image, not object). Rotating the bounding boxes can cause confusion and CVAT may not save the coordinates for these boxes. The solution is to annotate the objects in such a way that the bounding boxes are parallel to the sides of the image even if this means capturing more background within the box. I hope this helps!

azhavoro commented 2 months ago

@dataScience-noob Thank you! At this moment it's possible to export in YOLO v8 format, which supports rotated bounding boxes.