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

minor refactoring

parent acb591ac
...@@ -5,18 +5,21 @@ ...@@ -5,18 +5,21 @@
# Written by Ross Girshick # Written by Ross Girshick
# -------------------------------------------------------- # --------------------------------------------------------
"""Set up paths for Fast R-CNN."""
import os.path as osp import os.path as osp
import sys import sys
def add_path(path):
if path not in sys.path:
sys.path.insert(0, path)
this_dir = osp.dirname(__file__) this_dir = osp.dirname(__file__)
# Add caffe to PYTHONPATH # Add caffe to PYTHONPATH
caffe_path = osp.join(this_dir, '..', 'caffe-fast-rcnn', 'python') caffe_path = osp.join(this_dir, '..', 'caffe-fast-rcnn', 'python')
if caffe_path not in sys.path: # Add lib to PYTHONPATH
sys.path.insert(0, caffe_path)
lib_path = osp.join(this_dir, '..', 'lib') lib_path = osp.join(this_dir, '..', 'lib')
if lib_path not in sys.path:
sys.path.insert(0, 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