Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

net can't forward ? #127

Closed
cuixing158 opened this issue May 27, 2019 · 4 comments
Closed

net can't forward ? #127

cuixing158 opened this issue May 27, 2019 · 4 comments

Comments

@cuixing158
Copy link

my envs: openVINO2019.1.148+win10+VS2015
when i use face-detection-adas-0001.xml,face-detection-adas-0001.bin model (from here)to test correctness,the facemodel can't forward,throw a exception, any body give a advice? thanks

        Size model_size = Size( 672, 384);
	string xmlFile = "D:\\Downloads\\face-detection-adas-0001.xml"; // 1*3*384*672  N*C*H*W输入
	string model = "D:\\Downloads\\face-detection-adas-0001.bin";
	Net facemodel = readNetFromModelOptimizer(xmlFile, model);
	facemodel.setPreferableBackend(DNN_BACKEND_INFERENCE_ENGINE);
	facemodel.setPreferableTarget(DNN_TARGET_CPU);

	// Process frames.
	Mat frame;
	VideoCapture cap(0);
	while (waitKey(1)<0)
	{
		cap >> frame;
		Mat blob;
		 blobFromImage(frame, blob, 1, model_size);
		 facemodel.setInput(blob);
		 Mat outs = facemodel.forward(); // here is exception, 0x00007FFE2FB7D4F6 (cpu_extension_avx2.dll)处(位于 OpenVINO.exe 中)引发的异常: 0xC0000005: 读取位置 0x000000000000000F 时发生访问冲突。如有适用于此异常的处理程序,该程序便可安全地继续运行。

		for (size_t i = 0; i < outs.rows; i++)
		{
			// process ...

		}
		imshow("", frame);
	}
@dkurt
Copy link
Contributor

dkurt commented May 27, 2019

@cuixing158, Am I right that you applied some changes described in opencv/opencv#14409 (comment)?

If so, please try to not rename the library but rebuild it.

@cuixing158
Copy link
Author

@dkurt thanks give me a advice, but it seems that the question I asked has a little relationship with what you said. My cpu supports the avx2 instruction set. According to the steps you gave, the same exception still occurs.
The exception window will pop up,it said "0x00007FFE2FB7D4F6 (cpu_extension_avx2.dll)处(位于 OpenVINO.exe 中)引发的异常: 0xC0000005: 读取位置 0x000000000000000F 时发生访问冲突。如有适用于此异常的处理程序,该程序便可安全地继续运行。"
( translation: Exception thrown at 0x00007FFE2FB7D4F6 (cpu_extension_avx2.dll) (located in OpenVINO.exe): 0xC0000005: An access violation occurred while reading location 0x000000000000000F. If there is a handler for this exception, the program can continue to run safely.)
Another curious question is, Debug mode can lead to this exception, Release mode is OK,why ?

@cuixing158
Copy link
Author

Another question is, isn't it the name of the specify layer in the forward parameter not working?
such as:
Mat features = facemodel.forward(), myLayerName must the last layer name?
That is, OpenVINO can't support extracting the middle layer features of the network?

@IRDonch
Copy link

IRDonch commented Sep 2, 2019

It's very unlikely that this is an issue with the model. A crash means that the problem is in either OpenCV's DNN module or Inference Engine. I would suggest you try to replicate this with the Inference Engine API. If you can get it to crash, file a bug against Inference Engine. If you cannot, but it still crashes if you use the OpenCV API, file a bug against OpenCV.

@IRDonch IRDonch closed this as completed Sep 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants