tensorflow_csv_parser
最后更新
luxonis_ml.data.parsers.tensorflow_csv_parser类
TensorflowCSVParser
Text
1dataset_dir/
2├── train/
3│ ├── img1.jpg
4│ ├── img2.jpg
5│ ├── ...
6│ └── _annotations.csv
7├── valid/
8└── test/方法
from_dir
Python
1def from_dir(dataset_dir: Path) -> tuple[list[Path], list[Path], list[Path]]:dataset_dir(Path): 源数据集目录。**kwargs: 其他特定于解析器的参数。
tuple[list[Path], list[Path], list[Path]]: 训练集、验证集和测试集添加的图像。
from_split
Python
1def from_split(image_dir: Path, annotation_path: Path) -> ParserOutput:image_dir(Path): 包含图像的目录。annotation_path(Path): 注释 CSV 文件。
ParserOutput: 包含注释记录、骨架元数据和添加图像的解析器输出。
validate_split
Python
1def validate_split(split_path: Path) -> dict[str, Any] | None:split_path(Path): 拆分目录的路径。
dict[str, Any] | None:from_split的关键字参数,如果拆分不符合预期格式,则为None。