File tree 1 file changed +4
-4
lines changed
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,
325
325
match_indices = dn_match_indices
326
326
327
327
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 :
329
332
src_bbox , target_bbox = self ._get_src_target_assign (
330
333
boxes .detach (), gt_bbox , match_indices )
331
334
iou_score = bbox_iou (
332
335
bbox_cxcywh_to_xyxy (src_bbox ).split (4 , - 1 ),
333
336
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 )
337
337
else :
338
338
iou_score = None
339
339
else :
You can’t perform that action at this time.
0 commit comments