KeyError: 3834 in YOLOv5 Detection Script #12186
-
I am encountering a KeyError: 3834 in my YOLOv5 detection script and would appreciate some guidance on resolving this issue. I have created a custom dataset to test and understand YOLO. These are the names and classes specified in my custom_file.yaml CLI:
Error Message:
Yaml File: Any insights on resolving the KeyError: 3834 would be highly appreciated. |
Beta Was this translation helpful? Give feedback.
Answered by
Harshit28j
Oct 13, 2023
Replies: 1 comment 1 reply
-
Hello, did you train the model with YOLOv5 also? Because I got the exact same error when I tried to run detect.py of YOLOv5 using a model I trained with YOLOv8. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yes @inesxrodrigues , I figured it out, my friend. This issue is occurring because the class names I have given in my custom_file.yaml are not equal to the number of classes in my dataset. I suggest you organize your dataset properly, ensuring that class names are correct, and specify the correct number of classes.