File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -325,15 +325,15 @@ def _get_prediction_loss(self,
325325 match_indices = dn_match_indices
326326
327327 if self .use_vfl :
328- if sum (len (a ) for a in gt_bbox ) > 0 :
328+ if gt_score is not None : #ssod
329+ _ , target_score = self ._get_src_target_assign (
330+ logits [- 1 ].detach (), gt_score , match_indices )
331+ elif sum (len (a ) for a in gt_bbox ) > 0 :
329332 src_bbox , target_bbox = self ._get_src_target_assign (
330333 boxes .detach (), gt_bbox , match_indices )
331334 iou_score = bbox_iou (
332335 bbox_cxcywh_to_xyxy (src_bbox ).split (4 , - 1 ),
333336 bbox_cxcywh_to_xyxy (target_bbox ).split (4 , - 1 ))
334- if gt_score is not None : #ssod
335- _ , target_score = self ._get_src_target_assign (
336- logits [- 1 ].detach (), gt_score , match_indices )
337337 else :
338338 iou_score = None
339339 else :
You can’t perform that action at this time.
0 commit comments