Open potSm0ker opened 1 year ago
these scripts dont work, ive been trying for hours.
so how have you solved your problem? i want to convert my coco.json file to yolov8 format for segmentation.
I understand your frustration, and I'm here to help. To address the "string indices must be integers" error, this typically occurs when trying to access a dictionary key using a string when the value is expected to be an integer. In the provided error, it seems that you are attempting to access a key in a dictionary using a string, but the key actually requires an integer index. You'll need to review the specific code at line 22 and ensure that you are accessing the dictionary correctly.
Regarding your requirement to convert a COCO JSON file to YOLOv8 format for segmentation, the Ultralytics YOLO repositories offer tools like coco2yolo.py
which can be used for this purpose. However, it's worth noting that direct segmentation support in YOLOv8 is currently under development in the latest YOLOv5. If you're looking for segmentation capabilities, I would recommend exploring YOLOv5 or other segmentation-specific tools.
Feel free to ask for further clarification or assistance with any specific issues you encounter during this process.
any updates on this?
@freds-dev i can understand your frustration, and I assure you I am committed to helping you resolve the issue. To address the "string indices must be integers" error you encountered, please ensure that you are accessing the dictionary correctly at the specific line mentioned in the error. If you need further assistance with this, please provide more details about the code segment causing the error, and I will be glad to offer additional guidance.
Regarding the COCO JSON to YOLOv8 format conversion for segmentation, as of now, direct segmentation support is under active development in the latest YOLOv5. While YOLOv8 is an advancement of YOLOv5, I recommend exploring YOLOv5 or other specialized tools for your segmentation requirements. If you'd like further assistance with any specific aspect of this process, feel free to ask, and I'd be happy to help.
Trying to run script labelbox_Json2yolo.py. I am getting error line 22, in convert im_path = img['Labeled Data'] TypeError: string indices must be integers
It creates a directory with the name of my json file and two sub directories - images and labels. Then i get the error. all i did was change the bottom line to the path of my json file.