此页面由 AI 自动翻译。查看英文原版
最后更新

本页目录

  • 类
  • ExporterSpec
  • PreparedLDF
  • 函数
  • annotation_to_polygons
  • check_group_file_correspondence
  • create_zip_output
  • decode_rle_with_pycoco
  • exporter_specific_annotation_warning
  • get_single_skeleton
  • split_of_group
Claude CodeCodexCursor
Luxonis 智能体工具包为你常用的编程智能体加载 Luxonis 上下文与技能,更快地基于 OAK 开发应用。
安装工具包

exporter_utils

最后更新
Python API: luxonis_ml.data.exporters.exporter_utils

类

ExporterSpec

导出器类和构造函数参数。

属性

cls
要实例化的导出器类。
kwargs
传递给导出器构造函数的关键字参数。

PreparedLDF

用于导出 LDF 数据的轻量级容器。

方法

init
Python
1def __init__(splits: dict[str, Any], processed_df: pl.DataFrame, grouped_image_sources: pl.DataFrame):
from_dataset
Python
1def from_dataset(dataset: LuxonisDataset) -> PreparedLDF:
准备数据集以导出为 LDF 表示。参数
  • dataset (LuxonisDataset): 要准备的数据集。
返回
  • PreparedLDF: 准备好的 LDF 容器。
引发
  • ValueError: 如果数据集没有拆分。
  • FileNotFoundError: 如果无法从其原始位置或数据集媒体目录解析图像路径。

属性

grouped_image_sources
组 ID、源名称和文件路径的唯一映射。
processed_df
已将路径解析为可读文件的注释数据帧。
splits
拆分名称映射到组 ID。

函数

annotation_to_polygons

Python
1def annotation_to_polygons(ann: dict[str, Any], file_path: Path) -> list[list[tuple[float, float]]]:

check_group_file_correspondence

Python
1def check_group_file_correspondence(prepared_ldf: PreparedLDF):

create_zip_output

Python
1def create_zip_output(max_partition_size: float | None, output_path: Path, part: int | None, dataset_identifier: str) -> Path | list[Path]:

decode_rle_with_pycoco

Python
1def decode_rle_with_pycoco(ann: dict[str, Any]) -> np.ndarray:

exporter_specific_annotation_warning

Python
1def exporter_specific_annotation_warning(prepared_ldf: PreparedLDF, supported_ann_types: list[str]):

get_single_skeleton

Python
1def get_single_skeleton(allow_keypoints: bool, skeletons: dict[str, Any] | None = None) -> tuple[list[str], list[list[int]]]:
返回单个骨架的标签和 COCO 样式边缘。边缘根据 COCO 规范转换为基于 1 的索引。

split_of_group

Python
1def split_of_group(prepared_ldf: PreparedLDF, group_id: Any) -> str: