π [Fix] groundtruth mismatch, code need refactor
Browse files- 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 |
-
|
|
|
|
|
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
|