makefile / frcnn

Faster R-CNN / R-FCN :bulb: C++ version based on Caffe

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

rfcn convert_model.py problem

wushilian opened this issue · 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.

commented

@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 There is no need run the convert_model.py since bbox unnormalize is done at test time in the C++ code.

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/
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.

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

@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.

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

@SuperPowerLF2 No idea so far.