henry000 commited on
Commit
75388bb
Β·
1 Parent(s): 584d5bd

πŸ› [Fix] groundtruth mismatch, code need refactor

Browse files
Files changed (1) hide show
  1. yolo/utils/loss.py +3 -1
yolo/utils/loss.py CHANGED
@@ -140,7 +140,9 @@ class YOLOLoss:
140
  # Batch_Size x (Anchor + Class) x H x W
141
  # TODO: check datatype, why targets has a little bit error with origin version
142
  predicts, predicts_anc = self.parse_predicts(predicts[0])
143
- targets = self.parse_targets(targets, batch_size=predicts.size(0))
 
 
144
 
145
  align_targets, valid_masks = self.matcher(targets, predicts)
146
  # calculate loss between with instance and predict
 
140
  # Batch_Size x (Anchor + Class) x H x W
141
  # TODO: check datatype, why targets has a little bit error with origin version
142
  predicts, predicts_anc = self.parse_predicts(predicts[0])
143
+ # TODO: Refactor this operator
144
+ # targets = self.parse_targets(targets, batch_size=predicts.size(0))
145
+ targets[:, :, 1:] = targets[:, :, 1:] * self.scale_up
146
 
147
  align_targets, valid_masks = self.matcher(targets, predicts)
148
  # calculate loss between with instance and predict