-
Notifications
You must be signed in to change notification settings - Fork 29
Expand file tree
/
Copy pathtest.py
More file actions
25 lines (20 loc) · 696 Bytes
/
test.py
File metadata and controls
25 lines (20 loc) · 696 Bytes
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
# -*- coding:UTF-8 -*-
from __future__ import division
import os
from keras_MBNet import config
from keras_MBNet.model.MBNetModel import MBNetModel
# pass the settings in the config object
C = config.Config()
os.environ["CUDA_VISIBLE_DEVICES"] = '0'
C.random_crop = (512, 640)
C.network = 'resnet50'
#load model weight
weight_path = './data/models/resnet_e7_l224.hdf5'
# weight_path = './output/valmodels/resnet50/2step/0.0001/resnet_e7_l224.hdf5'
data_path = './data/kaist_test/kaist_test_visible'
val_data = os.listdir(data_path)
#initialize model
model = MBNetModel()
model.creat_MBNet_model(C, val_data, phase='inference')
#test model
model.test_MBNet(C,data_path, val_data, weight_path)