Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Cheng__Willy
Beginner
140 Views

Using OpenVINO with Myriad on Mobilenet SSD

Hi,

When I test Myraid X (PCIe),
I find the confidence of output is strange when it runs Mobilenet-SSD by the IR without the MO argument --
mean_values
(or set mean value = 0).

This problem can reappear by OpenVINO's sample.

  • Download the mobilenet-ssd:

cd /intel/computer_vision_sdk/deployment_tools/model_downloader
sudo python3 downloader.py –name mobilenet-ssd

  • Run Model Optimizer:

python3 ./mo.py --input_model ../model_downloader/object_detection/common/mobilenet-ssd/caffe/mobilenet-
ssd.caffemodel --scale 127.5 --output_dir /output_path
(--data_type FP32 and --data_type FP16)

  • Run sample object_detection_sample_ssd:

./object_detection_sample_ssd -i /intel/computer_vision_sdk/deployment_tools/demo/car_1.bmp -m /path/mobilenet-
ssd.xml

  • Result:

-d CPU (fp32)
[0,7] element, prob = 0.999997    (226.24,115.954)-(502.941,462.071) batch id : 0 WILL BE PRINTED!
[1,7] element, prob = 0.830671    (638.278,239.18)-(745.156,605.288) batch id : 0 WILL BE PRINTED!

-d GPU (fp32)
[0,7] element, prob = 0.999997    (226.24,115.954)-(502.941,462.071) batch id : 0 WILL BE PRINTED!
[1,7] element, prob = 0.830671    (638.278,239.18)-(745.156,605.288) batch id : 0 WILL BE PRINTED!

-d GPU (fp16)
[0,7] element, prob = 1                 (234.073,112.979)-(507.564,467.122) batch id : 0 WILL BE PRINTED!
[1,7] element, prob = 0.821777    (638.215,239.717)-(745.066,604.284) batch id : 0 WILL BE PRINTED!

-d MYRIAD (fp16, Myriad 2 USB)
[0,7] element, prob = 1                (234.428,112.906)-(507.623,467.486) batch id : 0 WILL BE PRINTED!
[1,7] element, prob = 0.82959     (638.186,239.653)-(744.977,605.896) batch id : 0 WILL BE PRINTED!

-d MYRIAD (fp16, Myraid X PCIe)
[0,7] element, prob = 0.999023    (224.188,110.262)-(507.257,477.128) batch id : 0 WILL BE PRINTED!
[1,7] element, prob = 0.396729    (635.626,245.873)-(740.954,618.96) batch id : 0

(Set the argument --mean_values data[0,0,0] to MO, the output IR is same as the IR without the argument --
mean_values.)

If the argument is --mean_values data[0.0001,0.0001,0.0001] to MO, the output IR will change the second layer from type="Power" to type="ScaleShift", and a lot of weights and biases offsets are changed.

  • Result of IR with --mean_values data[0.0001,0.0001,0.0001]:

-d CPU (fp32)
[0,7] element, prob = 0.999997    (226.24,115.954)-(502.941,462.071) batch id : 0 WILL BE PRINTED!
[1,7] element, prob = 0.830671    (638.278,239.18)-(745.156,605.288) batch id : 0 WILL BE PRINTED!

-d GPU (fp32)
[0,7] element, prob = 0.999997    (226.24,115.954)-(502.941,462.071) batch id : 0 WILL BE PRINTED!
[1,7] element, prob = 0.830672    (638.278,239.18)-(745.156,605.288) batch id : 0 WILL BE PRINTED!

-d GPU (fp16)
[0,7] element, prob = 1                 (234.344,112.923)-(507.782,467.205) batch id : 0 WILL BE PRINTED!
[1,7] element, prob = 0.825684    (638.097,239.278)-(744.74,604.949) batch id : 0 WILL BE PRINTED!

-d MYRIAD (fp16, Myriad 2 USB)
[0,7] element, prob = 1               (234.428,112.906)-(507.623,467.486) batch id : 0 WILL BE PRINTED!
[1,7] element, prob = 0.82959    (638.186,239.653)-(744.977,605.896) batch id : 0 WILL BE PRINTED!!

-d MYRIAD (fp16, Myraid X PCIe)
[0,7] element, prob = 1                 (233.88,113.061)-(507.623,467.797) batch id : 0 WILL BE PRINTED!
[1,7] element, prob = 0.824707    (638.552,239.808)-(745.343,606.208) batch id : 0 WILL BE PRINTED!

With the argument --mean_values setting, the result of Myraid X can be fine.

In the case of mean_values=0, devices use the same input to run the same model, only Myraid X get the different confidence result from others.

Thanks.

0 Kudos
2 Replies
Monique_J_Intel
Employee
140 Views

Hi Willy,

This a bug in the list_topologies.yml the --mean_values should have the value [127.5,127.5,127,5] the --scale value should have 255 and this will produce the correct results. Let me know if this works for you.

Kind Regards,

Monique Jones

Cheng__Willy
Beginner
140 Views

Yes, if I set --mean_values data[127.5,127.5,127,5] and --scale 255 (or 127.5), Myraid X will produce the correct results.
(I'm just tring to pre-processing mean values by my application, so I set MO argument --mean_values data[0,0,0] to test.)

The other case:
The argument is set to --mean_values data[127.5,127.5,127,5] and --scale 255.
If I add the argument --disable_fusing, Myraid X will produce the different results from other devices.

Thanks.

Reply