Skip to content

load onnx model error #16235

@VictoryDong

Description

@VictoryDong
System information (version)
  • OpenCV => 4.2
  • Operating System / Platform => Windows 64 Bit
  • Compiler => Visual Studio 2017
Detailed description

error :

OpenCV(4.2.0) C:\build\master_winpack-build-win64-vc15\opencv\modules\dnn\src\dnn.cpp:4559: error: (-215:Assertion failed) inputs.size() in function 'cv::dnn::dnn4_v20191202::Layer::getMemoryShapes'
when load a onnx model.

This is my model structure diagram:png
I can't figure out which node would have no input information.

Steps to reproduce
#include <iostream>
#include "opencv2/opencv.hpp"

int main()
{
	try {
		auto net = cv::dnn::readNetFromONNX("H:\\store\\spk\\model_fixed.onnx");

	}
	catch (cv::Exception &e) {
		std::cout << e.msg << std::endl;

	}
	catch (std::exception & e) {
		std::cout << e.what() << std::endl;
	}
}

this is my model: model_fixed.zip

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions