Commit 4e3ccd49 authored by Ross Girshick's avatar Ross Girshick

minor refactoring

parent acb591ac
......@@ -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)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment