Intel® Distribution of OpenVINO™ Toolkit
Community assistance about the Intel® Distribution of OpenVINO™ toolkit, OpenCV, and all aspects of computer vision-related on Intel® platforms.
6482 Discussions

Segmentation fault for object_detection sample with MYRIAD

Steven_L_
Beginner
1,092 Views

Hi,

Is it working to use Movidius stick for CV SDK object detection?

The sample object_detection_sample_ssd will show "Segmentation fault" by using Myriad.

./object_detection_sample_ssd -d MYRIAD -i image.jpg -m /opt/intel/computer_vision_sdk_2018.0.234/deployment_tools/intel_models/person-detection-retail-0012/FP16/person-detection-retail-0012.xml
[ INFO ] InferenceEngine: 
    API version ............ 1.0
    Build .................. 10073
Parsing input parameters
[ INFO ] No extensions provided
[ INFO ] Loading plugin

    API version ............ 0.1
    Build .................. myriadPlugin
    Description ....... myriadPlugin

[ INFO ] Loading network files:
    /opt/intel/computer_vision_sdk_2018.0.234/deployment_tools/intel_models/person-detection-retail-0012/FP16/person-detection-retail-0012.xml
    /opt/intel/computer_vision_sdk_2018.0.234/deployment_tools/intel_models/person-detection-retail-0012/FP16/person-detection-retail-0012.bin
[ INFO ] Preparing input blobs
[ INFO ] Batch size is 1
[ INFO ] Preparing output blobs
[ INFO ] Loading model to the plugin
[ WARNING ] Image is resized from (640, 480) to (544, 320)
[ INFO ] Batch size is 1
[ INFO ] Start inference (1 iterations)
[ INFO ] Average running time of one iteration: 333.337 ms
[ INFO ] Processing output blobs
[0,1] element, prob = 1    (283.125,185.625)-(408.125,476.719) batch id : 0 WILL BE PRINTED!
[1,1] element, prob = 0.999023    (386.25,142.266)-(486.875,394.922) batch id : 0 WILL BE PRINTED!
[2,1] element, prob = 0.96582    (137.5,94.2188)-(238.438,405.469) batch id : 0 WILL BE PRINTED!
[3,1] element, prob = 0.724121    (42.3828,276.328)-(97.9688,364.922) batch id : 0 WILL BE PRINTED!
[4,1] element, prob = 0.558105    (622.812,182.812)-(635.312,223.594) batch id : 0 WILL BE PRINTED!
[5,1] element, prob = 0.46875    (177.969,75)-(213.281,182.109) batch id : 0
[6,1] element, prob = 0.399414    (603.125,185.156)-(618.75,228.75) batch id : 0
[7,1] element, prob = 0.176514    (183.906,67.5586)-(207.656,144.141) batch id : 0
[8,1] element, prob = 0.137573    (13.0273,69.7266)-(38.6133,142.969) batch id : 0
[9,1] element, prob = 0.135132    (379.375,367.969)-(426.875,471.562) batch id : 0
[10,1] element, prob = 0.120911    (405,128.906)-(479.375,306.328) batch id : 0
[11,1] element, prob = 0.117249    (331.875,161.602)-(463.75,436.406) batch id : 0
[12,1] element, prob = 0.0844116    (50.4688,277.5)-(87.5781,343.125) batch id : 0
[13,1] element, prob = 0.0705566    (421.875,111.797)-(467.5,215.391) batch id : 0
[14,1] element, prob = 0.0678711    (108.906,27.5098)-(132.344,101.719) batch id : 0
[15,1] element, prob = 0.0669556    (412.188,208.828)-(472.188,412.266) batch id : 0
[16,1] element, prob = 0.0649414    (133.516,45.9375)-(154.766,118.359) batch id : 0
[17,1] element, prob = 0.0644531    (50.625,35.1562)-(91.25,132.891) batch id : 0
[18,1] element, prob = 0.0633545    (591.875,182.461)-(609.375,237.305) batch id : 0
[19,1] element, prob = 0.0628662    (164.531,63.0469)-(188.281,144.727) batch id : 0
[20,1] element, prob = 0.0566406    (170.469,86.7188)-(223.281,238.125) batch id : 0
[21,1] element, prob = 0.0536499    (335.312,90.7617)-(362.188,180.703) batch id : 0
[22,1] element, prob = 0.0518799    (166.406,108.281)-(274.844,356.953) batch id : 0
[23,1] element, prob = 0.0496521    (131.875,14.4141)-(145.781,55.957) batch id : 0
[24,1] element, prob = 0.0473022    (139.531,70.1953)-(179.375,188.32) batch id : 0
[25,1] element, prob = 0.0458679    (90.8594,26.3672)-(114.922,97.8516) batch id : 0
[26,1] element, prob = 0.0458679    (144.688,64.3359)-(172.188,152.461) batch id : 0
[27,1] element, prob = 0.0432129    (159.922,70.7812)-(200,190.781) batch id : 0
[28,1] element, prob = 0.0427551    (50.8203,290.156)-(114.531,387.188) batch id : 0
[29,1] element, prob = 0.0391235    (386.25,243.75)-(428.125,414.375) batch id : 0
[30,1] element, prob = 0.0389099    (68.75,26.9531)-(94.0625,97.9688) batch id : 0
[31,1] element, prob = 0.0387573    (430.312,126.328)-(480.938,239.297) batch id : 0
[32,1] element, prob = 0.0379639    (130.078,25.1953)-(151.484,98.2031) batch id : 0
[33,1] element, prob = 0.0370789    (150.859,69.2578)-(247.5,292.969) batch id : 0
[34,1] element, prob = 0.0358582    (587.188,184.805)-(610.312,264.844) batch id : 0
[35,1] element, prob = 0.0354614    (330,100.664)-(366.25,221.836) batch id : 0
[36,1] element, prob = 0.0352173    (130,55.8984)-(158.125,144.141) batch id : 0
[37,1] element, prob = 0.0352173    (106.094,114.258)-(207.188,392.344) batch id : 0
[38,1] element, prob = 0.0332336    (390,356.719)-(419.375,443.438) batch id : 0
[40,0.00233078] element, prob = 0.99707    (2.00684,476.25)-(4.77783,475.781) batch id : 0.998047 WILL BE PRINTED!
[41,0.978027] element, prob = 0.0216064    (627.812,9.25781)-(629.062,8.41553) batch id : 0.00905609
[42,0.0172577] element, prob = 0.988281    (7.20215,477.656)-(3.32275,479.062) batch id : 0.98291 WILL BE PRINTED!
[43,0.998047] element, prob = 0.00178719    (638.125,1.40991)-(638.75,1.0318) batch id : 0.00234413
[44,0.00345421] element, prob = 0.99707    (1.95312,477.188)-(3.42041,477.656) batch id : 0.996094 WILL BE PRINTED!
[45,0.99707] element, prob = 0.00283051    (638.75,1.14349)-(638.75,1.04279) batch id : 0.0047226
[46,0.00229454] element, prob = 0.998047    (1.51611,479.062)-(1.11328,479.062) batch id : 0.998047 WILL BE PRINTED!
[47,0.99707] element, prob = 0.00253868    (636.875,2.19543)-(638.125,1.3147) batch id : 0.00194836
[48,0.00526428] element, prob = 0.992188    (4.81445,479.062)-(1.31714,479.062) batch id : 0.995117 WILL BE PRINTED!
[49,0.999023] element, prob = 0.00126553    (638.75,0.895844)-(638.75,0.876617) batch id : 0.00174904
[50,0.00164795] element, prob = 0.998047    (1.4209,479.531)-(0.818481,479.062) batch id : 0.998047 WILL BE PRINTED!
[51,0.998047] element, prob = 0.00166607    (638.125,1.33667)-(638.125,1.18011) batch id : 0.00178719
[52,0.00148678] element, prob = 0.999023    (0.617676,479.531)-(0.621033,479.531) batch id : 0.998047 WILL BE PRINTED!
[53,0.999023] element, prob = 0.00128651    (638.75,0.713654)-(638.75,0.876617) batch id : 0.00102997
[54,0.00234413] element, prob = 0.998047    (1.44409,479.062)-(1.1499,479.531) batch id : 0.998047 WILL BE PRINTED!
[55,0.999023] element, prob = 0.000781059    (639.375,0.371017)-(639.375,0.23941) batch id : 0.00119209
[56,0.000609398] element, prob = 0.999023    (0.554199,479.062)-(1.0321,479.062) batch id : 0.999023 WILL BE PRINTED!
[57,0.998047] element, prob = 0.00171089    (638.125,1.25244)-(639.375,0.551147) batch id : 0.00200272
[58,0.00102425] element, prob = 0.999023    (0.402832,479.531)-(0.37323,480) batch id : 0.999023 WILL BE PRINTED!
[59,1] element, prob = 0.000415087    (639.375,0.260925)-(639.375,0.368958) batch id : 0.000480413
[60,0.00147915] element, prob = 0.999023    (0.651855,479.531)-(0.742798,479.531) batch id : 0.998047 WILL BE PRINTED!
[61,0.999023] element, prob = 0.000768661    (639.375,0.473328)-(640,0.201416) batch id : 0.000802517
[62,0.000558853] element, prob = 1    (0.244904,480)-(0.177002,480) batch id : 0.999023 WILL BE PRINTED!
[63,1] element, prob = 0.000424147    (639.375,0.272598)-(639.375,0.255432) batch id : 0.000276566
[64,0.00053215] element, prob = 0.999023    (0.353699,479.531)-(0.349731,479.531) batch id : 0.999023 WILL BE PRINTED!
[65,1] element, prob = 0.000435829    (639.375,0.236664)-(640,0.220757) batch id : 0.000653744
Segmentation fault (core dumped)

 

Best Regards,

Steven

0 Kudos
4 Replies
Maxim_S_Intel
Employee
1,092 Views

Hi, this is an issue specific to the MYRIAD.

You need to change the following line in the main.cpp to run on the Myriad:

            if (image_id < 0) {

                break;

            }

To the

            if (image_id !=0) {

                break;

            }

This is rather workaround for MYRAID device (as it virtually ignores batches other than first, since the MYRIAD doesn't support them and hence the issue with general sample code).

0 Kudos
Steven_L_
Beginner
1,092 Views

Hi Maxim,

The workaround is useful and working for me. Thanks.

One question for the performance. CPU v.s. VPU with the same system condition.

[ INFO ] Average running time of one iteration: 198.639 ms  ---->(The CPU performance)

[ INFO ] Average running time of one iteration: 325.995 ms  ---->(The MYRIAD performance).

Does the MYRIAD takes time to do USB memory copy or other reason?

How do I increase the MYRIAD performance and get more fps? 

Best Regards,

Steven

0 Kudos
CLu1
Novice
1,092 Views

Hi

I can't find below code in segmentation_sample/main.cpp

my OpenVINO version:2018.1.265

       if (image_id < 0) {

                break;

            }

It also has this problem under version 2018.1.265

[ INFO ] InferenceEngine:
    API version ............ 1.0
    Build .................. 10478
Parsing input parameters
[ INFO ] Loading plugin

    API version ............ 0.1
    Build .................. myriadPlugin
    Description ....... myriadPlugin
[ INFO ] Loading network files:
    /opt/intel/computer_vision_sdk/deployment_tools/intel_models/person-detection-retail-0012/FP16/person-detection-retail-0012.xml
    /opt/intel/computer_vision_sdk/deployment_tools/intel_models/person-detection-retail-0012/FP16/person-detection-retail-0012.bin
[ INFO ] Preparing input blobs
[ INFO ] Batch size is 1
[ INFO ] Preparing output blobs
[ INFO ] Loading model to the plugin
[ WARNING ] Image is resized from (660, 371) to (544, 320)
[ INFO ] Batch size is 1
[ INFO ] Start inference (1 iterations)
[ INFO ] Average running time of one iteration: 319.668 ms
[ INFO ] Processing output blobs
[0,1] element, prob = 0.999023    (407.666,113.13)-(459.873,255.787) batch id : 0 WILL BE PRINTED!
[1,1] element, prob = 0.998047    (186.592,88.9911)-(229.453,198.543) batch id : 0 WILL BE PRINTED!
[2,1] element, prob = 0.99707    (471.475,109.144)-(532.705,265.569) batch id : 0 WILL BE PRINTED!
[3,1] element, prob = 0.979004    (55.3088,71.4646)-(142.603,310.495) batch id : 0 WILL BE PRINTED!
[4,1] element, prob = 0.930176    (153.479,93.8369)-(198.193,200.354) batch id : 0 WILL BE PRINTED!
[5,1] element, prob = 0.392334    (235.898,104.706)-(273.926,190.391) batch id : 0
[6,1] element, prob = 0.105652    (49.4678,44.0653)-(127.134,211.224) batch id : 0
[7,1] element, prob = 0.042511    (73.7988,47.5978)-(137.769,182.602) batch id : 0
[8,1] element, prob = 0.0353394    (222.202,87.406)-(266.675,177.076) batch id : 0
[9,1] element, prob = 0.0345459    (81.936,60.1879)-(156.702,242.925) batch id : 0
[10,1] element, prob = 0.0316162    (59.6191,66.3018)-(115.21,177.892) batch id : 0
[11,1] element, prob = 0.0307159    (12.7295,55.6138)-(112.551,276.257) batch id : 0
[12,1] element, prob = 0.0291138    (9.06372,25.0443)-(90.8789,185.319) batch id : 0
[13,1] element, prob = 0.0237732    (391.875,-5.59308)-(438.926,71.8269) batch id : 0
[14,1] element, prob = 0.0227966    (118.997,57.38)-(168.867,176.986) batch id : 0
[15,1] element, prob = 0.0221405    (90.3955,88.3118)-(186.27,291.293) batch id : 0
[16,1] element, prob = 0.0216064    (97.4854,47.009)-(153.882,180.518) batch id : 0
[17,1] element, prob = 0.0205231    (430.547,7.44989)-(484.688,87.6777) batch id : 0
[18,1] element, prob = 0.0200195    (43.9893,57.5159)-(100.305,156.244) batch id : 0
[19,1] element, prob = 0.0186005    (383.174,0.543457)-(416.689,64.9431) batch id : 0
[20,1] element, prob = 0.0184479    (449.883,6.49884)-(505.312,82.7866) batch id : 0
[21,1] element, prob = 0.0161896    (451.816,-5.25342)-(505.957,48.3677) batch id : 0
[22,1] element, prob = 0.0154266    (41.6528,85.2322)-(107.717,246.005) batch id : 0
[24,0.00112915] element, prob = 0.999023    (0.368843,370.638)-(0.538473,371) batch id : 0.999023 WILL BE PRINTED!
[25,1] element, prob = 0.000323534    (659.355,0.495692)-(658.066,1.02181) batch id : 0.000296593
[26,0.00157833] element, prob = 0.999023    (0.593548,370.638)-(0.443115,371) batch id : 0.998047 WILL BE PRINTED!
[27,0.999023] element, prob = 0.000811577    (659.355,0.354167)-(660,0.146656) batch id : 0.000462532
[28,0.000743866] element, prob = 1    (0.176711,371)-(0.176711,370.638) batch id : 0.999023 WILL BE PRINTED!
[29,0.99707] element, prob = 0.00286102    (658.711,0.560794)-(659.355,0.356113) batch id : 0.0013361
[30,0.000576973] element, prob = 1    (0.278363,370.638)-(0.402203,370.638) batch id : 0.999023 WILL BE PRINTED!
[31,1] element, prob = 0.000303268    (660,0.170626)-(660,0.0911069) batch id : 0.000592709
[32,0.000272036] element, prob = 0.999023    (34.6504,32461.6)-(94.1399,32493.4) batch id : 1 WILL BE PRINTED!
[33,0.999023] element, prob = 0.000875473    (659.355,0.193182)-(660,0.135953) batch id : 0.00155258
[34,0.000751972] element, prob = 0.999023    (0.36664,371)-(0.214634,371) batch id : 0.999023 WILL BE PRINTED!
[35,1] element, prob = 0.000222683    (660,0.125338)-(659.355,0.511968) batch id : 0.000347137
[36,0.00183582] element, prob = 0.999023    (0.709991,370.638)-(0.571518,370.638) batch id : 0.998047 WILL BE PRINTED!
[37,1] element, prob = 0.000445366    (659.355,0.257399)-(659.355,0.217595) batch id : 0.000537872
Segmentation fault (core dumped)

 

0 Kudos
Rozeboom__Niels
Beginner
1,092 Views

it is still a problem under version: 2018.5.445

 

I am running following command:

./armv7l/Release/end2end_video_analytics_ie  -m ~/Downloads/inference_engine_vpu_arm/deployment_tools/model_optimizer/mobilenet-ssd.xml -d MYRIAD -i  /dev/video0

and then somewhere when the camera probably detects an object I get this error:

Segmentation fault
 

a .h264 video was still being recording, but without detection boxes though.

 

0 Kudos
Reply