The full dataset viewer is not available (click to read why). Only showing a preview of the rows.
Error code: JobManagerCrashedError
Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
image
image |
---|
license: mit language: en tags:
- computer-vision
- face-detection
- image-classification
Cropped Faces from WIDER FACE Dataset
Dataset Description
This repository provides two key datasets for face-related computer vision tasks, delivered as two separate .zip
archives:
WIDER_val.zip
: A compressed archive of the original validation set from the well-known WIDER FACE dataset. It contains 3,226 images with a wide variety of scales, poses, and occlusions.WIDER_val_cropped_faces.zip
: A new, high-quality dataset of 18,000+ cropped faces generated from the images inWIDER_val.zip
. These images are ideal for training generative models (like GANs or Diffusion Models) or face recognition systems.
The cropped faces were generated using a custom, high-performance Rust application. For more information on the generation process and to view the source code, please see the GitHub Repository: r4plh/rustFaceCrop.
How to Use
The data is provided as .zip
files. You can download them directly from the "Files and versions" tab or use git
to clone the repository.
Once downloaded and unzipped, you can easily load the images using Python.
Loading the Original Validation Images
import glob
from PIL import Image
# Make sure you have unzipped WIDER_val.zip
validation_image_paths = glob.glob("WIDER_val/**/*.jpg", recursive=True)
print(f"Found {len(validation_image_paths)} original validation images.")
# Example of loading the first image
if validation_image_paths:
img = Image.open(validation_image_paths[0])
img.show()
Loading the Cropped Face Images
import glob
from PIL import Image
# Make sure you have unzipped WIDER_val_cropped_faces.zip
# The images are inside a folder named 'cropped_faces' within the zip.
cropped_face_paths = glob.glob("cropped_faces/*.jpg")
print(f"Found {len(cropped_face_paths)} cropped faces.")
# Example of loading the first cropped face
if cropped_face_paths:
face_img = Image.open(cropped_face_paths[0])
print(f"Image size: {face_img.size}")
face_img.show()
Files Included
WIDER_val.zip
- Description: A zip archive containing the complete, original WIDER FACE validation dataset (3,226 images) organized into 61 subdirectories, preserving the original structure.
WIDER_val_cropped_faces.zip
- Description: A zip archive containing 18,000+ cropped face images generated from the WIDER FACE validation set. Upon unzipping, all images are located in a single, flat folder named
cropped_faces
for easy access.
- Description: A zip archive containing 18,000+ cropped face images generated from the WIDER FACE validation set. Upon unzipping, all images are located in a single, flat folder named
Dataset Structure
After unzipping the archives, your directory will be structured as follows:
.
βββ WIDER_val/
β βββ 0--Parade/
β β βββ 0_Parade_marchingband_1_1.jpg
β β βββ ...
β βββ 1--Handshaking/
β β βββ ...
β βββ ... (61 subdirectories in total)
β
βββ cropped_faces/
βββ 0--Parade_0_Parade_marchingband_1_1_face_1.jpg
βββ 0--Parade_0_Parade_marchingband_1_1_face_2.jpg
βββ ... (18,000+ image files)
Dataset Creation
Source Data
The source images are from the WIDER FACE dataset, one of the most widely used benchmarks for face detection. The original dataset was created by the Chinese University of Hong Kong (CUHK).
Generation Process
The cropped_faces
dataset was generated by processing all 3,226 images from the WIDER_val
set with a custom Rust application.
- Repository for the Rust Code: github.com/r4plh/rustFaceCrop
- Detection Model:
yolov11n-face.onnx
, a lightweight and accurate YOLO model.
The generation pipeline involved several key steps to ensure quality:
- Decoding Model Output: The program correctly decodes the model's complex, transposed output shape (
[1, 5, 8400]
) to get accurate bounding box data. - Filtering with NMS: Non-Max Suppression (NMS) with an IoU threshold of
0.45
was used to eliminate noisy and overlapping detections, ensuring only the single best box for each face was kept. - Safe Cropping: The code uses safe math (
saturating_sub
) to add padding to the bounding boxes without crashing on faces near the image edge. It also performs a final sanity check to ensure crop dimensions are valid before saving the file.
Curation Rationale
The primary goal of this dataset is to provide a clean, ready-to-use set of aligned and cropped faces. This saves researchers and developers the significant time and computational effort required for the detection and preprocessing steps, allowing them to focus directly on training generative models or other face-specific tasks.
Considerations for Using the Data
- Bias: This dataset inherits any biases present in the original WIDER FACE dataset regarding demographics, geography, and scenarios.
- Model Limitations: The quality and completeness of the
cropped_faces
set are dependent on the performance of theyolov11n-face
model. Some very small, heavily occluded, or non-frontal faces may have been missed. - File Naming: The filenames for the cropped faces are programmatically generated and can be long, reflecting the original subdirectory and filename.
Licensing Information
The original WIDER FACE dataset does not specify a license but is widely used for academic and research purposes. The new dataset of cropped faces is provided under the MIT License. However, the use of these images is still subject to any terms and conditions of the original source data.
Citation
If you use this dataset in your work, please cite the original WIDER FACE paper:
@inproceedings{yang2016wider,
Author = {Yang, Shuo and Luo, Ping and Chen Change, Loy and Tang, Xiaoou},
Booktitle = {IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},
Title = {WIDER FACE: A Face Detection Benchmark},
Year = {2016}
}
- Downloads last month
- 5