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, a split and optionally a root path.

API#

class tlc.core.objects.tables.from_url.table_from_yolo.TableFromYolo(url: tlc.core.url.Url | None = None, created: 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.table.Table

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

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.