Skip to content

Commit a032f9c

Browse files
author
Matt Sokoloff
committed
format
1 parent 4340896 commit a032f9c

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

labelbox/data/annotation_types/geometry/mask.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ class Mask(Geometry):
3838
@property
3939
def geometry(self) -> Dict[str, Tuple[int, int, int]]:
4040
mask = self.draw(color=1)
41-
contours, hierarchy = cv2.findContours(image=mask,mode=cv2.RETR_TREE, method=cv2.CHAIN_APPROX_NONE)
41+
contours, hierarchy = cv2.findContours(image=mask,
42+
mode=cv2.RETR_TREE,
43+
method=cv2.CHAIN_APPROX_NONE)
4244

4345
holes = []
4446
external_contours = []
@@ -49,10 +51,10 @@ def geometry(self) -> Dict[str, Tuple[int, int, int]]:
4951
else:
5052
external_contours.append(contours[i])
5153

52-
external_polygons = self._extract_polygons_from_contours(external_contours)
54+
external_polygons = self._extract_polygons_from_contours(
55+
external_contours)
5356
holes = self._extract_polygons_from_contours(holes)
5457

55-
5658
if not external_polygons.is_valid:
5759
external_polygons = external_polygons.buffer(0)
5860

labelbox/data/serialization/coco/instance_dataset.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,6 @@ def mask_to_coco_object_annotation(
4141
iscrowd=0)
4242

4343

44-
45-
4644
def vector_to_coco_object_annotation(annotation: ObjectAnnotation,
4745
annot_idx: int, image_id: int,
4846
category_id: int) -> COCOObjectAnnotation:

labelbox/data/serialization/coco/panoptic_dataset.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@
1818
from .annotation import PanopticAnnotation, SegmentInfo, get_annotation_lookup
1919

2020

21-
22-
2321
def vector_to_coco_segment_info(canvas: np.ndarray,
2422
annotation: ObjectAnnotation,
2523
annotation_idx: int, image: CocoImage,

0 commit comments

Comments
 (0)