| --- |
| license: other |
| license_name: research-only-mixed |
| pretty_name: Face Detection (CelebA + CBCL + Caltech-256) |
| task_categories: |
| - object-detection |
| - image-classification |
| tags: |
| - face-detection |
| - viola-jones |
| size_categories: |
| - 100K<n<1M |
| --- |
| |
| # Face Detection Dataset |
|
|
| Small grayscale face crops + a large pool of natural-image negatives, packaged |
| for classical face detectors (Viola-Jones, Haar cascades, sliding-window |
| classifiers). |
|
|
| ## At a glance |
|
|
| | Split | Rows | Faces / Non-faces | |
| |---|---|---| |
| | `train` | 106,977 | 102,429 / 4,548 | |
| | `test` | 24,045 | 472 / 23,573 (CBCL benchmark) | |
| | `negatives` | 29,879 | — / 29,879 (Caltech-256) | |
|
|
| Same schema across all splits: `image`, `label` (0/1), `source`, `category`. |
|
|
| ## Quick start |
|
|
| ```python |
| from datasets import load_dataset |
| |
| ds = load_dataset("salvacarrion/face-detection") |
| |
| # All faces for training |
| faces = ds["train"].filter(lambda x: x["label"] == 1) |
| |
| # CBCL benchmark for evaluation |
| test = ds["test"] |
| |
| # Hard-negative pool (raw color JPGs at native resolution) |
| negs = ds["negatives"] |
| ``` |
|
|
| ## Face sources (train split) |
|
|
| CelebA ships in **two paired variants at the same index** — same person, |
| two crop styles: |
|
|
| - `celeba` — loose portrait framing (hair and jaw visible). |
| - `celeba_aligned` — tight Viola-Jones crop (eyes pinned to fixed pixel |
| positions, face fills the 48×48 frame). |
|
|
| CBCL is already canonically aligned, so it has a single variant. |
|
|
| | `source` | Label | Count | Notes | |
| |---|---|---|---| |
| | `celeba` | 1 | 50,000 | Loose portrait. Filtered for frontal pose using the manual CelebA landmarks. | |
| | `celeba_aligned` | 1 | 50,000 | Same 50,000 faces tightly warped to CBCL-matched geometry. | |
| | `cbcl` | 1 | 2,429 | MIT CBCL #1, upsampled from native 19×19. Already canonically aligned. | |
| | `cbcl` | 0 | 4,548 | CBCL non-faces — matched-domain seed for stage 1 of cascade training. | |
|
|
| Picking `source == "cbcl"` from train returns **both faces and non-faces** — |
| filter by `label` to pick. |
|
|
| ## Test split |
|
|
| The classic CBCL Viola-Jones benchmark, untouched. Faces and non-faces live |
| together in one split so accuracy is one pass. |
|
|
| ## Negatives split |
|
|
| Caltech-256 source JPGs (native color, varying resolution). Categories |
| containing `face`, `people`, or `human` are excluded. Sample patches at |
| whatever resolution your detector needs. |
|
|
| ## Aligned geometry (the `*_aligned` variants) |
| |
| Two-point similarity transform — face shape preserved, no stretching: |
| |
| - Left eye → (12, 10) in a 48×48 frame |
| - Right eye → (36, 10) |
| |
| The canonical positions were measured empirically from the mean of CBCL |
| training faces, so models trained on `celeba_aligned` generalize cleanly to |
| the CBCL test benchmark. |
| |
| ## License |
| |
| Research / non-commercial use only. Cite the original sources: |
| |
| - [CelebA](http://mmlab.ie.cuhk.edu.hk/projects/CelebA.html) |
| - [MIT CBCL Face Database #1](http://cbcl.mit.edu/software-datasets/FaceData2.html) |
| - [Caltech-256](https://data.caltech.edu/records/nyy15-4j048) |
| |