resolve_arrow_files

Function resolve_arrow_files 

Source
pub fn resolve_arrow_files(
    arrow_path: &Path,
) -> Result<HashMap<String, PathBuf>, Error>
Expand description

Resolve all file paths referenced by an Arrow annotation file.

Reads the Arrow file and extracts the name and frame columns to determine which image files are referenced. Returns a map from sample name to the expected relative file path within the sensor container.

§Arguments

  • arrow_path - Path to the Arrow annotation file

§Returns

A map from sample name (e.g., “deer_001”) to relative file path within the sensor container (e.g., “deer/deer_001.camera.jpeg”).

§Errors

Returns an error if:

  • Arrow file cannot be read
  • Arrow file is missing required columns
  • Arrow file has invalid data types

§Example

use edgefirst_client::format::resolve_arrow_files;
use std::path::Path;

let arrow_path = Path::new("dataset/dataset.arrow");
let files = resolve_arrow_files(arrow_path)?;

for (name, relative_path) in &files {
    println!("Sample '{}' -> {:?}", name, relative_path);
}