File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed
Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change 66from typing import Dict , Iterable , List
77
88from 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+ )
915from labelformat .model .binary_mask_segmentation import (
1016 BinaryMaskSegmentation ,
1117 RLEDecoderEncoder ,
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- )
3535from labelformat .types import JsonDict , ParseError
3636
3737
Original file line number Diff line number Diff line change 11from __future__ import annotations
2+
23from typing import List , TypedDict
34
45from labelformat .model .binary_mask_segmentation import (
@@ -17,6 +18,7 @@ class COCOInstanceSegmentationRLE(TypedDict):
1718
1819COCOInstanceSegmentationMultiPolygon = List [List [float ]]
1920
21+
2022def coco_segmentation_to_binary_mask_rle (
2123 segmentation : COCOInstanceSegmentationRLE , bbox : list [float ]
2224) -> BinaryMaskSegmentation :
You can’t perform that action at this time.
0 commit comments