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

Converting EXLPose Dataset Annotations to Yolo8-pose #86

Open
mycodeDev786 opened this issue Apr 24, 2024 · 3 comments
Open

Converting EXLPose Dataset Annotations to Yolo8-pose #86

mycodeDev786 opened this issue Apr 24, 2024 · 3 comments

Comments

@mycodeDev786
Copy link

I attempted to convert the annotations from the EXLPose dataset to Yolo8-pose format but encountered difficulties and was unable to complete the task

Capture
@pderrenger
Copy link
Member

Hi there! 😊 It sounds like you're diving deep into converting EXLPose dataset annotations for use with YOLO8-pose. While the image link didn’t come through properly, here’s a basic guideline to start the conversion process:

  1. Ensure each annotation includes necessary info in this format: class x_center y_center width height.
  2. For pose data, append joint coordinates and confidence scores: ... joint1_x joint1_y conf1 joint2_x joint2_y conf2 ....
  3. Use relative coordinates (values between 0 and 1) compared to the image size.

Example for a person (class 0) with two pose keypoints:

0 0.5 0.5 0.2 0.4 0.25 0.3 1 0.75 0.7 1

This represents a bounding box centered at (0.5, 0.5) with a width of 0.2 and height of 0.4, and two keypoints with confidence scores.

If you're still facing issues, could you provide more details about the specific difficulties? This will help us offer more targeted advice. Remember, for broader guides or details, checking the Ultralytics Docs might also illuminate the path forward. Keep exploring and experimenting!

@mycodeDev786
Copy link
Author

Hi there! 😊 It sounds like you're diving deep into converting EXLPose dataset annotations for use with YOLO8-pose. While the image link didn’t come through properly, here’s a basic guideline to start the conversion process:

  1. Ensure each annotation includes necessary info in this format: class x_center y_center width height.
  2. For pose data, append joint coordinates and confidence scores: ... joint1_x joint1_y conf1 joint2_x joint2_y conf2 ....
  3. Use relative coordinates (values between 0 and 1) compared to the image size.

Example for a person (class 0) with two pose keypoints:

0 0.5 0.5 0.2 0.4 0.25 0.3 1 0.75 0.7 1

This represents a bounding box centered at (0.5, 0.5) with a width of 0.2 and height of 0.4, and two keypoints with confidence scores.

If you're still facing issues, could you provide more details about the specific difficulties? This will help us offer more targeted advice. Remember, for broader guides or details, checking the Ultralytics Docs might also illuminate the path forward. Keep exploring and experimenting!

I am attaching the coco JSON file. i have converted and i am also attaching the converted yolo text file as well. but when i test the model it does not consider my convert yolo file as a val label.
coco.json

@pderrenger
Copy link
Member

Hello! 😊 Thanks for sharing more details. Make sure when converting COCO JSON to YOLO format, the file structure, and naming align precisely with YOLO requirements. It’s essential that your dataset directory is correctly organized and your .txt label files match the names of their corresponding images, minus the extension.

For example:

  • image1.jpg —> image1.txt

Inside your .txt files, double-check the format:

<class_id> <x_center> <y_center> <width> <height> ...

Ensure no extra spaces or lines are present, as these could disrupt the parsing.

If the model isn't detecting your labels correctly during validation, it might be due to either a path issue or format error in the converted files. Verify your validation path in the training script points to the correct directory where your converted YOLO files reside.

Double-checking your dataset directory setup against the guidelines in the Ultralytics Docs can also help ensure everything's in place. If issues persist, providing the exact error message or behavior could help us pinpoint the solution more effectively. Let's keep pushing forward! 💪

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

No branches or pull requests

2 participants