Getting Access violation reading location while reading readFromModelOptimizer OR readNet


I installed Intel® OpenVINO™ toolkit 2020 1 version, and from open_model_zoo downloaded the following two files:


OpenVINO installed successfully and when running the demos it runs without error. And added all necessary paths to the environment variable e.g:

C:\Program Files (x86)\IntelSWTools\openvino\deployment_tools\inference_engine\bin\intel64\Release
C:\Program Files (x86)\IntelSWTools\openvino_2020.1.033\opencv\bin
C:\Program Files (x86)\IntelSWTools\openvino_2020.1.033\deployment_tools\ngraph\lib
C:\Program Files (x86)\IntelSWTools\openvino\inference_engine\external\tbb\bin

And then for a test, I first run a simple program which opens (laptop camera as well as a video file) and read frames and shows it:

void main ()
    cv::Mat frame;
    cv::VideoCapture capture;
    int type = 0;
    if (type == 0) {"C:/video/768x576.avi");
    else if (type == 1) {;

    cv::namedWindow("video", cv::WINDOW_FREERATIO);
    while ( {
        imshow("video", frame);
        cv::waitKey((type == 0 ? int(1000 / capture.get(cv::CAP_PROP_FPS)) : 1));

All works well. But when I read net, then throws an exception, code + error:

std::string modelName = "person-vehicle-bike-detection-crossroad-0078"; 
cv::Size size(1024, 1024); 
string basePath = "C:/models/";
string xml = basePath + modelName + ".xml";
string bin = basePath + modelName + ".bin";
cv::dnn::Net net = cv::dnn::Net::readFromModelOptimizer(xml, bin); // error line
//cv::dnn::Net net = cv::dnn::readNet(bin, xml); // it is also an error line


Exception thrown at 0x00007FFEBCA412D4 (ntdll.dll) in cloths_detector.exe: 0xC0000005: Access violation reading location 0x0000000000000004.

So I don't know where I am wrong, and how to solve this error? Thanks!

asked on Stack Overflow Feb 18, 2020 by Bahramdun Adil

0 Answers

Nobody has answered this question yet.

User contributions licensed under CC BY-SA 3.0