frcnn icon indicating copy to clipboard operation
frcnn copied to clipboard

rfcn convert_model.py problem

Open wushilian opened this issue 7 years ago • 8 comments

I can train the rfcn_res50,but when I run the convert_model.py,I got a problem:"Key error,bbox_pred_pre",And there isn't 'bbox_pred_pre' layer in test.protext.

wushilian avatar Nov 12 '18 04:11 wushilian

@makefile Traceback (most recent call last): File "/data/code/caffe/convert_model.py", line 91, in (net.params['bbox_pred'][0].data * stds[:, np.newaxis]) KeyError: 'bbox_pred' I got a problem too,I just comment this line of code.

moyans avatar Dec 01 '18 04:12 moyans

@moyans There is no need run the convert_model.py since bbox unnormalize is done at test time in the C++ code.

makefile avatar Dec 03 '18 05:12 makefile

I have trained rfcn model and bbox accuracy got 97%, but when inference got no result, I am not convert model..... with:

BUILD=build/examples/FRCNN/demo_frcnn_api.bin

$BUILD --gpu $gpu \
       --model examples/FRCNN/rfcn-res50-voc/test_merged-atrous.proto \
       --weights examples/FRCNN/snapshot/rfcn-ohem-soft-nms-res50-voc_iter_80000.caffemodel \
       --default_c examples/FRCNN/config/voc_config.json \
       --image_dir examples/images/  \
       --out_dir examples/FRCNN/results/

lucasjinreal avatar Aug 13 '19 03:08 lucasjinreal

Output Dir Is : examples/FRCNN/results/
I0813 11:08:07.946373 14934 demo_frcnn_api.cpp:70] 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Demo for cat gray.jpg
I0813 11:08:08.044909 14934 demo_frcnn_api.cpp:75] Predict cat gray.jpg cost 94.1493 ms.
I0813 11:08:08.044935 14934 demo_frcnn_api.cpp:76] There are 0 objects in picture.
I0813 11:08:14.342118 14934 demo_frcnn_api.cpp:70] 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Demo for cat.jpg
I0813 11:08:14.392055 14934 demo_frcnn_api.cpp:75] Predict cat.jpg cost 45.6962 ms.
I0813 11:08:14.392086 14934 demo_frcnn_api.cpp:76] There are 0 objects in picture.
I0813 11:08:26.512833 14934 demo_frcnn_api.cpp:70] 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Demo for cat_gray.jpg
I0813 11:08:26.561453 14934 demo_frcnn_api.cpp:75] Predict cat_gray.jpg cost 44.95 ms.
I0813 11:08:26.561476 14934 demo_frcnn_api.cpp:76] There are 0 objects in picture.

lucasjinreal avatar Aug 13 '19 03:08 lucasjinreal

@jinfagang Try lower the threshold, if there is no object, that may be caused by wrong labels used for training.

makefile avatar Aug 13 '19 03:08 makefile

@makefile Just simply using VOC, this data is veryfied training with zf-fasterrcnn, it worked. And the network loaded and trained, but inference got no result. Also, when I convert model it says no layer called bbox_pred which this issue got.

So I don't convert directly inference using demo_frcnn_api, it gots no result, not sure what's the problem, the threshold is 0.3 is already low enough.

lucasjinreal avatar Aug 13 '19 05:08 lucasjinreal

@jinfagang I had the same problem .Have you solved it?

SuperPowerLF2 avatar Aug 28 '19 03:08 SuperPowerLF2

@SuperPowerLF2 No idea so far.

lucasjinreal avatar Aug 28 '19 05:08 lucasjinreal