-
Notifications
You must be signed in to change notification settings - Fork 186
🩹 [Fix] Labels in YOLO detection format #175
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
base: main
Are you sure you want to change the base?
Conversation
You saved my life, thank you |
Would this mean that the bbox from yolo format, its consider as a 4 points segmentation for the model? |
Hi @luuzk Do you have any suggestions on what could be the issue? |
Thanks for this, I have tried this branch and I am still getting the same problem as always, when I transfer train it ends in a couple of seconds with no error report and a one liner in my output log that says 📈 Enable Model EMA I have task.ema.enable=True but if I set it to False nothing changes. Working in google colab if that helps. Cheers |
I made some progress by altering the dataset folder structure but the error I am getting now is:
Xray/ my data.yaml file is: path: /content/YOLO/yolo/config/dataset/data.yaml train_label_dir: /content/YOLO/data/Xray/labels/train class_num: 5 Hoping to get some advice. |
Hello, Currently on Attempting automatic conversion based on: if len(anno) > 5:
segmentation_data.append(anno)
continue breaks support for this format. I would suggest introducing a configuration option, allowing users to explicitly specify the annotation format. This would make the behavior clearer and avoid unexpected issues. |
Use YOLOv8 Format |
This PR fixes a bug where
.txt
files are always interpreted in YOLO segmentation format(class_id, x1, y1, x2, y2, ..., xn, yn)
although they are in very common YOLO detection format(class_id, cx, cy, w, h)
. This behavior is explained in #141 (comment) and #148 (comment) by @henrytsui000.Closes #102, #141, #148, and #158.
Adds a new method
convert_bboxes
to convert bounding boxes to YOLO segmentation format if they are in YOLO detection format. Otherwise, leave them as is for backwards compatibility.