forked from kaist-avelab/K-Lane
-
Notifications
You must be signed in to change notification settings - Fork 0
/
validate_gpu_0.py
43 lines (36 loc) · 1.26 KB
/
validate_gpu_0.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
39
40
41
42
43
'''
* Copyright (c) AVELab, KAIST. All rights reserved.
* author: Donghee Paek & Kevin Tirta Wijaya, AVELab, KAIST
* e-mail: donghee.paek@kaist.ac.kr, kevin.tirta@kaist.ac.kr
'''
import os
GPUS_EN = '0'
os.environ["CUDA_VISIBLE_DEVICES"] = GPUS_EN
import torch.backends.cudnn as cudnn
import time
import cv2
import open3d as o3d
import pickle
time_now = time.localtime()
time_log = '%04d-%02d-%02d-%02d-%02d-%02d' % (time_now.tm_year, time_now.tm_mon, time_now.tm_mday, time_now.tm_hour, time_now.tm_min, time_now.tm_sec)
from baseline.utils.config import Config
from baseline.engine.runner import Runner
from baseline.utils.vis_utils import *
import configs.config_vis as cnf
def main():
### Set here ###
path_config = './configs/Proj28_GFC-T3_RowRef_82_73.py'
path_ckpt = './configs/Proj28_GFC-T3_RowRef_82_73.pth'
### Set here ###
### Settings ###
cudnn.benchmark = True
cfg, runner = load_config_and_runner(path_config, GPUS_EN)
cfg.work_dirs = cfg.log_dir + '/' + cfg.dataset.train.type
cfg.gpus = len(GPUS_EN.split(','))
print(f'* Config: [{path_config}] is loaded')
runner.load_ckpt(path_ckpt)
print(f'* ckpt: [{path_ckpt}] is loaded')
### Settings ###
runner.eval_conditional()
if __name__ == '__main__':
main()