-
Notifications
You must be signed in to change notification settings - Fork 0
/
opts.py
33 lines (23 loc) · 1.14 KB
/
opts.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
'''
Hyperparameters wrapped in argparse
This file contains most of tuanable parameters for this homework
You can change the values by changing their default fields or by command-line
arguments. For example, "python q2_1_4.py --sigma 0.15 --ratio 0.7"
'''
import argparse
def get_opts():
parser = argparse.ArgumentParser(description='16-720 HW2: Homography')
# Feature detection (requires tuning)
parser.add_argument('--sigma', type=float, default=0.15,
help='threshold for corner detection using FAST feature detector')
parser.add_argument('--ratio', type=float, default=0.8,
help='ratio for BRIEF feature descriptor')
# Ransac (requires tuning)
parser.add_argument('--max_iters', type=int, default=500,
help='the number of iterations to run RANSAC for')
parser.add_argument('--inlier_tol', type=float, default=1.0,
help='the tolerance value for considering a point to be an inlier')
# Additional options (add your own hyperparameters here)
##
opts = parser.parse_args()
return opts