-
Notifications
You must be signed in to change notification settings - Fork 7
/
deepOF.py
45 lines (29 loc) · 873 Bytes
/
deepOF.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
import os, sys
import argparse
# from flyingChairsTrain import train
# from ucf101train import train
from sintelTrain import train
def deepOF(data_path):
MPISintel = True
ucf101 = False
flyingChairs = False
if MPISintel:
time_step = 10
image_size = [256, 512]
crop_size = [224, 480]
passKey = 'final' # clean or final
train(data_path, image_size, time_step, passKey)
elif ucf101:
image_size = [320, 384]
train(data_path, image_size)
elif flyingChairs:
image_size = [320, 448]
train(data_path, image_size)
def main():
# Example usage: python deepOF.py ~/Documents/MPI-Sintel/
parser = argparse.ArgumentParser(description='Unsupervised motion estimation from videos')
parser.add_argument('data_path', type=str, help='Path to your data')
args = parser.parse_args()
deepOF(args.data_path)
if __name__ == '__main__':
main()