Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Zahra Rajabi
py-faster-rcnn
Commits
4e3ccd49
Commit
4e3ccd49
authored
Apr 28, 2015
by
Ross Girshick
Browse files
minor refactoring
parent
acb591ac
Changes
1
Show whitespace changes
Inline
Side-by-side
tools/_init_paths.py
View file @
4e3ccd49
...
...
@@ -5,18 +5,21 @@
# Written by Ross Girshick
# --------------------------------------------------------
"""Set up paths for Fast R-CNN."""
import
os.path
as
osp
import
sys
def
add_path
(
path
):
if
path
not
in
sys
.
path
:
sys
.
path
.
insert
(
0
,
path
)
this_dir
=
osp
.
dirname
(
__file__
)
# Add caffe to PYTHONPATH
caffe_path
=
osp
.
join
(
this_dir
,
'..'
,
'caffe-fast-rcnn'
,
'python'
)
add_path
(
caffe_path
)
if
caffe_path
not
in
sys
.
path
:
sys
.
path
.
insert
(
0
,
caffe_path
)
# Add lib to PYTHONPATH
lib_path
=
osp
.
join
(
this_dir
,
'..'
,
'lib'
)
if
lib_path
not
in
sys
.
path
:
sys
.
path
.
insert
(
0
,
lib_path
)
add_path
(
lib_path
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment