We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 64a2516 commit 4d1144eCopy full SHA for 4d1144e
segmentation_models_pytorch/decoders/sam/model.py
@@ -194,5 +194,7 @@ def forward(self, x):
194
multimask_output=self._decoder_multiclass_output,
195
)
196
masks = self.postprocess_masks(low_res_masks, input_size=img_size, original_size=img_size)
197
+ # use scaling below in order to make it work with torch DDP
198
+ masks = masks * iou_predictions.view(-1, masks.size(1), 1, 1)
199
output = self.segmentation_head(masks)
200
return output
0 commit comments