-
-
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
TypeError: string indices must be integers #55
Comments
these scripts dont work, ive been trying for hours. |
so how have you solved your problem? |
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 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.
The text was updated successfully, but these errors were encountered: