vehicle-counting-using-python-yolo icon indicating copy to clipboard operation
vehicle-counting-using-python-yolo copied to clipboard

Index error is line 73 of main.py

Open souktik opened this issue 2 years ago • 1 comments

image Please solve this error

souktik avatar May 13 '23 04:05 souktik

YOLO Object Detection

layer_names = net.getLayerNames() output_layers = [layer_names[i[0] - 1] for i in net.getUnconnectedOutLayers()]

Don't need to indexing i in layer_names[i[0] - 1] . Just remove it and do layer_names[i - 1]

layer_names = net.getLayerNames() output_layers = [layer_names[i - 1] for i in net.getUnconnectedOutLayers()]

It Work For Me

sajidjavid222 avatar Feb 02 '24 16:02 sajidjavid222