forked from tianyu0207/RTFM
-
Notifications
You must be signed in to change notification settings - Fork 0
/
option.py
executable file
·28 lines (25 loc) · 2.2 KB
/
option.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
import argparse
parser = argparse.ArgumentParser(description='RTFM')
parser.add_argument('--feat-extractor', default='i3d', choices=['i3d', 'c3d'])
parser.add_argument('--feature-size', type=int, default=2048, help='size of feature (default: 2048)')
parser.add_argument('--train-list', default='list/train_list_v2.list', help='train rgb features list')
parser.add_argument('--val-list', default='list/test_list_v2.list', help='validation rgb features list')
parser.add_argument('--test-list', default='list/test_list_v2.list', help='test rgb features list')
# parser.add_argument('--gt', default='list/gt.npy', help='file of ground truth ')
parser.add_argument('--val_gt', default='list/gt_v2.npy', help='file of ground truth ')
parser.add_argument('--test_gt', default='list/gt_v2.npy', help='file of ground truth ')
parser.add_argument('--gpus', default=1, type=int, choices=[0], help='gpus')
parser.add_argument('--lr', type=str, default='[0.001]*15000', help='learning rates for steps(list form)')
parser.add_argument('--batch-size', type=int, default=4, help='number of instances in a batch of data (default: 16)')
parser.add_argument('--workers', default=4, help='number of workers in dataloader')
parser.add_argument('--model-name', default='rtfm', help='name to save model')
parser.add_argument('--pretrained-ckpt', default=None, help='ckpt for pretrained model')
parser.add_argument('--num-classes', type=int, default=1, help='number of class')
parser.add_argument('--dataset', default='home_survillance', help='dataset to train on (default: )')
parser.add_argument('--plot-freq', type=int, default=10, help='frequency of plotting (default: 10)')
parser.add_argument('--max-epoch', type=int, default=2000, help='maximum iteration to train (default: 100)')
parser.add_argument('--n_anomaly', type=int, default=16, help='number of training anomaly videos')
parser.add_argument('--n_non_anomaly', type=int, default=5, help='number of training non-anomaly videos')
parser.add_argument('--test_model_path', default='ckpt/rtfmfinal.pkl', help='testing model')
parser.add_argument('--train_from_scratch', default='False', help='Testing from scratch or not')
parser.add_argument('--prev_ckpts', default='rtfmfinal.pkl', help='previous checkpoints')