pytorch-yolo-v3 icon indicating copy to clipboard operation
pytorch-yolo-v3 copied to clipboard

List Range Error

Open iampythoneer opened this issue 5 years ago • 2 comments

Hello, First of all, thanks for the amazing repo! Actually I want only person, helmet and jackets to get detected and so for that I editted the coco.names and voc.names files( added these three and deleted the rest) But the thing is after making this change I am unable to execute the script, it shows the error as follows: File "video_demo.py", line 169, in list(map(lambda x: write(x, orig_im), output)) File "video_demo.py", line 169, in list(map(lambda x: write(x, orig_im), output)) File "video_demo.py", line 48, in write label = "{0}".format(classes[cls]) IndexError: list index out of range

Your help is highly needed and appreciated. Thanks in advance :)

iampythoneer avatar Jul 12 '19 12:07 iampythoneer

Have you solved this issue? I am stucked here too but only when using webcam as input. Normal video files are fine(ie; mp4)

iqrammm avatar Aug 08 '19 06:08 iqrammm

I have this problem too when I use a live stream. I get cls = int(x[-1]) as 322 for one of the values. Is it because of the video_demo.py code? Should we be using the cam_demo.py code instead?

xopiad avatar Apr 04 '20 21:04 xopiad