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¶
- SEGMENTATION_FORMATS = None¶
 
- class CocoMode¶
 Bases:
enum.Enum- DETECT = detect¶
 
- SEGMENT = segment¶
 
- KEYPOINTS = pose¶
 
- STUFF_SEGMENTATION = stuff_segmentation¶
 
- PANOPTIC_SEGMENTATION = panoptic_segmentation¶
 
- IMAGE_CAPTIONING = image_captioning¶
 
- DENSE_POSE = dense_pose¶
 
- class TableFromCoco(
 - *,
 - url: Url | None = None,
 - created: str | None = None,
 - description: str | None = None,
 - row_cache_url: Url | None = None,
 - row_cache_populated: bool | None = None,
 - override_table_rows_schema: Any = None,
 - input_url: Url | str | None = None,
 - image_folder_url: Url | str | None = None,
 - include_iscrowd: bool | None = None,
 - keep_crowd_annotations: bool | None = None,
 - init_parameters: Any = None,
 - input_tables: list[Url] | None = None,
 - task: Literal[detect, segment, pose] | None = None,
 - segmentation_format: Literal[polygons, masks] | None = None,
 - points: list[float] | None = None,
 - point_attributes: list[str] | list[dict[str, str]] | None = None,
 - lines: list[int] | None = None,
 - line_attributes: list[str] | list[dict[str, str]] | None = None,
 - triangles: list[int] | None = None,
 - triangle_attributes: list[str] | list[dict[str, str]] | None = None,
 - flip_indices: list[int] | None = None,
 - oks_sigmas: list[float] | None = None,
 Bases:
tlc.core.objects.tables.in_memory_rows_table._InMemoryRowsTableA 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, segment or pose).
segmentation_format – The format of the segmentation (polygons or masks).
points – Default keypoint coordinates, used for drawing new instances in the Dashboard. Pose only.
point_attributes – Attributes for each keypoint (e.g. name or color). Pose only.
lines – Default skeleton topology for pose. Will override the skeleton provided in the annotations file. Pose only.
line_attributes – Attributes for each line (e.g. name or color). Pose only.
triangles – Triangles for pose.
triangle_attributes – Attributes for each triangle (e.g. name or color). Pose only.
flip_indices – Flip indices for pose.
oks_sigmas – OKS sigmas for pose.
- property coco: pycocotools.coco.COCO¶
 Load COCO object from input_url if not already loaded.