lxtGH / PFSegNets

PointFlow (CVPR-2021)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bug feedback

purse1996 opened this issue · comments

Good job!
While there seem to exist a bug in iSAID.py:

@staticmethod
def get_boundary(mask, thicky=8):
tmp = mask.data.numpy().astype('uint8')
# import pdb
# pdb.set_trace()
# print(tmp.dtype())
contour, _ = cv2.findContours(tmp, cv2.RETR_TREE, cv2.CHAIN_APPROX_SIMPLE)

    boundary = np.zeros_like(tmp)
    boundary = cv2.drawContours(boundary, contour, -1, 1, thicky)
    boundary = boundary.astype(np.float)
    return boundary

‘Mask’ is a gray image, while cv2.findContours requires the input image is the binary image. So the code can not run.

Another question: What does 'boundary' mean? Boundary or Boundary attached to the label image?

opencv version