You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello author, I think there are some problems in calculating the mBIOU.
defmask_to_boundary(mask, dilation_ratio=0.02):
h, w=mask.shapeimg_diag=np.sqrt(h**2+w**2)
dilation=int(round(dilation_ratio*img_diag))
ifdilation<1:
dilation=1# Pad image so mask truncated by the image border is also considered as boundary.new_mask=cv2.copyMakeBorder(mask, 1, 1, 1, 1, cv2.BORDER_CONSTANT, value=0)
kernel=np.ones((3, 3), dtype=np.uint8)
new_mask_erode=cv2.erode(new_mask, kernel, iterations=dilation)
mask_erode=new_mask_erode[1: h+1, 1: w+1]
# G_d intersects G in the paper.returnmask-mask_erode
The dilation_ratio is set as 0.02, for a image with Height 700 X Width 900,the dilation iterations will be 24! The final mask will be an empty mask as shown below:
The binary you get at the end is actually the same as the input Mask (with erode 20x->empty mask), then the calculated mBIOU is actually the same as the mIOU.
Looking for your reply~
The text was updated successfully, but these errors were encountered:
Hello author, I think there are some problems in calculating the mBIOU.
The dilation_ratio is set as 0.02, for a image with Height 700 X Width 900,the dilation iterations will be 24! The final mask will be an empty mask as shown below:
The binary you get at the end is actually the same as the input Mask (with erode 20x->empty mask), then the calculated mBIOU is actually the same as the mIOU.
Looking for your reply~
The text was updated successfully, but these errors were encountered: