I trained a Detectron model with my custom dataset.
Model Name - e2e_faster_rcnn_R-101-FPN.yaml
number of class in Dataset - 56
It worked completely fine.
Then I convert the model in caffe2 using the script "convert_pkl_to_pb.py -- device 'cpu' "
it generates 3 file
model_init.pb
model.pb
param_init_net.pbtxt
then I go for inference with caffe2. The script for inference is given bellow
There is a mismatch in the result of Caffe2 and Detectron inference.
Number of bounding box predicted in both the Images is not always the same
Bounding box labels is not always the same
The score of the bounding box is not the same, not even approximately equal
Caffe2 Result
Detectron Result
Another way of looking into the issue is while model conversation if we pass any input Image then also Model conversion failed due to a mismatch in the result.
I trained a Detectron model with my custom dataset. Model Name - e2e_faster_rcnn_R-101-FPN.yaml number of class in Dataset - 56 It worked completely fine.
Then I convert the model in caffe2 using the script "convert_pkl_to_pb.py -- device 'cpu' " it generates 3 file
then I go for inference with caffe2. The script for inference is given bellow
start of the script
caffe2_inference.txt
End of scripts of script
There is a mismatch in the result of Caffe2 and Detectron inference.
Caffe2 Result
Detectron Result
Another way of looking into the issue is while model conversation if we pass any input Image then also Model conversion failed due to a mismatch in the result.
Script for Model conversation
python tools/convert_pkl_to_pb.py --cfg configs/getting_started/DEO_e2e_faster_rcnn_R-101-FPN.yaml \ --device cpu --out_dir /home/rahdas/temp/model/deo/cpu --test_img /datagpu/Detectron_dataset/DEO/testData/20180412_104410.jpg
python --version
output: Python 3.6.7Why Caffe2 And Detectron Result are not exactly Equal? Is there anything I am missing ?? Kindly help me to resolve the issue.