sovit-123 / Traffic-Light-Detection-Using-YOLOv3

Traffic light detection using deep learning with the YOLOv3 framework. PyTorch => YOLOv3
GNU General Public License v3.0
59 stars 16 forks source link

Index out of range #1

Closed lorenz-lukas closed 4 years ago

lorenz-lukas commented 4 years ago

Hi, I have cloned your project and when i run "python3 test.py --data traffic_light.data" I received the following error:

Traffic-Light-Detection-Using-YOLOv3/utils/utils.py", line 920, in plot_images cls = names[cls] if names else cls IndexError: list index out of range

I did not get why you select go or stop with the "cls" variable. Could you help me?

Other thing that did not worked for me was your requirements.txt by "pip instal -r requirements.txt" command line. I have to install the packages manually.

Thanks in advance.

sovit-123 commented 4 years ago

Hello lorenz. Actually, test.py does not run standalone. When you execute train.py, then test.py will run on the validation dataset. If you want to detect traffic lights on a single image or video, then you can use detect.py. Also, I have not uploaded any trained model till now. Still working on it. Maybe will upload it within a couple of days. I will also update the steps to execute the files sequentially, how to do standalone detection using detect.py, and will also update the requirements file. For now, if you want to try the model, you will have to train first. Or maybe wait a couple of days until I provide the full steps and the trained model.

lorenz-lukas commented 4 years ago

Thanks a lot Sovit. I am new in deep learning and I want to do transferlearning. Fortunately, your repository was the most complete that I found so far. I tried to training it but it took many time. I appreciate if you provide it. Thanks.

I you try to use detect.py. Thanks again!

sovit-123 commented 4 years ago

I am glad that my repository helped you.

sovit-123 commented 4 years ago

I hope that running detect.py worked for you. I am closing this issue for now.