Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

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.