Unable to execute object_detection
See original GitHub issueAs of rather recently I am unable to use object_detection, whereas everything else seems to work rather fine. It boils down to that error message:
Traceback (most recent call last):#################################################################################### |
File "detector_mine.py", line 35, in <module>
bbox, label, conf = cv.detect_common_objects(rect_img, confidence=0.75, enable_gpu=True')
File "/home/user/.local/lib/python3.8/site-packages/cvlib/object_detection.py", line 135, in detect_common_objects
outs = net.forward(get_output_layers(net))
File "/home/user/.local/lib/python3.8/site-packages/cvlib/object_detection.py", line 29, in get_output_layers
output_layers = [layer_names[i[0] - 1] for i in net.getUnconnectedOutLayers()]
File "/home/user/.local/lib/python3.8/site-packages/cvlib/object_detection.py", line 29, in <listcomp>
output_layers = [layer_names[i[0] - 1] for i in net.getUnconnectedOutLayers()]
IndexError: invalid index to scalar variable.
It runs fine on my old Win10/11 installation from a couple of months ago, however accessing the same script from a WSL machine on the exact same PC results in the error above. I’m also getting the same from a new macOS setup.
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (1 by maintainers)
Top Results From Across the Web
Unable to execute the Detect Objects Using Deep Learning ...
When working with deep learning models in ArcGIS Pro, attempting to run the Detect Objects Using Deep Learning tool fails and returns the ......
Read more >Unable to Use a Folder of Images to Execute Object Detection ...
Execute the following command to perform object detection with input of images in the folder: python object_detection_demo.py -at ssd -m <path_to_model> -i ...
Read more >Unable to Run Object Detection Training · Issue #171 - GitHub
When I try to run object detection training, I get this error. I'm using Python 3.8.7 on a 16" MacBook Pro running macOS...
Read more >Unable to run object detection code on Colab - Stack Overflow
You might want to double check if this is expected. WARNING [08/23 15:10:22 fvcore.common.checkpoint]: Skip loading parameter 'backbone.
Read more >Unable to create YOLO detector for model yolov5m : r/BlueIris
Also, you may want to disable unused modules in Sense AI's dashboard - you only need Object Detection.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hello, this issue still exists, I ran into it today. I followed tomgit-com and mihaipanait’s comments and it worked. Thank you for the direction.
I think there are some changes in the latest OpenCV version. Try using with older opencv version for now. Will fix this soon.