calfw / README.md
marcelohaps's picture
Upload CALFW HF-ready dataset
4f3e4cd verified
metadata
license: other
task_categories:
  - image-classification
  - zero-shot-image-classification
tags:
  - face-recognition
  - face-verification
  - cross-age
  - calfw
  - imagefolder
pretty_name: CALFW HF-ready
size_categories:
  - 10K<n<100K
configs:
  - config_name: default
    data_files:
      - split: aligned
        path: aligned/**
      - split: raw
        path: raw/**

CALFW HF-ready

This folder packages the local CALFW (Cross-Age LFW) images as a Hugging Face imagefolder dataset with two splits and a verification-pairs CSV.

Splits

  • aligned: 112x112 ArcFace-aligned faces (from data/evaluation/CALFW/aligned/).
  • raw: original 250x250 LFW-style faces (from data/evaluation/CALFW/raw/).

Both splits contain the same 12174 images and the same identity labels.

Layout

calfw/
├── README.md
├── pairs.csv
├── aligned/
│   ├── images/<shard>/<file>.jpg
│   └── metadata.csv
└── raw/
    ├── images/<shard>/<file>.jpg
    └── metadata.csv

metadata.csv columns

  • file_name: relative image path used by ImageFolder, e.g. images/000/AJ_Cook_0001.jpg.
  • label: numeric identity label, shared across the two splits.
  • label_name / identity: identity name corresponding to label.
  • image_num: per-identity image index from the original filename (e.g. 0001).
  • variant: aligned or raw.
  • source_filename: original CALFW filename.

pairs.csv columns

pairs.csv mirrors txts/pairs_CALFW.txt (6000 verification pairs; 3000 same-identity cross-age positives and 3000 negatives, split into 10 folds of 600 pairs each).

  • pair_id (0..5999), fold_id (1..10), fold_position (0..299).
  • is_same: 1 for positive pairs, 0 for negatives.
  • image_a, image_b: bare filenames as in the upstream pairs file.
  • image_a_aligned_path, image_b_aligned_path: path under the aligned split.
  • image_a_raw_path, image_b_raw_path: path under the raw split.

Local Stats

  • Images per split: 12174
  • Unique identities: 4025
  • Identities with one image: 1
  • Verification pairs: 6000 (3000 positive / 3000 negative)
  • Folds: 10 x 600 pairs

Loading

from datasets import load_dataset

ds = load_dataset("imagefolder", data_dir="data/evaluation/huggingface/calfw")
ds["aligned"], ds["raw"]
import pandas as pd

pairs = pd.read_csv("data/evaluation/huggingface/calfw/pairs.csv")

Notes

CALFW (Cross-Age LFW) is described by its authors as a verification benchmark that emphasizes age variation between the two faces in each positive pair. Check the original dataset terms before publishing or redistributing it.