Does dnn opencv c++ support layer:DepthwiseConv2dNative
i have a TensorFlow model(.pb)for semantic segmentation, that contains a layer: DepthwiseConv2dNative . i can read the model using net.forward() in python, and the result are accurate.But, with net.forward() in c++, all results are Black. After some investigations, the results after DepthwiseConv2dNative are all the same with different inputs. does dnn opencv C++ support this layer: DepthwiseConv2dNative ? code in c++ used too read the model:
Mat img = imread("Path to image");
img.convertTo(img, CV_32F);
String model = ("Path to model");
Net net = readNetFromTensorflow(model);
Scalar mean = (-1.0, -1.0, -1.0); float scale = 0.007843137718737125;
Mat blob = blobFromImage(img, scale, Size(250, 250), mean, false, false, CV_32F);
net.setInput(blob);
Mat seg = net.forward();
Unfortunately i can't share the model.
opencv version ?
(there is support for depthwise 2d convolution)
at least you could show us the resp. tf code, that built this model
-Opencv version: Opencv(4.4.0) Steps : 1-Export the model, i used this : https://github.com/tensorflow/models/...
2-For optimizing the model i used this Transformation: --in_graph="path to model" \ --out_graph="path" --inputs='ImageTensor' --outputs='SemanticPredictions' --transforms=' remove_nodes(op=Identity) fold_constants() fold_batch_norms fold_old_batch_norms sort_by_execution_order'
sorry, but that's all quite useless. needed would be the code that builds your model, not the code, that exports it.
is it this ?
also, what's the error msg ?