| | --- |
| | license: cc0-1.0 |
| | size_categories: |
| | - 1K<n<10K |
| | configs: |
| | - config_name: default |
| | data_files: |
| | - split: train |
| | path: data/train-* |
| | dataset_info: |
| | features: |
| | - name: image |
| | dtype: image |
| | - name: label |
| | dtype: |
| | class_label: |
| | names: |
| | '0': yaleB01 |
| | '1': yaleB02 |
| | '2': yaleB03 |
| | '3': yaleB04 |
| | '4': yaleB05 |
| | '5': yaleB06 |
| | '6': yaleB07 |
| | '7': yaleB08 |
| | '8': yaleB09 |
| | '9': yaleB10 |
| | '10': yaleB11 |
| | '11': yaleB12 |
| | '12': yaleB13 |
| | '13': yaleB15 |
| | '14': yaleB16 |
| | '15': yaleB17 |
| | '16': yaleB18 |
| | '17': yaleB19 |
| | '18': yaleB20 |
| | '19': yaleB21 |
| | '20': yaleB22 |
| | '21': yaleB23 |
| | '22': yaleB24 |
| | '23': yaleB25 |
| | '24': yaleB26 |
| | '25': yaleB27 |
| | '26': yaleB28 |
| | '27': yaleB29 |
| | '28': yaleB30 |
| | '29': yaleB31 |
| | '30': yaleB32 |
| | '31': yaleB33 |
| | '32': yaleB34 |
| | '33': yaleB35 |
| | '34': yaleB36 |
| | '35': yaleB37 |
| | '36': yaleB38 |
| | '37': yaleB39 |
| | splits: |
| | - name: train |
| | num_bytes: 40564197 |
| | num_examples: 2453 |
| | download_size: 40809256 |
| | dataset_size: 40564197 |
| | --- |
| | |
| | # **Cropped Yale Face Dataset (Grayscale)** |
| |
|
| | A clean and standardized version of the **Cropped Yale Facial Image Dataset**, containing **grayscale 168×192 cropped facial images** captured under controlled illumination conditions. |
| | This dataset is widely used for: |
| |
|
| | * Face recognition |
| | * Illumination-invariant modeling |
| | * Classical computer vision research |
| | * Autoencoders & generative models |
| |
|
| | --- |
| |
|
| | ## **Overview** |
| |
|
| | The **Cropped Yale Face Dataset** is derived from the original **Yale Face Database B**. |
| |
|
| | This version contains: |
| |
|
| | * **28 human subjects** |
| | * **Frontal face images only** |
| | * **Strong illumination variations** from many light source directions |
| | * **Aligned, cropped, grayscale images** |
| |
|
| | Ideal for: |
| |
|
| | * Face recognition experiments |
| | * Light normalization research |
| | * PCA/LDA classical ML tasks |
| | * Autoencoders, GANs, and image reconstruction tasks |
| |
|
| | --- |
| |
|
| | ## **Dataset Structure** |
| |
|
| | ``` |
| | dataset/ |
| | │ |
| | ├── yaleB01/ |
| | │ ├── yaleB01_P00A+000E+00.pgm |
| | │ ├── yaleB01_P00A+000E+01.pgm |
| | │ └── ... |
| | │ |
| | ├── yaleB02/ |
| | │ ├── yaleB02_P00A+000E+00.pgm |
| | │ ├── yaleB02_P00A+000E+01.pgm |
| | │ └── ... |
| | │ |
| | └── ... |
| | ``` |
| |
|
| | --- |
| |
|
| | ## **File Format** |
| |
|
| | | Property | Value | |
| | | ------------------ | --------------- | |
| | | Image size | **168 × 192** | |
| | | Color mode | **Grayscale** | |
| | | File type | `.png` / `.jpg` | |
| | | Subjects | **28** | |
| | | Images per subject | ~**64** | |
| |
|
| | --- |
| |
|
| | ## **Example Usage** |
| |
|
| | ### **Load Images with Python (Hugging Face Datasets)** |
| |
|
| | ```python |
| | from datasets import load_dataset |
| | import matplotlib.pyplot as plt |
| | |
| | ds = load_dataset("YOUR_USERNAME/cropped-yale") |
| | |
| | sample = ds["train"][0]["image"] |
| | plt.imshow(sample, cmap="gray") |
| | plt.axis("off") |
| | ``` |
| |
|
| | --- |
| |
|
| | ### **TensorFlow Preprocessing Example** |
| |
|
| | ```python |
| | import tensorflow as tf |
| | |
| | def preprocess(img): |
| | img = tf.image.resize(img, (192, 168)) |
| | img = tf.cast(img, tf.float32) / 255.0 |
| | return img |
| | ``` |
| |
|
| | --- |
| |
|
| | ### **PyTorch Example** |
| |
|
| | ```python |
| | from torchvision import transforms |
| | |
| | transform = transforms.Compose([ |
| | transforms.Resize((192, 168)), |
| | transforms.ToTensor() |
| | ]) |
| | ``` |
| |
|
| | --- |
| |
|
| | ## **Applications** |
| |
|
| | ### **Face Recognition** |
| |
|
| | Train classical or modern models: |
| |
|
| | * Eigenfaces |
| | * Fisherfaces |
| | * SVM classifiers |
| | * CNN-based architectures |
| |
|
| | ### **Illumination-Invariant Face Analysis** |
| |
|
| | Evaluate model robustness under extreme lighting shifts. |
| |
|
| | ### **Dimensionality Reduction** |
| |
|
| | Perfect for: |
| |
|
| | * PCA |
| | * LDA |
| | * Linear subspace modeling |
| |
|
| | ### **Autoencoders / GANs** |
| |
|
| | Great for: |
| |
|
| | * Reconstruction |
| | * Denoising |
| | * Generative modeling |
| |
|
| | --- |
| |
|
| | ## **Sample Images** |
| |
|
| |  |
| |
|
| | --- |
| |
|
| | ## **Download / Use** |
| |
|
| | If you're viewing this on **Hugging Face**, simply click: |
| |
|
| | > **Use dataset → Load in Python** |
| |
|
| | Or install via: |
| |
|
| | ```python |
| | load_dataset("YOUR_USERNAME/cropped-yale") |
| | ``` |
| |
|
| | --- |
| |
|
| | ## **License & Citation** |
| |
|
| | This dataset is derived from: |
| |
|
| | **Yale Face Database B** and the **Cropped Yale Dataset**, prepared by Yale University researchers. |
| |
|
| | If you use this dataset in academic work, please cite: |
| |
|
| | > Georghiades, A. S., Belhumeur, P. N., & Kriegman, D. J. |
| | > *From Few Pixels to the Illumination Cone Model*. |
| | > IEEE Transactions on Pattern Analysis and Machine Intelligence (PAMI), 2001. |
| |
|
| | All images are provided **for research and academic purposes only**. |
| |
|
| | --- |
| |
|
| | ## **Acknowledgements** |
| |
|
| | Special thanks to **Yale University** for releasing the original dataset and supporting reproducible computer vision research. |
| |
|
| | --- |