Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

dnn tensorflow faster_rcnn_resnet50_coco model error when predict

Following the page https://github.com/opencv/opencv/wiki/TensorFlow-Object-Detection-API My step is :

  1. train model done.
  2. run export_inference_graph.py to got frozen_inference_graph.pb
  3. test to load frozen_inference_graph.pb and predict by tensorflow then got image like this!(make sure pb is ok!)image description
  4. run tf_text_graph_faster_rcnn.py to gen graph.pbtxt
  5. run opencv dnn to load model(done) then to predict a image and the error come out. [org.opencv.core.CvException: cv::Exception: OpenCV(4.1.0) C:\opencv\opencv4.1.0\sources\modules\dnn\src\layers\detection_output_layer.cpp:706: error: (-215:Assertion failed) prior_height > 0 in function 'cv::dnn::DetectionOutputLayerImpl::DecodeBBox' ]
  6. After that to try the Troubleshooting's methods about optimize_for_inference.py or graph_transforms got same error。

Who can have a similar experience, can guide me, thank you (Once completed ssd_mobilenet_v2_coco by same way)

dnn tensorflow faster_rcnn_resnet50_coco model error when predict

Following the page https://github.com/opencv/opencv/wiki/TensorFlow-Object-Detection-API My step is :

  1. train model done.
  2. run export_inference_graph.py to got frozen_inference_graph.pb
  3. test to load frozen_inference_graph.pb and predict by tensorflow then got image like this!(make sure pb is ok!)image description
  4. run tf_text_graph_faster_rcnn.py to gen graph.pbtxt
  5. run opencv dnn to load model(done) then to predict a image and the error come out. [org.opencv.core.CvException: cv::Exception: OpenCV(4.1.0) C:\opencv\opencv4.1.0\sources\modules\dnn\src\layers\detection_output_layer.cpp:706: error: (-215:Assertion failed) prior_height > 0 in function 'cv::dnn::DetectionOutputLayerImpl::DecodeBBox' ]
  6. After that to try the Troubleshooting's methods about optimize_for_inference.py or graph_transforms got same error。

Who can have a similar experience, can guide me, thank you (Once completed ssd_mobilenet_v2_coco by same way)