nateraw commited on
Commit
635d823
·
1 Parent(s): 5d589fb

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +23 -19
README.md CHANGED
@@ -13,29 +13,31 @@ paperswithcode_id: fairface
13
 
14
  # Dataset Card for FairFace
15
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
  ## Table of Contents
17
  - [Dataset Description](#dataset-description)
18
  - [Dataset Summary](#dataset-summary)
19
- - [Supported Tasks and Leaderboards](#supported-tasks-and-leaderboards)
20
- - [Languages](#languages)
21
  - [Dataset Structure](#dataset-structure)
22
- - [Data Instances](#data-instances)
23
  - [Data Fields](#data-fields)
24
- - [Data Splits](#data-splits)
25
- - [Dataset Creation](#dataset-creation)
26
- - [Curation Rationale](#curation-rationale)
27
- - [Source Data](#source-data)
28
- - [Annotations](#annotations)
29
- - [Personal and Sensitive Information](#personal-and-sensitive-information)
30
- - [Considerations for Using the Data](#considerations-for-using-the-data)
31
- - [Social Impact of Dataset](#social-impact-of-dataset)
32
- - [Discussion of Biases](#discussion-of-biases)
33
- - [Other Known Limitations](#other-known-limitations)
34
- - [Additional Information](#additional-information)
35
- - [Dataset Curators](#dataset-curators)
36
- - [Licensing Information](#licensing-information)
37
- - [Citation Information](#citation-information)
38
- - [Contributions](#contributions)
39
 
40
  ## Dataset Description
41
 
@@ -46,6 +48,8 @@ paperswithcode_id: fairface
46
 
47
  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.
48
 
 
 
49
  ### Data Fields
50
 
51
  - img_bytes: Bytes representing an image
@@ -59,7 +63,7 @@ Existing public face datasets are strongly biased toward Caucasian faces, and ot
59
  {
60
  'age': 6,
61
  'gender': 1,
62
- 'img_bytes': b'\\\\xff\\\\xd8...',
63
  'race': 1
64
  }
65
  ```
 
13
 
14
  # Dataset Card for FairFace
15
 
16
+ ## Usage
17
+
18
+ ```python
19
+ from io import BytesIO
20
+ from PIL import Image
21
+
22
+ import datasets
23
+
24
+ def bytes_to_pil(example_batch):
25
+ example_batch['img'] = [
26
+ Image.open(BytesIO(b)) for b in example_batch.pop('img_bytes')
27
+ ]
28
+ return example_batch
29
+
30
+ ds = datasets.load_dataset('nateraw/fairface')
31
+ ds = ds.with_transform(bytes_to_pil)
32
+ ```
33
+
34
  ## Table of Contents
35
  - [Dataset Description](#dataset-description)
36
  - [Dataset Summary](#dataset-summary)
 
 
37
  - [Dataset Structure](#dataset-structure)
 
38
  - [Data Fields](#data-fields)
39
+ - [Data Instances](#data-instances)
40
+
 
 
 
 
 
 
 
 
 
 
 
 
 
41
 
42
  ## Dataset Description
43
 
 
48
 
49
  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.
50
 
51
+ ## Dataset Structure
52
+
53
  ### Data Fields
54
 
55
  - img_bytes: Bytes representing an image
 
63
  {
64
  'age': 6,
65
  'gender': 1,
66
+ 'img_bytes': b'\\\\\\\\xff\\\\\\\\xd8...',
67
  'race': 1
68
  }
69
  ```