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

本页目录

  • 函数
  • find_filepath_group_id
  • find_filepath_uuid
  • get_dir
  • get_file
Claude CodeCodexCursor
Luxonis 智能体工具包为你常用的编程智能体加载 Luxonis 上下文与技能,更快地基于 OAK 开发应用。
安装工具包
最后更新
Python API: luxonis_ml.data.datasets.utils

函数

find_filepath_group_id

Python
1def find_filepath_group_id(filepath: PathType, index: pl.DataFrame | None, *, raise_on_missing: bool = False) -> str | None:
查找分配给原始文件路径的组 ID。参数
  • filepath (PathType): 要查找的原始文件路径。
  • index (pl.DataFrame | None): 包含 original_filepath 和 group_id 列的可选数据帧。
  • raise_on_missing (bool): 当路径不在索引中时是否引发异常。
返回
  • str | None: 匹配的组 ID,或者当 index 为 None 或路径缺失且 raise_on_missing 为 False 时返回 None。
引发
  • ValueError: 如果 raise_on_missing 为 True 且路径不在索引中。

find_filepath_uuid

Python
1def find_filepath_uuid(filepath: PathType, index: pl.DataFrame | None, *, raise_on_missing: bool = False) -> str | None:
查找分配给原始文件路径的 UUID。参数
  • filepath (PathType): 要查找的原始文件路径。
  • index (pl.DataFrame | None): 包含 original_filepath 和 uuid 列的可选数据帧。
  • raise_on_missing (bool): 当路径不在索引中时是否引发异常。
返回
  • str | None: 匹配的 UUID,或者当 index 为 None 或路径缺失且 raise_on_missing 为 False 时返回 None。
引发
  • ValueError: 如果 raise_on_missing 为 True 且路径不在索引中。

get_dir

Python
1def get_dir(fs: LuxonisFileSystem, remote_path: PosixPathType, local_dir: PathType, mlflow_instance: ModuleType | None = None, *, default: PathType | None = None) -> Path | None:

get_file

Python
1def get_file(fs: LuxonisFileSystem, remote_path: PosixPathType, local_path: PathType, mlflow_instance: ModuleType | None = None, default: PathType | None = None) -> Path | None: