Using multiple Myriad X Chips with OpenCV

Hi,
I have 3 Intel Myriad X Chips connected to my system.
I want to run inference of the same model now across all 3 chips.
I am doing this currently by simply starting 3 threads, each creating a model for themselves:

auto dm = cv::dnn::DetectionModel(model_path, config_path);
dm.setPreferableBackend(cv::dnn::DNN_BACKEND_INFERENCE_ENGINE);
dm.setPreferableTarget(cv::dnn::DNN_TARGET_MYRIAD);

My question: Does OpenCV automatically load each model on a separate Myriad X Chip?

My colleague had a quick lock at the ngraph source code, and checking the OpenVINO docs suggests, that loading a model automatically checks to load the model onto the chip with the lowest number of already loaded models. That would mean that indeed, the models are properly spread across the chips.

A quick FPS counter for the inference confirmed this.

1 Like