cplfw / README.md
marcelohaps's picture
Add files using upload-large-folder tool
c4b9e27 verified
metadata
license: other
task_categories:
  - image-classification
  - zero-shot-image-classification
tags:
  - face-recognition
  - face-verification
  - cross-pose
  - cplfw
  - imagefolder
pretty_name: CPLFW HF-ready
size_categories:
  - 10K<n<100K

CPLFW HF-ready

This folder packages the local CPLFW (Cross-Pose LFW) aligned images as a Hugging Face imagefolder dataset with a verification-pairs CSV.

Layout

cplfw/
├── README.md
├── pairs.csv
└── train/
    ├── images/<shard>/<file>.jpg
    └── metadata.csv

metadata.csv columns

  • file_name: relative image path used by ImageFolder, e.g. images/000/AJ_Cook_1.jpg.
  • label: numeric identity label.
  • label_name / identity: identity name.
  • image_num: per-identity image index from the original filename.
  • source_filename: original CPLFW filename.

pairs.csv columns

pairs.csv mirrors pairs_CPLFW.txt (6000 verification pairs; 3000 same-identity cross-pose positives and 3000 negatives, split into 10 folds of 600 pairs each following the LFW convention).

  • 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_path, image_b_path: paths under the train split.

Local Stats

  • Images: 11648
  • Unique identities: 3929
  • Identities with one image: 21
  • Verification pairs: 6000 (3000 positive / 3000 negative)
  • Folds: 10 x 600 pairs

Skipped upstream files

These four upstream files have malformed names (typos like _3jpg.jpg, .jip.jpg, or - instead of _). They are not referenced by any verification pair, so the benchmark is unaffected.

  • Landon_Donovan_3jpg.jpg
  • Leni_Bjorklund-2.jpg
  • Leni_Bjorklund-3.jpg
  • Mike_Montgomery_3.jip.jpg

Loading

from datasets import load_dataset

ds = load_dataset("imagefolder", data_dir="data/evaluation/huggingface/cplfw")
train = ds["train"]
import pandas as pd

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

Notes

CPLFW (Cross-Pose LFW) is described by its authors as a verification benchmark emphasizing pose variation between the two faces in each positive pair. Check the original dataset terms before publishing or redistributing it.