Ask Your Question

Revision history [back]

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

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..

click to hide/show revision 2
retagged

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

berak gravatar image

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

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..

click to hide/show revision 3
retagged

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

berak gravatar image

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

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..