From 892e8ecbbe5f9b771a09832dab980b4727e2b31d Mon Sep 17 00:00:00 2001 From: Chen Qibo <69334887+Baboom-l@users.noreply.github.com> Date: Thu, 1 Feb 2024 10:52:22 +0800 Subject: [PATCH] fix:grounding_pretrain_text_trans_negative_label (#11404) --- mmdet/datasets/transforms/text_transformers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mmdet/datasets/transforms/text_transformers.py b/mmdet/datasets/transforms/text_transformers.py index 25304d5fe45..12a0e57db3d 100644 --- a/mmdet/datasets/transforms/text_transformers.py +++ b/mmdet/datasets/transforms/text_transformers.py @@ -199,7 +199,7 @@ def od_aug(self, results): for i in np.random.choice( valid_negative_indexes, size=num_negatives, replace=False): - if i not in positive_label_list: + if int(i) not in positive_label_list: negative_label_list.add(i) random.shuffle(positive_label_list)