Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rfcn convert_model.py problem #9

Open
wushilian opened this issue Nov 12, 2018 · 8 comments
Open

rfcn convert_model.py problem #9

wushilian opened this issue Nov 12, 2018 · 8 comments

Comments

@wushilian
Copy link

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.

@moyans
Copy link

moyans commented Dec 1, 2018

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

@makefile
Copy link
Owner

makefile commented Dec 3, 2018

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

@lucasjinreal
Copy link

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
Copy link

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.

@makefile
Copy link
Owner

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

@lucasjinreal
Copy link

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

@SuperPowerLF2
Copy link

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

@lucasjinreal
Copy link

@SuperPowerLF2 No idea so far.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants