-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Problem with Proposal Layer #219
Comments
Which version of caffe are you using. In the latest caffe 'param_str_' is not implemented this way in the python layer. |
Hi, |
@amrege @karaspd I solved this problem by forking the project py-faster-rcnn. It works with python 3 and should work with python 2 but i haven't tested it I have also added the layers as a PR to the official caffe but it's still pending . |
Thank you @amrege I fixed it by modifying param_str_ to param_str . (in latest version of caffe it was defined param_str) |
@karaspd, hi , i have the same problem, and i modified param_str_ to param_str only in proposal_layer.py, it doesn't work, please do me a favor |
@karaspd , hi I have the same problem with wuyuzaizai. I am still having the problem despite doing the change of param_str_ to param_str in lib/rpn/proposal_layer.py I1225 15:12:20.765244 2063896576 net.cpp:408] proposal -> rois Appreciate if anyone can help with the fix. |
@pchankh and @wuyuzaizai Hi, I do not have my codes right now. But, I guess probably param_str_ might be used in another files as well. You can check it with ack-grep, if you are working with linux machine. sudo apt-get install ack-grep. Then find in which other files param_str_ presents. |
@karaspd I think those are the files... |
@karaspd After making changes in all mentioned files, I am getting below error. Please help. |
I updated below two files also. I used ack-grep for search param_str_. but no success. |
@saranaws07 I was running into similar issues with CUDA 8.0 and cuDNN 5.1 and followed the instructions in this comment in issue 237 by @manipopopo. From there I was getting the same KeyError: '1' problem, and realized that cfg_key was not getting set to TRAIN or TEST in self.phase. If you just want to run the demo, you can change it in proposal_layer.py manually: #cfg_key = str(self.phase) # either 'TRAIN' or 'TEST' cfg_key = 'TEST' That worked fine for me in terms of executing the demo script, however it will break when you try and train a new model. As an edit, if you want to fix this permanently, you can change caffe-fast-rcnn/include/caffe/layers/python_layer.hpp and rather than removing this line, edit it to: self_.attr("phase") = (this->phase_); I haven't tested this extensively, so I'm not sure if that will break anything else long term. |
@smfullman Can you please tell us which file has this cfg_key ?? |
@mdadhich yes, that was changed in the lib/rpn/proposal_layer.py file on line 64 in the master branch. |
I tried this, it didn't work for me, @smfullman, I have given full description of my problem #494, have a look, if you have any other suggestion. |
@smfullman , @mdadhich , The phase in Caffe is no longer string 'TRAIN' or 'TEST'. It is 0(TRAIN) or 1(TEST) now. So just modify
to
can solve this issue. |
Fixed error: 1. AttributeError: 'ProposalLayer' object has no attribute 'param_str_' 2. pre_nms_topN = cfg[cfg_key].RPN_PRE_NMS_TOP_N, KeyError: '1' 3. cached dataset not removed error, which will cause the test phase accuracy calculation fail Reference: rbgirshick#219 We need to manually remove the cached dataset in data/cache and data/VOCdevkit0712/annotations_cache when you change the train or test list in data/VOCdevkit0712/VOC0712/ImageSets/Main/ Current still facing issue I0530 09:49:44.784348 8794 sgd_solver.cpp:144] Iteration 80, lr = 0.0005 F0530 09:50:07.775352 8794 io.cpp:87] Check failed: proto.SerializeToOstream(&output) *** Check failure stack trace: *** Aborted (core dumped) Signed-off-by: Huaqi Fang <[email protected]>
if you just want to run the domo,try to modify the file proposal_layer.py in line 65 to line 68 like this: |
I sovle this problem by the follow steps: |
Hi,
I am having trouble figuring out how to fix the following problem.
Traceback (most recent call last):
File "./tools/demo.py", line 135, in
net = caffe.Net(prototxt, caffemodel, caffe.TEST)
File "/home/ubuntu/merge/new/py-faster-rcnn/tools/../lib/rpn/proposal_lay
print "\n\n", self.param_str_,"\n\n"
AttributeError: 'ProposalLayer' object has no attribute 'param_str_'
the proposal_layer file is in rpn.
The text was updated successfully, but these errors were encountered: