Skip to content

IndexError with file from link #1

@h0uter

Description

@h0uter

after downloading yolo-obj.weights from the link in your README.md and running either of the examples I get the following error.

Traceback (most recent call last):
  File ".../DoorDetector/detection_image.py", line 89, in <module>
    outs = net.forward(get_output_layers(net))
                       ^^^^^^^^^^^^^^^^^^^^^^
  File ".../DoorDetector/detection_image.py", line 31, in get_output_layers
    output_layers = [layer_names[i[0] - 1] for i in net.getUnconnectedOutLayers()]
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File ".../DoorDetector/detection_image.py", line 31, in <listcomp>
    output_layers = [layer_names[i[0] - 1] for i in net.getUnconnectedOutLayers()]
                                 ~^^^
IndexError: invalid index to scalar variable.

I tried opencv-python 3.4.18 and 4.8.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions