Skip to content
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

List limited range of 675 #3

Open
matdealm opened this issue Feb 28, 2023 · 3 comments
Open

List limited range of 675 #3

matdealm opened this issue Feb 28, 2023 · 3 comments

Comments

@matdealm
Copy link

File "draw_box.py", line 111, in
box_num = draw_box_on_image(image_names[image_total], classes, colors, label_folder, raw_images_folder, save_images_folder)#对图片画框
File "draw_box.py", line 69, in draw_box_on_image
plot_one_box([x1,y1,x2,y2], image, color=colors[class_idx], label=classes[class_idx], line_thickness=None)
IndexError: list index out of range

There seems to be a list index issue that limites this to 675 images. Any idea what could fix this?

@waittim
Copy link
Owner

waittim commented Mar 24, 2023

I cannot reproduce this error on my end. I tested a more enormous image volume and it does work with >675 images.
Probably the error is triggered by some other reason.

@aditya33agrawal
Copy link

Faced the same issue:

Banana-4_jpg.rf.e7ab025d4785f0ab4ff667d0fe2f3ded
Traceback (most recent call last):
File "/content/draw-YOLO-box/draw_box.py", line 106, in
box_num = draw_box_on_image(
File "/content/draw-YOLO-box/draw_box.py", line 66, in draw_box_on_image
plot_one_box([x1, y1, x2, y2], image, color=colors[class_idx],
IndexError: list index out of range

I just have 6 images in the dataset.

@waittim
Copy link
Owner

waittim commented Nov 21, 2023

Can you check which list brings the IndexError: list index out of range issue?

It might be caused by [x1, y1, x2, y2] which means the annotation information exceeds the image size.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants