forked from bubae/gazeAssistRecognize
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit_path.py
More file actions
34 lines (25 loc) · 861 Bytes
/
Copy pathinit_path.py
File metadata and controls
34 lines (25 loc) · 861 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
"""Set up paths."""
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, 'py-faster-rcnn','caffe-fast-rcnn', 'python')
add_path(caffe_path)
# Add fast rcnnlib to PYTHONPATH
fast_rcnn_lib_path = osp.join(this_dir, 'py-faster-rcnn', 'lib')
add_path(fast_rcnn_lib_path)
# Add functions to PYTHONPATH
func_path = osp.join(this_dir, 'functions')
add_path(func_path)
# Add data to PYTHONPATH
data_path = osp.join(this_dir, 'data')
add_path(data_path)
# Add bing objectness
bing_path = osp.join(this_dir, 'lib', 'BING-Objectness', 'source')
add_path(bing_path)
# # Add external library path
# lib_path = osp.join(this_dir, 'libs', 'saliencyMap', 'src')
# add_path(lib_path)