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.

stream_infer.py

idata
Employee
767 Views

I'm trying to run ../Caffe/SSD_MobileNet with stream_infer.py

 

Error message:

 

index 1000 is out of bounds for axis 0 with size 707

 

Output thread terminating

 

I am having problems I think with SSD_MobileNet >> categories.txt & stat.txt

 

For stat.tx I got:

 

0.40787054 0.45752458 0.48109378

 

0.00392157 0.00392157 0.00392157

 

But I think it is wrong

 

Can anybody advice?

 

Or

 

Has good link which refers to the Movidius NC Toolkit User Guide and provides the tools and examples to create these files?

 

Or

 

Has anybody got working stat numbers? With correct Categories.txt?

 

Many Thanks in advance for Helping

0 Kudos
4 Replies
idata
Employee
543 Views

Hi @VictoryKnocks

 

The "index 1000 is out of bounds for axis 0 with size 707" error is given because mobilenet SSD is trained on only 20 classes, while others (like squeezenet and googlenet) are trained on about 1000. It would be easiest to modify mobilenetSSD to read from a video instead of an image. See

 

Please let me know if you have any further questions!

 

Regards,

 

Sahira
0 Kudos
idata
Employee
543 Views

Hi @Sahira_at_Intel

 

So I could just change line

 

199 infer_image = cv2.imread(IMAGE_FULL_PATH)

 

to

 

199 infer_image = cv2.VideoCapture(0)

 

And this would capture USB webcam?

0 Kudos
idata
Employee
543 Views

@Sahira_at_Intel

 

I run above edit and get this error:

 

Traceback (most recent call last):

 

File "run2.py", line 216, in

 

sys.exit(main())

 

File "run2.py", line 203, in main

 

run_inference(infer_image, graph)

 

File "run2.py", line 38, in run_inference

 

resized_image = preprocess_image(image_to_classify)

 

File "run2.py", line 161, in preprocess_image

 

img = cv2.resize(src, (NETWORK_WIDTH, NETWORK_HEIGHT))

 

TypeError: src is not a numpy array, neither a scalar
0 Kudos
idata
Employee
543 Views

@Sahira_at_Intel

 

I can edit video_objects.py to allow me to use usb webcam with ssd_mobilenets instead of video mp4 file

 

However editing run.py in ssd_mobilenets folder in same way gives error

 

What am I doing wrong?

0 Kudos
Reply