소스 검색

Fix for black

Kentaro Wada 2 년 전
부모
커밋
84c6c79630
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      labelme/ai/models/segment_anything.py

+ 2 - 1
labelme/ai/models/segment_anything.py

@@ -186,7 +186,8 @@ def _compute_polygon_from_points(
     polygon = skimage.measure.approximate_polygon(
         coords=contour,
         tolerance=np.ptp(contour, axis=0).max() / 100,
-    )[:-1]  # drop last point that is duplicate of first point
+    )
+    polygon = polygon[:-1]  # drop last point that is duplicate of first point
     if 0:
         image_pil = PIL.Image.fromarray(image)
         imgviz.draw.line_(image_pil, yx=polygon, fill=(0, 255, 0))