pub fn generate_arrow_from_folder(
folder: &Path,
output: &Path,
detect_sequences: bool,
) -> Result<usize, Error>Expand description
Generate an Arrow file from a folder of images.
Scans the folder for image files and creates an Arrow annotation file with null annotations (for unannotated datasets). This is useful for importing existing image collections into EdgeFirst.
§Arguments
folder- Path to the folder containing imagesoutput- Path where the Arrow file should be writtendetect_sequences- If true, attempt to detect sequences from naming patterns
§Returns
The number of samples (images) included in the Arrow file.
§Sequence Detection
When detect_sequences is true, the function looks for patterns like:
{name}_{number}.{ext}→ sequence with frame number{sequence}/{name}_{number}.{ext}→ sequence in subdirectory
§Example
use edgefirst_client::format::generate_arrow_from_folder;
use std::path::Path;
// Generate Arrow file from images
let count = generate_arrow_from_folder(
Path::new("my_images"),
Path::new("my_dataset/my_dataset.arrow"),
true, // detect sequences
)?;
println!("Created Arrow file with {} samples", count);