depthai: Problem with `face-detection-retail-0004` with openvino_2020.1.023
I would like to use the latest OpenVino, but I have a problem running the face-detection-retail-0004
example. I’m following this tutorial and using this script. I can see the video capture from the camera and the script doesn’t report errors, but the inference does’t work. When I print out print(str(e['label']) + " " + str(e['conf']))
I get constant values:
1.0 0.04296875
1.0 0.04296875
1.0 0.04296875
1.0 0.04296875
1.0 0.04296875
.
.
.
Can I somehow debug further, or should I just switch to the older OpenVINO release?
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 24 (15 by maintainers)
So @mariusz-r ,
Here’s what I did to quickly get the face detection running.
Also, I didn’t checkout any special branch, just master, and then modified depthai.py, this line:
Changed this to:
/home/pi/Desktop/depthai-python-extras/resources/nn/object_detection_4shave/face-detection-retail-0004.blob
As below:
Notice I didn’t change the path to where the class names are, so it says ‘aeroplane’ over my face instead of ‘face’. You can change that as you desire. The first class in the path that I left it pointed to is ‘aeroplane’. If you change this path (or just change the class in the existing file) than you can properly get the face display.
Sorry about the messy examples. We need to clean them up. Will do so this week.
Thanks, Brandon
So @mariusz-r I just updated the OpenVINO face-detection post w/ current use of DepthAI.
https://docs.luxonis.com/tutorials/openvino_model_zoo_pretrained_model/
We’ll probably be updating a bit more as we go forward, specifically to not have to select the neural
.blob
, the labels.txt
, and the tensor format.json
all independently. We’re going to move the labels into the .json and have the.blob
and the.json
live in their own folders so you can just select the folder and the.blob
and the.json
(which now includes the labels) are used together.@szabi-luxonis is implementing this change now.
Also closing this issue now but feel free to re-open it if there’s anything more on this.
@mariusz-r
face-detection-retail-0004.py
is outdated, the latest is depthai.py, if you changeblob file
to/home/pi/Desktop/depthai-python-extras/resources/nn/object_detection_4shave/face-detection-retail-0004.blob
it should behave the same. Then run with python3 test.py, it will quit when pressing q. It will also recover if any unexpected SW error happens.I think it should work alright.
And so @mariusz-r are you needing USB3 speeds for anything? It’s seeming USB3 on Linux variants is a bit of a minefield. Ubuntu 18.04 and Raspbian on Pi 4 seems pretty stable to us now with USB3, but 16.04 is having issues, and then other Linux variants we’re not sure as we haven’t tried.
So using the
-force_usb2
(or-fusb2
for short) should stabilize this for you even with other devices plugged in/etc. if you don’t need USB3 speeds.Thoughts?
Thanks, Brandon
Hello @mariusz-r On the latest master branch you can try : python3 test.py --force_usb2 to force usb2.0 connection.
Thank you @Luxonis-Brandon. I have Linux Mint 19.2 Tina installed natively on a E7450 laptop and yes, I have the long USB 3.0 cable. So far the only thing that seems to help is disconnecting other USB devices (I had for example 7-port USB 3.0 hub connected). I’ll try the experimental version and then a shorter cable.
(Also I’ll go through that tutorial today and update it… I meant to do that last week and got distracted. Sorry about potentially some burned time here.)