tlc.core.objects.tables.from_url.table_from_yolo

A table populated from a YOLO dataset

Module Contents

Classes

Class

Description

TableFromYoloDetection

TableFromYoloSegmentation

TableFromYolo

TableFromYoloKeypoints

A table populated from a YOLO keypoints dataset.

TableFromYoloOBB

A table populated from a YOLO OBB dataset.

API

class TableFromYoloDetection(
*,
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: str | Url | None = None,
split: str | None = None,
datasets_dir: Url | None = None,
override_split_path: list[str] | None = None,
init_parameters: Any = None,
input_tables: list[Url] | None = None,
**kwargs: Any,
)

Bases: tlc.core.objects.tables.from_url.table_from_yolo._YoloDetectionTaskHandler, tlc.core.objects.tables.from_url.table_from_yolo._TableFromYolo

class TableFromYoloSegmentation(
*,
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: str | Url | None = None,
split: str | None = None,
datasets_dir: Url | None = None,
override_split_path: list[str] | None = None,
init_parameters: Any = None,
input_tables: list[Url] | None = None,
**kwargs: Any,
)

Bases: tlc.core.objects.tables.from_url.table_from_yolo._YoloSegmentationTaskHandler, tlc.core.objects.tables.from_url.table_from_yolo._TableFromYolo

class TableFromYolo(
*,
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: str | Url | None = None,
split: str | None = None,
datasets_dir: Url | None = None,
override_split_path: list[str] | None = None,
init_parameters: Any = None,
input_tables: list[Url] | None = None,
**kwargs: Any,
)

Bases: tlc.core.objects.tables.from_url.table_from_yolo.TableFromYoloDetection

class TableFromYoloKeypoints(
*args: Any,
**kwargs: Any,
)

Bases: tlc.core.objects.tables.from_url.table_from_yolo._TableFromYolo

A table populated from a YOLO keypoints dataset.

The keypoints are stored in YOLO label format, which consists of a single file per image, where each line contains the class index, the bounding box coordinates and the keypoint coordinates.

The dataset YAML file must contain the keys path, names and the provided split. For pose estimation tasks, only a single class is expected.

In addition, the dataset YAML file should contain the ultralytics-compatible keys kpt_shape, which is a list of two integers, the first being the number of keypoints and the second being the number of channels; 2 for keypoints only, 3 for keypoints with visibility flag, and flip_idx, which are stored in the Table’s Schema, enabling flip-augmentation when used during training.

Finally, for convenience, all keypoint related arguments can also be provided in the dataset yaml file.

See (Table.from_yolo) for descriptions of all arguments.

Parameters:
  • url – The URL of the table.

  • created – The creation time 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 schema to override the table rows schema.

  • init_parameters – The initial parameters of the table.

  • input_tables – A list of Table URLs that are considered direct predecessors in this table’s lineage. This parameter serves as an explicit mechanism for tracking table relationships beyond the automatic lineage tracing typically managed by subclasses.

class TableFromYoloOBB(
*args: Any,
**kwargs: Any,
)

Bases: tlc.core.objects.tables.from_url.table_from_yolo._TableFromYolo

A table populated from a YOLO OBB dataset.

Parameters:
  • url – The URL of the table.

  • created – The creation time 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 schema to override the table rows schema.

  • init_parameters – The initial parameters of the table.

  • input_tables – A list of Table URLs that are considered direct predecessors in this table’s lineage. This parameter serves as an explicit mechanism for tracking table relationships beyond the automatic lineage tracing typically managed by subclasses.

static regularize_obb(
center: tuple[float, float],
size: tuple[float, float],
angle_deg: float,
) tuple[tuple[float, float], tuple[float, float], float]

Ensure angle is in the first quadrant [0, pi/2), flip w, h if necessary

Parameters:
  • center – The center of the OBB.

  • size – The size of the OBB.

  • angle_deg – The angle of the OBB in degrees.

Returns:

The regularized OBB.