annotations_dataframe

Function annotations_dataframe 

Source
pub fn annotations_dataframe(
    annotations: &[Annotation],
) -> Result<DataFrame, Error>
👎Deprecated since 0.8.0: Use samples_dataframe() for complete 2025.10 schema support
Expand description

Create a DataFrame from a slice of annotations (2025.01 schema).

DEPRECATED: Use samples_dataframe() instead for full 2025.10 schema support including optional metadata columns (size, location, pose, degradation).

This function generates a DataFrame with the original 9-column schema. It remains functional for backward compatibility but does not include new optional columns added in version 2025.10.

§Schema (2025.01)

  • name: Sample name (String)
  • frame: Frame number (UInt64)
  • object_id: Object tracking ID (String)
  • label: Object label (Categorical)
  • label_index: Label index (UInt64)
  • group: Dataset group (Categorical)
  • mask: Segmentation mask (List)
  • box2d: 2D bounding box [cx, cy, w, h] (Array<Float32, 4>)
  • box3d: 3D bounding box [x, y, z, w, h, l] (Array<Float32, 6>)

§Migration

use edgefirst_client::{Client, samples_dataframe};

// OLD (deprecated):
let annotations = client
    .annotations(annotation_set_id, &groups, &types, None)
    .await?;
let df = edgefirst_client::annotations_dataframe(&annotations)?;

// NEW (recommended):
let samples = client
    .samples(
        dataset_id,
        Some(annotation_set_id),
        &types,
        &groups,
        &[],
        None,
    )
    .await?;
let df = samples_dataframe(&samples)?;