Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
eugene123tw committed Aug 21, 2024
1 parent 3e9179f commit eb8379b
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions src/otx/core/model/instance_segmentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,20 +114,10 @@ def _customize_outputs(
masks: list[tv_tensors.Mask] = []

predictions = outputs["predictions"] if isinstance(outputs, dict) else outputs
for img_info, prediction in zip(inputs.imgs_info, predictions):
for prediction in predictions:
scores.append(prediction.scores)
bboxes.append(
tv_tensors.BoundingBoxes(
prediction.bboxes,
format="XYXY",
canvas_size=img_info.ori_shape,
),
)
output_masks = tv_tensors.Mask(
prediction.masks,
dtype=torch.bool,
)
masks.append(output_masks)
bboxes.append(prediction.bboxes)
masks.append(prediction.masks)
labels.append(prediction.labels)

if self.explain_mode:
Expand Down

0 comments on commit eb8379b

Please sign in to comment.