DBNet.pytorch icon indicating copy to clipboard operation
DBNet.pytorch copied to clipboard

关于解決cv2.findContours返回值too many values to unpack (expected 2)的问题

Open YongZ-Lee opened this issue 1 year ago • 0 comments

找到/post_processing/seg_detector_representer.py,找到def boxes_from_bitmap(),在105行, 原本的“contours, _ = cv2.findContours((bitmap * 255).astype(np.uint8), cv2.RETR_LIST, cv2.CHAIN_APPROX_SIMPLE)”改成, “_, contours, _ = cv2.findContours((bitmap * 255).astype(np.uint8), cv2.RETR_LIST, cv2.CHAIN_APPROX_SIMPLE)”

YongZ-Lee avatar Jul 18 '23 13:07 YongZ-Lee