Esempio n. 1
0
 def __init__(self, opt):
     super(GenericLoss, self).__init__()
     self.crit = FastFocalLoss(opt=opt)
     self.crit_reg = RegWeightedL1Loss()
     if "rot" in opt.heads:
         self.crit_rot = BinRotLoss()
     if "nuscenes_att" in opt.heads:
         self.crit_nuscenes_att = WeightedBCELoss()
     self.opt = opt
Esempio n. 2
0
 def __init__(self, opt):
     super(GenericLoss, self).__init__()
     self.crit = FastFocalLoss(opt=opt)
     self.crit_reg = RegWeightedL1Loss()
     if "rot" in opt.heads:
         self.crit_rot = BinRotLoss()
     if "nuscenes_att" in opt.heads:
         self.crit_nuscenes_att = WeightedBCELoss()
     self.opt = opt
     self.s_det = nn.Parameter(torch.ones(1))
     self.s_id = nn.Parameter(torch.ones(1))
Esempio n. 3
0
 def __init__(self, opt):
   super(GenericLoss, self).__init__()
   self.crit = FastFocalLoss(opt=opt)
   self.crit_reg = RegWeightedL1Loss()
   if 'rot' in opt.heads:
     self.crit_rot = BinRotLoss()
   if 'nuscenes_att' in opt.heads:
     self.crit_nuscenes_att = WeightedBCELoss()
   self.opt = opt
   if opt.trades:
     self.crit_cost_volume_1d = CostVolumeLoss1D()
Esempio n. 4
0
 def __init__(self, opt):
     super(GenericLoss, self).__init__()
     self.crit = FastFocalLoss(opt=opt)
     self.crit_reg = RegWeightedL1Loss()
     if 'rot' in opt.heads:
         self.crit_rot = BinRotLoss()
     if 'nuscenes_att' in opt.heads:
         self.crit_nuscenes_att = WeightedBCELoss()
     self.opt = opt
     ##### track seg
     self.crit_seg = SegLoss2()
Esempio n. 5
0
 def __init__(self, opt):
     super(GenericLoss, self).__init__()
     self.crit = FastFocalLoss(opt=opt)
     self.crit_reg = RegWeightedL1Loss()
     if 'rot' in opt.heads:
         self.crit_rot = BinRotLoss()
     if 'nuscenes_att' in opt.heads:
         self.crit_nuscenes_att = WeightedBCELoss()
     if 'traffic_light' in opt.heads:
         self.light_loss = nn.CrossEntropyLoss()
     self.opt = opt