From b8c912d3e23e6c41c71ce2e0affa2af528337a8b Mon Sep 17 00:00:00 2001 From: kprokofi Date: Thu, 19 Dec 2024 20:43:45 +0900 Subject: [PATCH] fix hungarian matcher --- src/otx/algo/common/utils/assigners/hungarian_matcher.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/otx/algo/common/utils/assigners/hungarian_matcher.py b/src/otx/algo/common/utils/assigners/hungarian_matcher.py index a1fcc316f8..4409bc6eb2 100644 --- a/src/otx/algo/common/utils/assigners/hungarian_matcher.py +++ b/src/otx/algo/common/utils/assigners/hungarian_matcher.py @@ -279,7 +279,7 @@ def batch_preparation( "pred_boxes": outputs["pred_boxes"][i], "pred_masks": outputs["pred_masks"][i] if "pred_masks" in outputs else None, "target_boxes": targets[i]["boxes"], - "target_labels": targets[i]["labels"], + "target_labels": targets[i]["labels"].long(), "target_mask": targets[i]["masks"] if "masks" in targets[i] else None, } for i in range(batch_size)