Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Employee
208 Views

Safety Gear Detector Fails to Run the Pre-trained Model

Jump to solution

I'm trying to get the demo running from here...

https://github.com/intel-iot-devkit/safety-gear-detector-python

But somehow the pre-trained model from Intel won't run. I'm on Mac OSX and 2021.1 now. 

 

rloÉrlo-mac01 application % python3 ./safety_gear_detector.py -m ../intel/person-detection-retail-0013/FP16/person-detection-retail-0013.xml
Application running in Async mode
/Users/rlo/Documents/python_demos/safety-gear-detector-python/application/inference.py:79: DeprecationWarning: 'layers' property of IENetwork class is deprecated. For iteration over network please use get_ops()/get_ordered_ops() methods from nGraph Python API
  Äl for l in self.net.layers.keys() if l not in supported_layersÅ
ERROR:root:Following layers are not supported by the plugin for specified device CPU:
 Constant_58577

 

0 Kudos

Accepted Solutions
Highlighted
Moderator
70 Views

Hi Raymond,

As I mentioned before, this sample code is not from the OpenVINO developer but the devcloud developer. I believe the devcloud has released the latest version of OpenVINO which is the 2020.3 LTS version. Hence, I've tested the sample code in the 2021.1 version and failed. The sample code is only working in the 2020.3 version from my side.

 

Regards,

Aznie


View solution in original post

0 Kudos
7 Replies
Highlighted
Employee
206 Views

I actually can run this on the neural stick... Same code won't run if I switch to -d CPU....  

python3 ./safety_gear_detector.py -d MYRIAD -m /opt/intel/openvino/deployment_tools/open_model_zoo/tools/downloader/intel/person-detection-retail-0013/FP16/person-detection-retail-0013.xml -sm ../resources/worker-safety-mobilenet/FP16/worker_safety_mobilenet.xml



Application running in Async mode

/Users/rlo/Documents/python_demos/safety-gear-detector-python/application/inference.py:97: DeprecationWarning: 'inputs' property of IENetwork class is deprecated. To access DataPtrs user need to use 'input_data' property of InputInfoPtr objects which can be accessed by 'input_info' property.

  self.input_blob = next(iter(self.net.inputs))

/Users/rlo/Documents/python_demos/safety-gear-detector-python/application/inference.py:153: DeprecationWarning: 'outputs' property of InferRequest is deprecated. Please instead use 'output_blobs' property.
0 Kudos
Highlighted
Moderator
142 Views

Hi Raymond,

 

I suggest you run the sample code with OpenVINO 2020.3 since this has been mentioned requirement of the sample. Meanwhile, make sure your CPU is within 6th to 8th Generation Intel® Core™ processors with Iris® Pro graphics or Intel® HD Graphics which also mentioned in the hardware requirement. The sample might be hardcoded to OpenVINO 2020.3 and 6th to 8th generation core CPU.

 

Regards,

Aznie


0 Kudos
Highlighted
Employee
137 Views

That's a huge uptake to roll back all versions and my setup back to 2019 to get it running. sigh. 

I don't see where it did the hardcoding either. It actually compiles and optimizes the model with the mo_caffe.py script.

cd /opt/intel/openvino/deployment_tools/model_optimizer/
./mo_caffe.py --input_model $BASE_DIR/resources/worker-safety-mobilenet/worker_safety_mobilenet.caffemodel  -o $BASE_DIR/resources/worker-safety-mobilenet/FP32 --data_type FP32
./mo_caffe.py --input_model $BASE_DIR/resources/worker-safety-mobilenet/worker_safety_mobilenet.caffemodel  -o $BASE_DIR/resources/worker-safety-mobilenet/FP16 --data_type FP16

-ray

 

0 Kudos
Highlighted
Employee
130 Views

I got the same error rolling back to 2020.3 LTS. Something isn't adding up. I guess I'm missing some sort of cpu_extension as I saw similar issues with others. 

https://docs.openvinotoolkit.org/2019_R1/_inference_engine_src_extension_README.html

I will give it a try again and update you all with another machine. 

-ray

0 Kudos
Highlighted
Moderator
118 Views

 Hi Raymond, 

This sample is a specific sample and it is not part of the OpenVINO toolkit but the intel-iot-devkit. However, I've tried in a different machine and different version of OpenVINO but it only works with OpenVINO 2020.3. If you getting any error from OpenVINO 2020.3 too, please try the workaround first.

  • Find the downloader package in the OpenVINO™ toolkit package: "C:\Program Files (x86)\IntelSWTools\openvino\opencv\ffmpeg-download.ps1".
  • Right-click on the script file and select Run with Powershell.

 Regards,

Aznie

 

0 Kudos
Highlighted
Employee
87 Views

I found a sample code on the devcloud, and it runs with 2021.1?  

 

-ray

0 Kudos
Highlighted
Moderator
71 Views

Hi Raymond,

As I mentioned before, this sample code is not from the OpenVINO developer but the devcloud developer. I believe the devcloud has released the latest version of OpenVINO which is the 2020.3 LTS version. Hence, I've tested the sample code in the 2021.1 version and failed. The sample code is only working in the 2020.3 version from my side.

 

Regards,

Aznie


View solution in original post

0 Kudos