diff --git a/ppdet/data/transform/operators.py b/ppdet/data/transform/operators.py index 87dc275465f6b2e171ece4c9c7797ddee7b5c08f..052e35101ea51c0fad36f64364afade9203a529f 100644 --- a/ppdet/data/transform/operators.py +++ b/ppdet/data/transform/operators.py @@ -3217,9 +3217,11 @@ class Mosaic(BaseOperator): _gt_bbox[:, 2] = scale * gt_bbox[:, 2] + padw _gt_bbox[:, 3] = scale * gt_bbox[:, 3] + padh + is_crowd = sp['is_crowd'] if 'is_crowd' in sp else np.zeros( + (len(_gt_bbox), 1), dtype=np.int32) mosaic_gt_bbox.append(_gt_bbox) mosaic_gt_class.append(sp['gt_class']) - mosaic_is_crowd.append(sp['is_crowd']) + mosaic_is_crowd.append(is_crowd) # 2. clip bbox and get mosaic_labels([gt_bbox, gt_class, is_crowd]) if len(mosaic_gt_bbox):