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

🩹 [Fix] Labels in YOLO detection format #175

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

luuzk
Copy link

@luuzk luuzk commented Feb 21, 2025

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.

@luuzk luuzk changed the title 🩹 [Fix] YOLO detection format 🩹 [Fix] Labels in YOLO detection format Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Wrong label annotations when training on custom dataset
1 participant