Quantcast
Channel: OpenCV Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 1117

DNN.net.forward() in Android

$
0
0
String model = getPath("model.net", getApplicationContext()); net = Dnn.readNet(model); Mat frame = inputFrame.rgba(); // Imgproc.cvtColor(frame, frame, Imgproc.COLOR_RGBA2RGB); // Forward image through network. Imgproc.resize(frame,frame,new Size(500,441)); Mat blob = Dnn.blobFromImage(frame, IN_SCALE_FACTOR, new Size(IN_WIDTH, IN_HEIGHT), new Scalar(MEAN_VAL, MEAN_VAL, MEAN_VAL), /*swapRB*/true); net.setInput(blob); Mat detections = net.forward() following is the issue I get at net.forward() Assertion failed (inputs[0] == inputs[i]) in virtual bool cv::dnn::EltwiseLayerImpl::getMemoryShapes(const std::vector>&, int, std::vector>&, std::vector>&) const, file /build/3_4_pack-android/opencv/modules/dnn/src/layers/eltwise_layer.cpp,

Viewing all articles
Browse latest Browse all 1117