CVHub520 / X-AnyLabeling

Effortless data labeling with AI support from Segment Anything and other awesome models.
GNU General Public License v3.0
3.02k stars 342 forks source link

Error When Export YOLO-Pose Annotations #471

Closed kenwaytis closed 1 week ago

kenwaytis commented 1 week ago

System Information:

  1. Ubuntu 22.04
  2. X-AnyLabeling 2.3.6 CPU
  3. Started using the source code, exporting YOLO object detection format works fine

Issue Description:

When I completed the image annotation with rotated boxes and keypoints, I followed the user_guide to write pose.yaml. After selecting and choosing pose.yaml, an error occurred: int() argument must be a string, a bytes-like object or a number, not 'NoneType'.

Additional Information:

  1. The tags I annotated are as shown in the image, with "instrument" being the detection box and the rest being keypoints. 2024-06-24_10-29
  2. The pose.yaml I wrote is as follows:
    has_visible: false
    classes:
    instrument:
      - center
      - point
      - min
      - max
  3. Screenshot of error: 2024-06-24_10-43
CVHub520 commented 1 week ago

Hello @kenwaytis,

Could you please share your annotated results with me? You can do so by pressing Ctrl+G and then sending me a screenshot.

kenwaytis commented 1 week ago

Hello @CVHub520,

Of course, I can share my results. However, I have already found a solution through experimentation.

Solution:

  1. When you want to export annotation files in YOLO-Pose format, you need to set the group_id of the detection box and keypoints for the same object to the same number, as shown in the image below: 2024-06-24_10-59
  2. The annotation points on the right will then look like this: 2024-06-24_10-58
  3. In the automatically saved standard file (json), the group_id is not empty.

In summary, the YOLO-Pose format needs to know which detection box the keypoints belong to, so you need to specify the group_id during annotation.

It might be because of my limited experience that I missed this point. I suggest that you consider adding the following guidance in the documentation:

"To export in YOLO-Pose format, you need to specify the group_id for each group (detection box and its keypoints) during annotation, so that the relationship can be understood during export."

If possible, I can submit a PR to add detailed instructions in doc/language/user_guide.md. Thank you very much for your time.

CVHub520 commented 1 week ago

Hey! Thank you for reaching out and for sharing your findings! It's great to hear that you've resolved the issue with exporting annotations in YOLO-Pose format.

Your solution is clear and concise, and it will undoubtedly be helpful for others who might encounter a similar problem. That's right, the group_id is indeed a critical element in ensuring that the keypoints are correctly associated with their respective detection boxes.

Your suggestion to update the documentation with this information is very much appreciated. It will certainly improve the user experience by providing more detailed guidance on the annotation process for YOLO-Pose format exports.

I'd be delighted to accept a PR from you with the added instructions in doc/language/user_guide.md. Please feel free to submit it, and I'll review it as soon as possible. Your contribution to the project is invaluable, and I thank you in advance for helping to make our documentation even better.

Looking forward to your PR!

Best.

kenwaytis commented 1 week ago

Hey! Thank you for reaching out and for sharing your findings! It's great to hear that you've resolved the issue with exporting annotations in YOLO-Pose format.嘿!感谢您伸出援手并分享您的发现!很高兴听到您已经解决了以 YOLO-Pose 格式导出注释的问题。

Your solution is clear and concise, and it will undoubtedly be helpful for others who might encounter a similar problem. That's right, the group_id is indeed a critical element in ensuring that the keypoints are correctly associated with their respective detection boxes.您的解决方案简洁明了,无疑会对可能遇到类似问题的其他人有所帮助。没错,这 group_id 确实是确保关键点与其各自的检测框正确关联的关键因素。

Your suggestion to update the documentation with this information is very much appreciated. It will certainly improve the user experience by providing more detailed guidance on the annotation process for YOLO-Pose format exports.非常感谢您建议使用此信息更新文档。它肯定会通过提供有关 YOLO-Pose 格式导出的注释过程的更详细指导来改善用户体验。

I'd be delighted to accept a PR from you with the added instructions in doc/language/user_guide.md. Please feel free to submit it, and I'll review it as soon as possible. Your contribution to the project is invaluable, and I thank you in advance for helping to make our documentation even better.我很高兴接受您的 PR 并在 doc/language/user_guide.md .请随时提交,我会尽快审核。您对项目的贡献是无价的,我提前感谢您帮助我们的文档变得更好。

Looking forward to your PR!期待您的公关!

Best. 最好。

Hey! Thank you for reaching out and for sharing your findings! It's great to hear that you've resolved the issue with exporting annotations in YOLO-Pose format.

Your solution is clear and concise, and it will undoubtedly be helpful for others who might encounter a similar problem. That's right, the group_id is indeed a critical element in ensuring that the keypoints are correctly associated with their respective detection boxes.

Your suggestion to update the documentation with this information is very much appreciated. It will certainly improve the user experience by providing more detailed guidance on the annotation process for YOLO-Pose format exports.

I'd be delighted to accept a PR from you with the added instructions in doc/language/user_guide.md. Please feel free to submit it, and I'll review it as soon as possible. Your contribution to the project is invaluable, and I thank you in advance for helping to make our documentation even better.

Looking forward to your PR!

Best.

472

Thank you very much for your attitude towards improving the documentation. Best regards.