-
-
Notifications
You must be signed in to change notification settings - Fork 232
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
Convert coco segment to yolo segment #49
Comments
In the general_json2yolo.py script, set the directory which includes your COCO JSON file to the first argument of convert_coco_json(). Then, run the script.
|
@ryouchinsa hey, I replaced the argument with the json directory. But the generated images and labels folders are empty. Am I missing anything else? |
Thanks for writing the issue. Looking at the global_json2yolo code, there are some flags.
Converting the COCO segmentation format to YOLO segmentation format.
Converting the COCO keypoints format to YOLO keypoints format.
To convert the COCO segmentation format to YOLO segmentation format.
This is the folder structure when we run the script. Please let us know your opinion. |
Thanks for answering. I am getting the below error. I am just trying to convert with without segmentation features.
I do not understand the error. because the .txt file should be generated not read. My directory: /home/loki/segmentation/datasets/coco/annotations/scene_gt_coco_modal.json Also my coco json uses RLE in the segmentation. Below is my COCO format
How do I convert these to YOLO format with your script? |
In our environment, this COCO RLE format is correctly converted to YOLO segmentation format.
|
scene_gt_coco_modal.json |
Thanks for attaching the JSON file. Updated so that the subdirectory from file_name was removed.
Updated so that the uncompressed RLE is converted to compressed RLE before decoding.
Please let us know your opinion. |
It worked perfectly :) Thank you very much |
@ryouchinsa Dear My Friend. That's nice!...Thank you very much for your great support to solve this problems. |
kpt_shape: [4, 3] I am getting this error is this because of bounding box? while doing annotations I tried only for keypoints not for bbox. |
bboxpose-1.json |
which tool did use for annotation @Lokesh-26 ? |
Hey @josh-001 sorry for the late reply. I used the annotation tool from Bop_toolkit |
Got it! Utilizing the Bop_toolkit annotation tool could lead to the issue you're currently encountering. In your provided JSON file, the issue seems to be related to the bounding box annotation. It is likely that the bounding box information may not be formatted correctly, causing errors in the conversion process. To address the issue, you may need to review and verify the bounding box annotations within your JSON file to ensure they are properly defined. It's important to validate that the bounding box coordinates and dimensions are accurately represented, as this will ensure their successful conversion using the current script. If you encounter any further difficulties, please feel free to share additional details or the relevant parts of your JSON file for further assistance. |
Hi @josh-001, I am sorry for late reply.
We added Converting the COCO keypoints format to YOLO keypoints format.
Looking at your coco file, there is a polygon annotation.
|
Hi, How can i convert coco segment to yolo segment with this tool?
The text was updated successfully, but these errors were encountered: