Ask Your Question

Revision history [back]

Tensorflow object detection has different results between Python and C++(OpenCV)

Hello, i trained a model by using TF OF API. Then, when i tested the model with Python and C++(OpenCV) codes linked below, i am getting different results. The results getting from Python is better than C++(OpenCV) results. What does cause this difference?

Python Test Code: https://github.com/vijaydwivedi75/Custom-Mask RCNN_TF/blob/master/mask_rcnn_eval.ipynb

C++(OpenCV) Test Code: https://github.com/spmallick/learnopencv/blob/master/Mask-RCNN/mask_rcnn.cpp

Trained Model and Sample Images: https://drive.google.com/open?id=18RaJfk6-DXfZJWEL61YdOAztoJxdUbua

I am getting .pb model from checkpoints by using this code: https://github.com/tensorflow/models/blob/master/research/object_detection/export_inference_graph.py

I am getting .pbtxt file by using this code: https://github.com/opencv/opencv/blob/master/samples/dnn/tf_text_graph_mask_rcnn.py

OpenCV Version: 4.2.0, Tensorflow Version using for train: 1.12.0

Thanks for your help.