🩹 [Fix] Labels in YOLO detection format#175
🩹 [Fix] Labels in YOLO detection format#175luuzk wants to merge 2 commits intoMultimediaTechLab:mainfrom
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)
continuebreaks 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
.txtfiles 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_bboxesto convert bounding boxes to YOLO segmentation format if they are in YOLO detection format. Otherwise, leave them as is for backwards compatibility.