parquet-converter commited on
Commit
cce5617
·
1 Parent(s): 3109be3

Update parquet files

Browse files
README.md DELETED
@@ -1,16 +0,0 @@
1
- # FairFace (val set)
2
-
3
- Original paper: [Fairface: Face attribute dataset for balanced race, gender, and age for bias measurement and mitigation](https://openaccess.thecvf.com/content/WACV2021/papers/Karkkainen_FairFace_Face_Attribute_Dataset_for_Balanced_Race_Gender_and_Age_WACV_2021_paper.pdf)
4
-
5
- Homepage: https://github.com/joojs/fairface
6
-
7
- Bibtex:
8
- ```
9
- @inproceedings{karkkainenfairface,
10
- title={FairFace: Face Attribute Dataset for Balanced Race, Gender, and Age for Bias Measurement and Mitigation},
11
- author={Karkkainen, Kimmo and Joo, Jungseock},
12
- booktitle={Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision},
13
- year={2021},
14
- pages={1548--1558}
15
- }
16
- ```
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
fairface_val_images.zip → TEST/fairface_val_padding_025-test.parquet RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:4ba2cdbd80eb1d34dfc3d87255940f007125e6d95c19a55665c705eaa235e039
3
- size 69269059
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e7c3c95f8a466bd3fde7c0e264d341ae7db22870df9e9b13c4714017d856484a
3
+ size 63311681
fairface_labeled_val.csv DELETED
The diff for this file is too large to render. See raw diff
 
fairface_val_padding_025.py DELETED
@@ -1,68 +0,0 @@
1
- # coding=utf-8
2
- # Copyright 2022 the HuggingFace Datasets Authors.
3
- #
4
- # Licensed under the Apache License, Version 2.0 (the "License");
5
- # you may not use this file except in compliance with the License.
6
- # You may obtain a copy of the License at
7
- #
8
- # http://www.apache.org/licenses/LICENSE-2.0
9
- #
10
- # Unless required by applicable law or agreed to in writing, software
11
- # distributed under the License is distributed on an "AS IS" BASIS,
12
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- # See the License for the specific language governing permissions and
14
- # limitations under the License.
15
-
16
- import os
17
- import pandas as pd
18
- import datasets
19
- import json
20
- from huggingface_hub import hf_hub_url
21
-
22
- _INPUT_CSV = "fairface_labeled_val.csv"
23
- _INPUT_IMAGES = "fairface_val_images"
24
- _REPO_ID = "nlphuji/fairface_val_padding_025"
25
-
26
- class Dataset(datasets.GeneratorBasedBuilder):
27
- VERSION = datasets.Version("1.1.0")
28
- BUILDER_CONFIGS = [
29
- datasets.BuilderConfig(name="TEST", version=VERSION, description="test"),
30
- ]
31
-
32
- def _info(self):
33
- return datasets.DatasetInfo(
34
- features=datasets.Features(
35
- {
36
- "image": datasets.Image(),
37
- "file": datasets.Value('string'),
38
- "age": datasets.Value('string'),
39
- "gender": datasets.Value('string'),
40
- "race": datasets.Value('string'),
41
- "service_test": datasets.Value('string'),
42
- "image_name": datasets.Value('string'),
43
- }
44
- ),
45
- task_templates=[],
46
- )
47
-
48
- def _split_generators(self, dl_manager):
49
- """Returns SplitGenerators."""
50
-
51
- repo_id = _REPO_ID
52
- data_dir = dl_manager.download_and_extract({
53
- "examples_csv": hf_hub_url(repo_id=repo_id, repo_type='dataset', filename=_INPUT_CSV),
54
- "images_dir": hf_hub_url(repo_id=repo_id, repo_type='dataset', filename=f"{_INPUT_IMAGES}.zip")
55
- })
56
-
57
- return [datasets.SplitGenerator(name=datasets.Split.TEST, gen_kwargs=data_dir)]
58
-
59
-
60
- def _generate_examples(self, examples_csv, images_dir):
61
- """Yields examples."""
62
- df = pd.read_csv(examples_csv)
63
-
64
- for r_idx, r in df.iterrows():
65
- r_dict = r.to_dict()
66
- image_path = os.path.join(images_dir, _INPUT_IMAGES, r_dict['image_name'])
67
- r_dict['image'] = image_path
68
- yield r_idx, r_dict