Never give up
블로그 이미지

Home

Write

Setting

About Me

  • 분류 전체보기 (61)
    • Computer vision (1)
      • Detection (1)
      • Segmentation (1)
      • Depth estimation (1)
      • Technique (0)
    • Programming (42)
      • Pytorch (2)
      • Python (4)
      • Linux (1)
      • (Dev|ML)OPS (0)
      • C++ (5)
      • 님들은 삽질하지 마세요 (18)
      • 코딩테스트 (2)
      • Why (1)
      • AI development (8)
      • DB (0)
    • 기본기 (3)
      • 딥러닝 관련 수학 (0)
      • 프로그래밍 (2)
    • 잡설 (6)
    • Data Insight (5)
mask 2 polygon
def convert_mask_to_polygon(mask): contours = None if int(cv2.__version__.split('.')[0]) > 3: contours = cv2.findContours(mask, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_TC89_KCOS)[0] else: contours = cv2.findContours(mask, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_TC89_KCOS)[1] contours = max(contours, key=lambda arr: arr.size) if contours.shape.count(1): contours = np.squeeze(contours) if contours.size 3 ..
2024.08.02
Computer vision/Segmentation
Prev 1 Next
uTube· Designed By ushin20

티스토리툴바