Skip to content

Commit 16cf17a

Browse files
committed
revert the remove_low_object
1 parent 2815143 commit 16cf17a

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

src/transformers/models/deta/image_processing_deta.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1113,7 +1113,7 @@ def post_process_object_detection(
11131113
nms_threshold (`float`, *optional*, defaults to 0.7):
11141114
NMS threshold.
11151115
num_nms (`int`, *optional*, defaults to 100):
1116-
Number of objects threshold.
1116+
Number of objects threshold.
11171117
11181118
Returns:
11191119
`List[Dict]`: A list of dictionaries, each dictionary containing the scores, labels and boxes for an image

src/transformers/models/mask2former/image_processing_mask2former.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1121,10 +1121,6 @@ def post_process_instance_segmentation(
11211121
pred_scores = scores_per_image * mask_scores_per_image
11221122
pred_classes = labels_per_image
11231123

1124-
mask_pred, pred_scores, pred_classes = remove_low_and_no_objects(
1125-
mask_pred, pred_scores, pred_classes, threshold, num_classes
1126-
)
1127-
11281124
segmentation = torch.zeros((384, 384)) - 1
11291125
if target_sizes is not None:
11301126
size = target_sizes[i] if isinstance(target_sizes[i], tuple) else target_sizes[i].cpu().tolist()

0 commit comments

Comments
 (0)