Skip to content

Commit 214fb53

Browse files
committed
format
1 parent 148f769 commit 214fb53

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

src/labelformat/formats/coco.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@
66
from typing import Dict, Iterable, List
77

88
from labelformat.cli.registry import Task, cli_register
9+
from labelformat.formats.coco_segmentation_helpers import (
10+
COCOInstanceSegmentationMultiPolygon,
11+
COCOInstanceSegmentationRLE,
12+
coco_segmentation_to_binary_mask_rle,
13+
coco_segmentation_to_multipolygon,
14+
)
915
from labelformat.model.binary_mask_segmentation import (
1016
BinaryMaskSegmentation,
1117
RLEDecoderEncoder,
@@ -26,12 +32,6 @@
2632
ObjectDetectionOutput,
2733
SingleObjectDetection,
2834
)
29-
from labelformat.formats.coco_segmentation_helpers import (
30-
coco_segmentation_to_binary_mask_rle,
31-
coco_segmentation_to_multipolygon,
32-
COCOInstanceSegmentationMultiPolygon,
33-
COCOInstanceSegmentationRLE,
34-
)
3535
from labelformat.types import JsonDict, ParseError
3636

3737

src/labelformat/formats/coco_segmentation_helpers.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from __future__ import annotations
2+
23
from typing import List, TypedDict
34

45
from labelformat.model.binary_mask_segmentation import (
@@ -17,6 +18,7 @@ class COCOInstanceSegmentationRLE(TypedDict):
1718

1819
COCOInstanceSegmentationMultiPolygon = List[List[float]]
1920

21+
2022
def coco_segmentation_to_binary_mask_rle(
2123
segmentation: COCOInstanceSegmentationRLE, bbox: list[float]
2224
) -> BinaryMaskSegmentation:

0 commit comments

Comments
 (0)