-
Notifications
You must be signed in to change notification settings - Fork 126
/
Copy pathsceneflow.py
38 lines (31 loc) · 1.34 KB
/
sceneflow.py
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
35
36
37
38
import os
import argparse
import shutil
parser = argparse.ArgumentParser()
parser.add_argument('--path', type=str, default=None)
parser.add_argument('--force', action='store_true')
args = parser.parse_args()
def main():
assert os.path.isdir(args.path), "Path is not correct"
path = args.path
monkaa = path + "/monkaa/frames_cleanpass"
monkaa_disparity = path + "/monkaa/disparity"
driving = path + "/driving/frames_cleanpass"
driving_disparity = path + "/driving/disparity"
flyingthings3d = path+"/flyingthings3d/frames_cleanpass"
flyingthings3d_disparity = path+"/flyingthings3d/disparity"
if args.force and os.path.isdir('sceneflow'):
shutil.rmtree('sceneflow')
if os.path.isdir('sceneflow'):
print('Soft links are existing. Stop running')
return
os.makedirs('sceneflow')
os.system('ln -s {} sceneflow/monkaa_cleanpass'.format(monkaa))
os.system('ln -s {} sceneflow/monkaa_disparity'.format(monkaa_disparity))
os.system('ln -s {} sceneflow/flyingthings3d_cleanpass'.format(flyingthings3d))
os.system(
'ln -s {} sceneflow/flyingthings3d_disparity'.format(flyingthings3d_disparity))
os.system('ln -s {} sceneflow/driving_cleanpass'.format(driving))
os.system('ln -s {} sceneflow/driving_disparity'.format(driving_disparity))
if __name__ == '__main__':
main()