forked from chenglong0313/FADNet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
net_builder.py
34 lines (30 loc) · 1.08 KB
/
net_builder.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
from __future__ import print_function
#from networks.simple_net import SimpleNet
#from networks.dispnet_corr2 import DispNetCorr2
from networks.DispNetC import DispNetC
from networks.DispNetS import DispNetS
from networks.DispNetCS import DispNetCS
from networks.DispNetCSS import DispNetCSS
from networks.DispNetCSRes import DispNetCSRes
from networks.stackhourglass import PSMNet
from networks.GANet_deep import GANet
#from networks.MultiCorrNet import MultiCorrNet
from utils.common import logger
SUPPORT_NETS = {
#'simplenet': SimpleNet,
'dispnetcres': DispNetCSRes,
'dispnetc': DispNetC,
'dispnets': DispNetS,
'dispnetcs': DispNetCS,
'dispnetcss': DispNetCSS,
'psmnet': PSMNet,
'ganet':GANet,
#'multicorrnet': MultiCorrNet,
#'dispnetcorr2': DispNetCorr2,
}
def build_net(net_name):
net = SUPPORT_NETS.get(net_name, None)
if net is None:
logger.error('Current supporting nets: %s , Unsupport net: %s', SUPPORT_NETS.keys(), net_name)
raise 'Unsupport net: %s' % net_name
return net