Article ID: 000093400 Content Type: Product Information & Documentation Last Reviewed: 06/22/2023

Is It Possible to Run OpenCV Functions with Intel® Neural Compute Stick 2 (NCS2)?

BUILT IN - ARTICLE INTRO SECOND COMPONENT
Summary

NCS2 can only run the OpenCV DNN module.

Description

Unable to determine how to run OpenCV functions with NCS2.

Resolution

NCS2 cannot be used to run OpenCV's regular functions. It can only infer Deep Learning network (Intermediate Representation) via the Inference Engine backend of the DNN module.

 

#Load model
net = cv2.dnn.readNetFromModelOptimizer(model.xml, model.bin)

 

#Specify the target device as Myriad for NCS2
net.setPreferableTarget(cv2.dnn.DNN_TARGET_MYRIAD)

 

#Specify the target backend for Inference Engine
net.setPreferableBackend(cv2.dnn.DNN_BACKEND_INFERENCE_ENGINE)

Related Products

This article applies to 1 products