Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

Commit

Permalink
Cast mask to uint8
Browse files Browse the repository at this point in the history
  • Loading branch information
hadim committed Nov 7, 2018
1 parent 85f973e commit 19b84bb
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def paste_mask_in_image(mask, box, im_h, im_w, thresh=0.5, padding=1):
else:
# for visualization and debugging, we also
# allow it to return an unmodified mask
mask = mask * 255
mask = (mask * 255).to(torch.uint8)

im_mask = torch.zeros((im_h, im_w), dtype=torch.uint8)
x_0 = max(box[0], 0)
Expand Down

0 comments on commit 19b84bb

Please sign in to comment.