Intel® Neural Compute Stick 2 (Intel® NCS2) Temperature Reading with OpenVINO™ Toolkit

Documentation

Troubleshooting

000056795

06/26/2024

Below, you'll find a code snippet for reading the temperature on the Intel® Movidius™ Neural Compute Stick and Intel® Neural Compute Stick 2 using the OpenVINO™ Toolkit. This article assumes you have installed and verified the install of Intel® Distribution of OpenVINO™ Toolkit for use with Intel® Movidius™ Neural Compute Stick or Intel® Neural Compute Stick 2.


C++:

#include <inference_engine.hpp>
using namespace InferenceEngine;


Core ie;
auto networkReader = ie.ReadNetwork(model);
ExecutableNetwork executable_network = ie.LoadNetwork(networkReader, "MYRIAD");

float thermal= executable_network.GetMetric(METRIC_KEY(DEVICE_THERMAL)).as<float>();
std::cout << "DEVICE_THERMAL : " << std::to_string(thermal) << "\n";


Python:

from openvino.inference_engine import IECore   ie = IECore() net = ie.read_network(model, os.path.splitext(args.model)[0] + ".bin") exec_net = ie.load_network(network=net, num_requests=2, device_name="MYRIAD")   print("DEVICE_THERMAL : ", ie.get_metric(metric_name="DEVICE_THERMAL", device_name="MYRIAD"))

 

Note This article was written using the 2020.2 release of the Intel® Distribution of OpenVINO™ toolkit.