-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathmain_test.py
40 lines (28 loc) · 984 Bytes
/
main_test.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
"""
Copyright (c) 2018. All rights reserved.
Created by Resnick Xing on 2018/5/11
"""
from perception.infers.segmention_infer import SegmentionInfer
from perception.metric.segmention_metric import *
from configs.utils.config_utils import process_config
repredict=True
def main_test():
print('[INFO] Reading Configs...')
config = None
try:
config = process_config('configs/segmention_config.json')
except Exception as e:
print('[Exception] Config Error, %s' % e)
exit(0)
if repredict==True:
print('[INFO] Predicting...')
infer = SegmentionInfer( config)
infer.predict()
print('[INFO] Metric results...')
gtlist=fileList(config.test_gt_path,'*'+config.test_gt_datatype)
problist=fileList(config.test_result_path,'*.bmp')
modelName=['AttnUnet']
drawCurve(gtlist,[problist],modelName,'OD-Cut',config.checkpoint)
print('[INFO] Fininshed...')
if __name__ == '__main__':
main_test()