-
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
How to setup with CPU ONLY mode #123
Comments
It is definitely possible but not recommended. CPU version is almost two magnitude slower than GPU as I tested a few months ago. Here is a quick list of modifications.
|
I made the changes you mentioned. When I try to build the cython modules, i.e. after running
I get: python setup.py build_ext --inplace |
As I said, you will need to ignore GPU nms code. You can do so by removing 'nms.gpu_nms' module in ./libs/setup.py. |
@eakbas, I did everything as @happyharrycn recommended, including his last recommendation, but, anyway, I got the same error message as you did. But after that I removed line "CUDA = locate_cuda()" in ./lib/setup.py, after that I executed "cd $FRCN_ROOT/lib; make" and it went without error messages. |
cd $FRCN_ROOT/lib, modify setup.py,annotate these code that are correlative GPU, then make ... ['nms/nms_kernel.cu', 'nms/gpu_nms.pyx'],library_dirs=[CUDA['lib64']],libraries=['cudart'],language='c++',runtime_library_dirs=[CUDA['lib64']],# this syntax is specific to this build system# we're only going to use certain compiler args with nvcc and not with# gcc the implementation of this trick is in customize_compiler() belowextra_compile_args={'gcc': ["-Wno-unused-function"],'nvcc': ['-arch=sm_35','--ptxas-options=-v','-c','--compiler-options',"'-fPIC'"]},include_dirs = [numpy_include, CUDA['include']]) |
@happyharrycn @eakbas @SrCMpink @dumka F0825 21:46:15.782125 7066 common.cpp:55] Cannot use GPU in CPU-only Caffe: check mode. All modifications are made by me given in the post. Please suggest some solution. |
@shubh-agrawal Are you running |
No I haven't. I tried it out but came up with this error now, [libprotobuf ERROR google/protobuf/text_format.cc:245] Error parsing text-format caffe.NetParameter: 350:21: Message type "caffe.LayerParameter" has no field named "roi_pooling_param". Any idea about this? |
Can you try for --net zf and update the results? |
@shubh-agrawal That looks to me like the caffe-fast-rcnn submodule is on the wrong branch. If you cd into that directory and run |
You guys solved the problem. Thank you guys. The demo worked seamlessly. @mcdickenson @sandeeppalakkal But I would update one more modification, here, so that other fellows following similar problem could follow up. There is nms_wrapper.py which still uses nms_gpu module. Hence, it was necessary to comment out piece of code related to that in $FRCN_ROOT/lib/fast_rcnn/nms_wrapper.py. I wonder, why not any documentation with much needed modification for ONLY_CPU is found over the air. |
@mcdickenson I all the things mentioned above but I got the floowing error
How should I go about this? |
@divamgupta I'm not sure, I haven't encountered that before. It might be worth opening a separate issue for that. Are you building from master? |
@divamgupta I had encountered this error before. It occurs if you are on master branch of caffe-fast-rcnn. Please checkout to other branch that will be enlisted in |
I used the faster-rcnn branch. This problem is only arising in the zf model only. vgg16 is working fine. |
@divamgupta |
The meaning of `git checkout faster-rcnn` is to checkout the "faster-rcnn"
branch. See the above discussion about the issue on the master branch.
…On Wed, Feb 22, 2017 at 12:06 PM IvyGongoogle ***@***.***> wrote:
@mcdickenson <https://github.com/mcdickenson> @shubh-agrawal
<https://github.com/shubh-agrawal> @sandeeppalakkal
<https://github.com/sandeeppalakkal> when I run 'tools/demo.py', I get
the same error
[libprotobuf ERROR google/protobuf/text_format.cc:245] Error parsing
text-format caffe.NetParameter: 350:21: Message type "caffe.LayerParameter"
has no field named "roi_pooling_param". WARNING: Logging before
InitGoogleLogging() is written to STDERR F0222 14:23:16.447522 29479
upgrade_proto.cpp:88] Check failed: ReadProtoFromTextFile(param_file,
param) Failed to parse NetParameter file:
/home/ztgong/objectDetectionAndRecognition/py-faster-rcnn/models/pascal_voc/VGG16/faster_rcnn_alt_opt/
faster_rcnn_test.pt *** Check failure stack trace: ***
but I do not understand the meaning of git checkout faster-rcnn' how to
solve this error?
thankyou very much!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#123 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABC0-K3bjhUfm8PPWHDNRbIQx-qY9MTXks5re9dYgaJpZM4H2FbP>
.
|
@happyharrycn @dumka @SrCMpink @shubh-agrawal @eakbas |
Hey guys, I found this solution works.
|
@GloryDream |
@Anhaoxu |
@divamgupta could you solve it? I get a segmentation fault even when I don't specify |
for test, you just need too run './tools/demo.py --cpu'. |
How many seconds on average needed for CPU-run only on a single image,say of size (224,224) ? |
C:\Users\lenovo\Anaconda3\python.exe D:/tf-faster-rcnn-master/lib/setup.py error: no commands supplied I modified setup.py file ,but reported a new error |
after above changes I'm getting this: python setup.py build_ext --inplace When I executed pip install Cython it says: |
I'd like to install py-faster-rcnn in CPU ONLY mode. Is this possible? Which configuration files should I modify?
Thanks.
The text was updated successfully, but these errors were encountered: