You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Operating System / Platform => Ubuntu 16.04 64 Bit
Compiler => gcc (5.4)
Cuda 9.0
cudnn 7
Detailed description
I trained a Mask RCNN model(with Resnet50 backbone) by using a Tensorflow object detection API. I try to test the model with a C++ (OpenCV DNN) application and a c++ file(mask_rcnn.cpp)(https://github.com/spmallick/learnopencv/tree/master/Mask-RCNN), but the getConstBlob always drop this exception
~/mask-rcnn-cv$ ./mask_rcnn.out --image='/home/wangqianyun/mask-rcnn-cv/cars.jpg' ./mask_rcnn.outterminate called after throwing an instance of 'cv::Exception'
what(): OpenCV(4.0.0) /home/wangqianyun/opencv/modules/dnn/src/tensorflow/tf_importer.cpp:535: error: (-2:Unspecified error) Input [FirstStageFeatureExtractor/resnet_v1_50/resnet_v1_50/block3/unit_1/bottleneck_v1/conv2/Conv2D/paddings] for node [FirstStageFeatureExtractor/resnet_v1_50/resnet_v1_50/block3/unit_1/bottleneck_v1/conv2/SpaceToBatchND] not found in function 'getConstBlob'
-->
System information (version)
Detailed description
I trained a Mask RCNN model(with Resnet50 backbone) by using a Tensorflow object detection API. I try to test the model with a C++ (OpenCV DNN) application and a c++ file(mask_rcnn.cpp)(https://github.com/spmallick/learnopencv/tree/master/Mask-RCNN), but the getConstBlob always drop this exception
~/mask-rcnn-cv$ ./mask_rcnn.out --image='/home/wangqianyun/mask-rcnn-cv/cars.jpg' ./mask_rcnn.outterminate called after throwing an instance of 'cv::Exception'
what(): OpenCV(4.0.0) /home/wangqianyun/opencv/modules/dnn/src/tensorflow/tf_importer.cpp:535: error: (-2:Unspecified error) Input [FirstStageFeatureExtractor/resnet_v1_50/resnet_v1_50/block3/unit_1/bottleneck_v1/conv2/Conv2D/paddings] for node [FirstStageFeatureExtractor/resnet_v1_50/resnet_v1_50/block3/unit_1/bottleneck_v1/conv2/SpaceToBatchND] not found in function 'getConstBlob'
Steps to reproduce
replace
height_stride: 8
weight_stride: 8
to
height_stride: 16
weight_stride: 16
```
use tf_text_graph_mask_rcnn.py() to produce .pbtxt from .pb and .config
compile and run
g++ -std=c++11 -ggdb mask_rcnn.cpp -o mask_rcnn.out
pkg-config --cflags --libs /home/wangqianyun/opencv/build/unix-install/opencv4.pc
(cv) wangqianyun@wangqianyun-ThinkCentre-E73:~/mask-rcnn-cv$ ./mask_rcnn.out --image='/home/wangqianyun/mask-rcnn-cv/cars.jpg' ./mask_rcnn.out.cpp
//
```
The text was updated successfully, but these errors were encountered: