Getting Access violation reading location while reading readFromModelOptimizer OR readNet
See original GitHub issueI installed Intel® OpenVINO™ toolkit 2020 1 version, and from open_model_zoo downloaded the following two files:
person-vehicle-bike-detection-crossroad-0078.bin
person-vehicle-bike-detection-crossroad-0078.xml
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 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) {
capture.open("C:/video/768x576.avi");
}
else if (type == 1) {
capture.open(0);
}
cv::namedWindow("video", cv::WINDOW_FREERATIO);
while (capture.read(frame)) {
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 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
Error:
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!
Issue Analytics
- State:
- Created 4 years ago
- Comments:10
Top Results From Across the Web
Getting Access violation reading location while ... - GitHub
I installed Intel® OpenVINO™ toolkit 2020 1 version, and from open_model_zoo downloaded the following two files: ...
Read more >How to solve "Access violation reading location" error in ...
I am getting the following runtime error in using OpenCV for grabcut. "Access violation reading location". What I am trying to do is...
Read more >Access violation reading location - CodeProject
Use the debugger: put a breakpoint on the line and when it gets hit look at the data: is it all valid? If...
Read more >I get an Access violation reading location when using ...
I am using mxCreateCharMatrixFromStrings in a C++ console app. I have read in the 'string' from a .mat file into a char *cData[10]...
Read more >Access violation reading location 0xFFFFFFFFFFFFFFFF.
Solved: The debug statement says nothing is wrong. This is Debug x64 mode in MSVS 2013. Here is the code Module Horn !...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Try this:
openvino\inference_engine\bin\intel64\Release
)or reinstall OpenVINO without GNA plugin (disable GNA component in installer).
Which CPU model do you have? (link on ark.intel.com is preferable)
@alalek Thank you so much!! Yes, it was the tick, now it works well, with both release and debugs mode, but in debug mode, it works very slow. And also now it works well with the OpenCV which builds by myself.
In the next release, it will be good to avoid this problem exist.
Thanks again!!