Datasets:
The dataset viewer is not available for this dataset.
Error code: ConfigNamesError
Exception: RuntimeError
Message: Dataset scripts are no longer supported, but found fairface.py
Traceback: Traceback (most recent call last):
File "/src/services/worker/src/worker/job_runners/dataset/config_names.py", line 67, in compute_config_names_response
config_names = get_dataset_config_names(
path=dataset,
token=hf_token,
)
File "/usr/local/lib/python3.14/site-packages/datasets/inspect.py", line 161, in get_dataset_config_names
dataset_module = dataset_module_factory(
path,
...<4 lines>...
**download_kwargs,
)
File "/usr/local/lib/python3.14/site-packages/datasets/load.py", line 1182, in dataset_module_factory
raise e1 from None
File "/usr/local/lib/python3.14/site-packages/datasets/load.py", line 1142, in dataset_module_factory
raise RuntimeError(f"Dataset scripts are no longer supported, but found {filename}")
RuntimeError: Dataset scripts are no longer supported, but found fairface.pyNeed help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
Dataset Card for FairFace
Usage
from io import BytesIO
from PIL import Image
import datasets
def bytes_to_pil(example_batch):
example_batch['img'] = [
Image.open(BytesIO(b)) for b in example_batch.pop('img_bytes')
]
return example_batch
ds = datasets.load_dataset('nateraw/fairface')
ds = ds.with_transform(bytes_to_pil)
Dataset Summary
Existing public face datasets are strongly biased toward Caucasian faces, and other races (e.g., Latino) are significantly underrepresented. This can lead to inconsistent model accuracy, limit the applicability of face analytic systems to non-White race groups, and adversely affect research findings based on such skewed data. To mitigate the race bias in these datasets, we construct a novel face image dataset, containing 108,501 images, with an emphasis of balanced race composition in the dataset. We define 7 race groups: White, Black, Indian, East Asian, Southeast Asian, Middle East, and Latino. Images were collected from the YFCC-100M Flickr dataset and labeled with race, gender, and age groups. Evaluations were performed on existing face attribute datasets as well as novel image datasets to measure generalization performance. We find that the model trained from our dataset is substantially more accurate on novel datasets and the accuracy is consistent between race and gender groups.
Dataset Structure
Data Fields
- img_bytes: Bytes representing an image
- age: Age of the person in the image
- gender: Gender of the person in the image
- race: Race of the person in the image
Data Instances
{
'age': 6,
'gender': 1,
'img_bytes': b'\\\\\\\\\\\\\\\\xff\\\\\\\\\\\\\\\\xd8...',
'race': 1
}
- Downloads last month
- 33