Skip to content

Commit

Permalink
Small fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
kkeroo committed Sep 9, 2024
1 parent ec57834 commit 97895eb
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions depthai_nodes/ml/parsers/segmentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,17 +85,11 @@ def run(self):
segmentation_mask,
)
)
class_map = (
np.max(segmentation_mask, axis=0)
.reshape(segmentation_mask.shape[1], segmentation_mask.shape[2], 1)
.astype(np.uint8)
)
else:
class_map = (
np.argmax(segmentation_mask, axis=0)
.reshape(segmentation_mask.shape[1], segmentation_mask.shape[2], 1)
.astype(np.uint8)
)
class_map = (
np.argmax(segmentation_mask, axis=0)
.reshape(segmentation_mask.shape[1], segmentation_mask.shape[2], 1)
.astype(np.uint8)
)

imgFrame = create_segmentation_message(class_map)
imgFrame.setTimestamp(output.getTimestamp())
Expand Down

0 comments on commit 97895eb

Please sign in to comment.