File size: 2,641 Bytes
4f3e4cd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
---
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

```python
from datasets import load_dataset

ds = load_dataset("imagefolder", data_dir="data/evaluation/huggingface/calfw")
ds["aligned"], ds["raw"]
```

```python
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.