Skip to content

Unsupported situations for loading "Sum" layer using readNetFromTensorflow #19512

@Crayon-new

Description

@Crayon-new
System information (version)
  • OpenCV => 4.5.1
  • Operating System / Platform => Windows 64 Bit
  • Compiler => Visual Studio 2019
Detailed description

I am trying to use function "readNetFromTensorflow()" in dnn module to load a pb model. But I got the error.
SY6M5JX$ NVR91)T)A B$%L
The structure around is import/layer2/sum is
~DH 4(GU)J4OS{$}6BJ}Q
I read the source code and found when the parameter "reduction_indices" is -1 or 3, the "Sum" layer won't be added to "layer_id". So its next layer can't find the corresponding input layer. Is that mean opencv/dnn dose not support for loading such "Sum" layer ?

Can anyone help me ?

Steps to reproduce

The full Code is

#include <fstream>
#include <sstream>
#include <opencv2/dnn.hpp>

using namespace cv;
using namespace dnn;
int main(int argc, char** argv)
{
	String modelPath = "3dssdOptimize1.pb";
	Net net = readNetFromTensorflow(modelPath);
	std::vector<cv::String> layerNames = net.getLayerNames();
	return 0;
}
Issue submission checklist
  • I report the issue, it's not a question
  • I checked the problem with documentation, FAQ, open issues,
    forum.opencv.org, Stack Overflow, etc and have not found solution
  • I updated to latest OpenCV version and the issue is still there
  • There is reproducer code and related data files: videos, images, onnx, etc

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions