tlc.core.objects.tables.from_url.table_from_yolo
#
A table populated from a YOLO dataset
Module Contents#
Classes#
Class |
Description |
---|---|
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, datasets_dir: tlc.core.url.Url | None = None, override_split_path: list[str] | None = None, init_parameters: Any = None, input_tables: list[tlc.core.url.Url] | None = 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 keyspath
,names
and the providedsplit
. 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 Url to the YOLO YAML file to parse.
split – The split of the dataset to use. Default is “val”.
datasets_dir_url – The Url to prepend to the ‘path’ in the YAML file if it is relative. If not provided, the directory where the YAML sits is used.
override_split_path – A list of paths to override the paths in the YAML file. If provided, the ‘path’ and ‘
’ in the YAML file are ignored.
- 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.