tlc.core.objects.tables.from_url.table_from_coco
¶
A table populated from a dataset in the COCO format
Module Contents¶
Classes¶
Class |
Description |
---|---|
A table populated from a COCO format annotations JSON file and associated image folder. |
Data¶
Data |
Description |
---|---|
API¶
- tlc.core.objects.tables.from_url.table_from_coco.SEGMENTATION_FORMATS = None¶
- class tlc.core.objects.tables.from_url.table_from_coco.CocoMode¶
Bases:
enum.Enum
- DETECT = detect¶
- SEGMENT = segment¶
- KEYPOINTS = keypoints¶
- STUFF_SEGMENTATION = stuff_segmentation¶
- PANOPTIC_SEGMENTATION = panoptic_segmentation¶
- IMAGE_CAPTIONING = image_captioning¶
- DENSE_POSE = dense_pose¶
- class tlc.core.objects.tables.from_url.table_from_coco.TableFromCoco(*, url: tlc.core.url.Url | None = None, created: str | None = None, description: str | None = None, row_cache_url: tlc.core.url.Url | None = None, row_cache_populated: bool | None = None, override_table_rows_schema: Any = None, input_url: tlc.core.url.Url | str | None = None, image_folder_url: tlc.core.url.Url | str | None = None, include_iscrowd: bool | None = None, keep_crowd_annotations: bool | None = None, init_parameters: Any = None, input_tables: list[tlc.core.url.Url] | None = None, task: Literal[detect, segment] | None = None, segmentation_format: Literal[polygons, masks] | None = None)¶
Bases:
tlc.core.objects.tables.in_memory_rows_table._InMemoryRowsTable
A table populated from a COCO format annotations JSON file and associated image folder.
This class provides functionality to load and process datasets in the COCO (Common Objects in Context) format, supporting both object detection and instance segmentation tasks. It can handle both crowd and non-crowd annotations, and can be configured to output either polygons or masks.
References: COCO data format: https://cocodataset.org/#format-data COCO data format APIs: https://github.com/cocodataset/cocoapi
Initialize a TableFromCoco object.
- Parameters:
url – The URL of the table.
created – The creation date of the table.
description – The description of the table.
row_cache_url – The URL of the row cache.
row_cache_populated – Whether the row cache is populated.
override_table_rows_schema – The table rows schema to override.
input_url – The URL of the input data.
image_folder_url – The URL of the image folder.
include_iscrowd – Whether to include the per-instance iscrowd flag in the table rows.
keep_crowd_annotations – Whether to keep annotations with iscrowd=1.
input_tables – A list of Table Urls that should be used as input tables.
task – The task to perform (detect or segment).
segmentation_format – The format of the segmentation (polygons or masks).
- property coco: pycocotools.coco.COCO¶
Load COCO object from input_url if not already loaded.