|
@@ -47,30 +47,53 @@ class Bottleneck1D(nn.Module):
|
|
return x + self.op(x)
|
|
return x + self.op(x)
|
|
|
|
|
|
class LineRCNNPredictor(nn.Module):
|
|
class LineRCNNPredictor(nn.Module):
|
|
- def __init__(self, cfg):
|
|
|
|
|
|
+ def __init__(self,**kwargs):
|
|
super().__init__()
|
|
super().__init__()
|
|
# self.backbone = backbone
|
|
# self.backbone = backbone
|
|
# self.cfg = read_yaml(cfg)
|
|
# self.cfg = read_yaml(cfg)
|
|
# self.cfg = read_yaml(r'./config/wireframe.yaml')
|
|
# self.cfg = read_yaml(r'./config/wireframe.yaml')
|
|
- self.cfg = cfg
|
|
|
|
- self.n_pts0 = self.cfg['n_pts0']
|
|
|
|
- self.n_pts1 = self.cfg['n_pts1']
|
|
|
|
- self.n_stc_posl = self.cfg['n_stc_posl']
|
|
|
|
- self.dim_loi = self.cfg['dim_loi']
|
|
|
|
- self.use_conv = self.cfg['use_conv']
|
|
|
|
- self.dim_fc = self.cfg['dim_fc']
|
|
|
|
- self.n_out_line = self.cfg['n_out_line']
|
|
|
|
- self.n_out_junc = self.cfg['n_out_junc']
|
|
|
|
- self.loss_weight = self.cfg['loss_weight']
|
|
|
|
- self.n_dyn_junc = self.cfg['n_dyn_junc']
|
|
|
|
- self.eval_junc_thres = self.cfg['eval_junc_thres']
|
|
|
|
- self.n_dyn_posl = self.cfg['n_dyn_posl']
|
|
|
|
- self.n_dyn_negl = self.cfg['n_dyn_negl']
|
|
|
|
- self.n_dyn_othr = self.cfg['n_dyn_othr']
|
|
|
|
- self.use_cood = self.cfg['use_cood']
|
|
|
|
- self.use_slop = self.cfg['use_slop']
|
|
|
|
- self.n_stc_negl = self.cfg['n_stc_negl']
|
|
|
|
- self.head_size = self.cfg['head_size']
|
|
|
|
|
|
+
|
|
|
|
+ # print(f'linePredictor cfg:{cfg}')
|
|
|
|
+ #
|
|
|
|
+ # self.cfg = cfg
|
|
|
|
+ # self.n_pts0 = self.cfg['n_pts0']
|
|
|
|
+ # self.n_pts1 = self.cfg['n_pts1']
|
|
|
|
+ # self.n_stc_posl = self.cfg['n_stc_posl']
|
|
|
|
+ # self.dim_loi = self.cfg['dim_loi']
|
|
|
|
+ # self.use_conv = self.cfg['use_conv']
|
|
|
|
+ # self.dim_fc = self.cfg['dim_fc']
|
|
|
|
+ # self.n_out_line = self.cfg['n_out_line']
|
|
|
|
+ # self.n_out_junc = self.cfg['n_out_junc']
|
|
|
|
+ # self.loss_weight = self.cfg['loss_weight']
|
|
|
|
+ # self.n_dyn_junc = self.cfg['n_dyn_junc']
|
|
|
|
+ # self.eval_junc_thres = self.cfg['eval_junc_thres']
|
|
|
|
+ # self.n_dyn_posl = self.cfg['n_dyn_posl']
|
|
|
|
+ # self.n_dyn_negl = self.cfg['n_dyn_negl']
|
|
|
|
+ # self.n_dyn_othr = self.cfg['n_dyn_othr']
|
|
|
|
+ # self.use_cood = self.cfg['use_cood']
|
|
|
|
+ # self.use_slop = self.cfg['use_slop']
|
|
|
|
+ # self.n_stc_negl = self.cfg['n_stc_negl']
|
|
|
|
+ # self.head_size = self.cfg['head_size']
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ self.n_pts0 = 32
|
|
|
|
+ self.n_pts1 = 8
|
|
|
|
+ self.n_stc_posl =300
|
|
|
|
+ self.dim_loi = 128
|
|
|
|
+ self.use_conv = 0
|
|
|
|
+ self.dim_fc = 1024
|
|
|
|
+ self.n_out_line = 2500
|
|
|
|
+ self.n_out_junc =250
|
|
|
|
+ # self.loss_weight =
|
|
|
|
+ self.n_dyn_junc = 300
|
|
|
|
+ self.eval_junc_thres = 0.008
|
|
|
|
+ self.n_dyn_posl =300
|
|
|
|
+ self.n_dyn_negl =80
|
|
|
|
+ self.n_dyn_othr = 600
|
|
|
|
+ self.use_cood = 0
|
|
|
|
+ self.use_slop = 0
|
|
|
|
+ self.n_stc_negl = 80
|
|
|
|
+ self.head_size = [[2], [1], [2]]
|
|
|
|
|
|
self.num_class = sum(sum(self.head_size, []))
|
|
self.num_class = sum(sum(self.head_size, []))
|
|
self.head_off = np.cumsum([sum(h) for h in self.head_size])
|
|
self.head_off = np.cumsum([sum(h) for h in self.head_size])
|