In this lab, we will run the Classfication and Object Detection sample applications with NCS2.
Follow the instruction of Steps for Intel® Neural Compute Stick 2 from the Install Intel® Distribution of OpenVINO™ toolkit for Linux* to setup the USB rules for NCS2.
Then check if the device is visible with lsusb:
lsusb
You will see message like below:
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 015: ID 03e7:2485
Here ID 03e7:2485 without a description string is the Movidius device.
Set target hardware as Intel® Movidius™ NCS with -d MYRIAD, remember to use FP16 datatype for MYRIAD plugin.
Run Classification Sample Application with NCS2:
cd /opt/intel/openvino_2021/deployment_tools/inference_engine/samples/python/classification_sample_async
python3 classification_sample_async.py \
-m /opt/intel/workshop/Squeezenet/FP16/squeezenet1.1_fp16.xml \
-i /opt/intel/workshop/smart-video-workshop/Labs/daisy.jpg \
-d MYRIAD \
--labels /opt/intel/workshop/smart-video-workshop/Labs/squeezetnet_label.txt
Run Object Detection Sample Application with NCS2:
cd /opt/intel/openvino_2021/deployment_tools/inference_engine/samples/python/object_detection_sample_ssd/
rm -f out.bmp
python3 object_detection_sample_ssd.py \
-m /opt/intel/workshop/Mobilenet-SSD-v1/FP16/mobilenet-ssd-v1-fp16.xml \
-i /opt/intel/workshop/smart-video-workshop/Labs/birds.jpg \
-d MYRIAD
eog out.bmp
To learn more about MYRIAD plugin, pleae refer to MYRIAD Plugin session on OpenVINO documentation.