In OpenCV3.4.3 use YOLOv3 model emerging questions : This is my code: String modelConfiguration = "models/digital.cfg"; String modelWeights = "models/digital.weights"; fprintf(fp, "->readNetFromDarknet Start.\n"); Net net = readNetFromDarknet(modelConfiguration, modelWeights); net.setPreferableBackend(DNN_BACKEND_OPENCV); net.setPreferableTarget(DNN_TARGET_CPU);; Mat blob,Input; resize(_srcImg,Input,Size(416, 416)); blobFromImage(Input, blob, 1/255.0, cvSize(416, 416), Scalar(0,0,0), true, false); net.setInput(blob); vector<mat> outs; net.forward(outs, GetOutputsNames(net)); The following errors occur when running to "net.forward(outs, GetOutputsNames(net));": OpenCV(3.4.3) F:\opencv\opencv-3.4.3\opencv\sources\modules\core\src\matrix.cpp:367: error: (-215:Assertion failed) u != 0 in function 'cv::Mat::create';
The path is right. Sometimes it can be identified, sometimes not. Please help me see why. Thank you.