faster rcnn cuda 10
2018.10.06 00:09
https://gist.github.com/acmiyaguchi/bc535ba23eabd3564edd73e491763d50
이 사람의 rebased 를 download 하고 나서 아래처럼 patch
Instructions
- install
cuda-9.0
(https://developer.nvidia.com/cuda-toolkit-archive) - install
cudnn-7
(https://developer.nvidia.com/cudnn) - install dependencies for caffe
- see the caffe installation guide [1] and wiki page [2]
- install
boost-1.65
or higher (http://www.boost.org/users/history/version_1_65_1.html) [3] - update
caffe-fast-rcnn
- Easiest way is to use a rebased branch on
BVLC/master
. See the notes below if you would rather merge the changes yourself.
$ cd $FRCN_ROOT/caffe-fast-rcnn $ git remote add acmiyaguchi https://github.com/acmiyaguchi/caffe-fast-rcnn.git $ git checkout acmiyaguchi/faster-rcnn-rebased
- optional: rebase against upstream master
$ git remote add caffe https://github.com/BVLC/caffe.git $ git rebase caffe/master
- Easiest way is to use a rebased branch on
- set variables in
Makefile.config
USE_CUDNN := 1
WITH_PYTHON_LAYER := 1
OPENCV_VERSION := 3
CUSTOM_CXX := g++-6
- I symlink
gcc-6
andg++-6
togcc
andg++
in/usr/local/cuda-9-0/bin/
instead of this setting, but either should work
- I symlink
- remove
compute_20
fromCUDA_ARCH
since it's been depreciated incuda-9-0
- add
hdf5
for linking since it's been renamed in 17.10INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/include/hdf5/serial/
LIBRARY_DIRS := $(PYTHON_LIB) /usr/lib/x86_64-linux-gnu/hdf5/serial/
- build caffe
make -j${N_THREADS} all && make pycaffe
- change
self.param_str_
toself.param_str
in$FRCN_ROOT/lib/rpn/proposal_layer.py
.- see
rebased-caffe.patch
below for the full diff
- see
- validate that
./tools/demo.py
works
Notes on Rebasing
BVLC/caffe
and rbgirshick/caffe
have diverged since this workaround [4] in March 2017. I've rebased the faster-rcnn
patchset against the master caffe branch for convenience. [5]
This branch should merge cleanly into BVLC/caffe
with the exception of the license.
If you rather merge the upstream changes yourself, the patch in [6] should outline the changes you need afterwards. -X theirs
may not be the best merge policy. In particular, changes to the src/caffe/caffe.proto
schema will overwrite the ROIPoolingParameter
.
rebased-caffe.patch
diff --git a/lib/rpn/proposal_layer.py b/lib/rpn/proposal_layer.py
index b157160..e6d28cc 100644
--- a/lib/rpn/proposal_layer.py
+++ b/lib/rpn/proposal_layer.py
@@ -23,7 +23,7 @@ class ProposalLayer(caffe.Layer):
def setup(self, bottom, top):
# parse the layer parameter string, which must be valid YAML
- layer_params = yaml.load(self.param_str_)
+ layer_params = yaml.load(self.param_str)
self._feat_stride = layer_params['feat_stride']
anchor_scales = layer_params.get('scales', (8, 16, 32))
- [1] http://caffe.berkeleyvision.org/installation.html
- [2] https://github.com/BVLC/caffe/wiki/Ubuntu-16.04-or-15.10-Installation-Guide
- [3] ubuntu 17.10 currently ships with boost 1.62. This uses the macro
__CUDACC_VER__
that was depreciated incuda-9.0
. The current distribution on the boost site fixes this. See the bug tracker for more details. https://svn.boost.org/trac10/ticket/13152 - [4] this currently requires quite a bit of manual conflict resolution https://github.com/rbgirshick/py-faster-rcnn/issues/509?_pjax=%23js-repo-pjax-container#issuecomment-284133868]
- [5] https://github.com/acmiyaguchi/caffe-fast-rcnn/commits/faster-rcnn-rebased
- [6] https://github.com/acmiyaguchi/caffe-fast-rcnn/commit/d58e95906f1f1ba3557e3f46c57fa6a4a1361be2
댓글 0
번호 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|
1686 | Mediainfo 를 이용해서 날짜 알아내기 | WHRIA | 2012.12.20 | 10405 |
1685 | 마음이 편해지는 그림 | WHRIA | 2007.02.18 | 10356 |
1684 | 마음의 결정이 끝났습니다. | WHRIA | 2009.11.20 | 10334 |
1683 | 애드센스 수입금 - 48만원 | WHRIA | 2010.12.28 | 10277 |
1682 | MedicalPhoto moved to http://medicalphoto.org | WHRIA | 2008.06.20 | 10104 |
1681 | rAthena [1] | WHRIA | 2016.06.26 | 10074 |
1680 | 어려운 결정 | WHRIA | 2008.10.11 | 10019 |
1679 | 피얼룩 지우기 | WHRIA | 2012.05.26 | 9956 |
1678 | Trader | WHRIA | 2009.11.17 | 9882 |
1677 | 승석이 홈페이지입니다. | 한승석 | 2000.05.29 | 9874 |
1676 | 피부과 홈페이지 제작중 | WHRIA | 2009.11.11 | 9712 |
1675 | 일본으로 workshop 초청이 왔는데 못가게 되었다. [1] | WHRIA | 2009.11.23 | 9632 |
1674 | 간판 제작 업체 | WHRIA | 2009.10.31 | 9558 |
1673 | 인플레이션인가 디플레이션인가 | WHRIA | 2009.06.21 | 9546 |
1672 | 돌사진 | WHRIA | 2011.03.21 | 9446 |