Commit 38ce7a10 authored by Ren Jin's avatar Ren Jin Committed by Francisco Massa

fix integer bug (#239) (#245)

In maskrcnn_benchmark/modeling/roi_heads/mask_head/inference.py
change line 125-126 to
w = int(box[2] - box[0] + TO_REMOVE)
h = int(box[3] - box[1] + TO_REMOVE)
parent ced10f20
......@@ -122,8 +122,8 @@ def paste_mask_in_image(mask, box, im_h, im_w, thresh=0.5, padding=1):
box = box.to(dtype=torch.int32)
TO_REMOVE = 1
w = box[2] - box[0] + TO_REMOVE
h = box[3] - box[1] + TO_REMOVE
w = int(box[2] - box[0] + TO_REMOVE)
h = int(box[3] - box[1] + TO_REMOVE)
w = max(w, 1)
h = max(h, 1)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment