-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathtrain.py
25 lines (19 loc) · 875 Bytes
/
train.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
import argparse
from train.trainer import Trainer
from train.settings import TrainSettings
def main():
parser = argparse.ArgumentParser(description='LoFTR knowledge distillation.')
parser.add_argument('--path', type=str, default='/data_sets/BlendedMVS',
help='Path to the dataset.')
parser.add_argument('--checkpoint_path', type=str,
default='weights',
help='Where to store a log information and checkpoints.')
parser.add_argument('--weights', type=str, default='weights/outdoor_ds.ckpt',
help='Path to the LoFTR teacher network weights.')
opt = parser.parse_args()
print(opt)
settings = TrainSettings()
trainer = Trainer(settings, opt.weights, opt.path, opt.checkpoint_path)
trainer.train('LoFTR')
if __name__ == '__main__':
main()