tlc.core.objects.tables.from_url.table_from_yolo#

A table populated from a YOLO dataset

Module Contents#

Classes#

Class

Description

TableFromYolo

A table populated from a YOLO dataset, defined by a YAML file and a split.

API#

class tlc.core.objects.tables.from_url.table_from_yolo.TableFromYolo(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: str | tlc.core.url.Url | None = None, split: str | None = None, init_parameters: Any = None)#

Bases: tlc.core.objects.tables.in_memory_rows_table._InMemoryRowsTable

A table populated from a YOLO dataset, defined by a YAML file and a split.

The TableFromYolo class is an interface between 3LC and the YOLO data format. The YAML file must contain the keys path, names and the provided split. If the path in the YAML file is relative, a set of alternatives are tried: The directory with the YAML file, the parent of this directory and the current working directory.

Example:

table = TableFromYolo(
    input_url="path/to/yaml/file.yaml",
    split="train",
)
print(table.table_rows[0])
Parameters:
  • input_url – The path to the YAML file.

  • split – The split to use.

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.