(-215:Assertion failed) inputs.size() == requiredOutputs in function 'getMemoryShapes'

asked 2019-03-30 09:39:35 -0600

son gravatar image

updated 2019-03-30 11:41:20 -0600

berak gravatar image
List<Mat> outs = new ArrayList<>(2);
    List<String> outNames = new ArrayList<String>();
    outNames.add("feature_fusion/Conv_7/Sigmoid");
    outNames.add("feature_fusion/concat_3");
    net.forward(outs, outNames);

i used this code in eclipse and its run well, but after i convert it into android plateform i get error at this method:

public  void forward(List<Mat> outputBlobs, List<String> outBlobNames)
{
    Mat outputBlobs_mat = new Mat();
    //forward_4 give the error
    forward_4(nativeObj, outputBlobs_mat.nativeObj, outBlobNames);
    Converters.Mat_to_vector_Mat(outputBlobs_mat, outputBlobs);
    outputBlobs_mat.release();
    return;
}

here the full error

CvException [org.opencv.core.CvException: cv::Exception: OpenCV(4.0.1) /build/master_pack-android/opencv/modules/dnn/src/dnn.cpp:686: error: (-215:Assertion failed) inputs.size() == requiredOutputs in function 'getMemoryShapes'

i use same image run in eclipse. in android i convert from Bitmap format into Mat using Utils class. anyone please..

edit retag flag offensive close merge delete

Comments

opencv version ? (esp. the android one) ?

berak gravatar imageberak ( 2019-03-31 05:10:26 -0600 )edit
1

4.0.1. is it any change in this version? and i just checked my eclipse using 3.4.5 version.

son gravatar imageson ( 2019-03-31 05:22:17 -0600 )edit

ah, ok, was only asking because of a List<String> related bug in opencv 3.4.3 (does not seem to affect you)

berak gravatar imageberak ( 2019-03-31 05:58:06 -0600 )edit
1

lol, haha.. you just give me a fake hope..

son gravatar imageson ( 2019-03-31 06:06:42 -0600 )edit