wesjos commited on
Commit
7b06df2
·
verified ·
1 Parent(s): a3c61a1

Translate model card to English (README.md)

Browse files
Files changed (1) hide show
  1. README.md +94 -95
README.md CHANGED
@@ -1,97 +1,96 @@
1
- ---
2
  language:
3
- - zh
4
  - en
5
- license: cc-by-4.0
6
- library_name: pytorch
7
- pipeline_tag: image-classification
8
- tags:
9
- - image-classification
10
- - fairface
11
- - face-attribute
12
- - pytorch
13
- - timm
14
- datasets:
15
- - HuggingFaceM4/FairFace
16
- base_model: timm/eva02_large_patch14_224.mim_in22k
17
- metrics:
18
- - accuracy
19
- - f1
20
- ---
21
- # FairFace-MonkeyCake-3Task-224
22
-
23
- ## 概述
24
-
25
- 基于 **EVA02-L/14 (MIM-22K)** 的人脸属性分类模型,在 [HuggingFaceM4/FairFace](https://huggingface.co/datasets/HuggingFaceM4/FairFace) 数据集上训练。
26
- 输出种族 / 性别 / 年龄三项属性。
27
-
28
- > 教师模型,精度最高但 303M、344 img/s,适合离线评测,不适合实时部署。
29
-
30
- ## 模型详情
31
-
32
- | 项 | 值 |
33
- |---|---|
34
- | 骨干 | EVA02-L/14 (MIM-22K) ([timm/eva02_large_patch14_224.mim_in22k](https://huggingface.co/timm/eva02_large_patch14_224.mim_in22k)) |
35
- | 参数量 | 303,286,225 |
36
- | 输入 | RGB, 224×224 |
37
- | 归一化 | mean=(0.4815, 0.4578, 0.4082), std=(0.2686, 0.2613, 0.2758) |
38
- | 输出 | race 7 + gender 2 + age 8 阈值(有序) |
39
- | 测试集 | 10,931 张(FairFace 官方 val 去重后冻结) |
40
-
41
- ## 训练数据
42
-
43
- [HuggingFaceM4/FairFace](https://huggingface.co/datasets/HuggingFaceM4/FairFace)(Karkkainen & Joo, WACV 2021),原始 97,698 张。本项目按 SHA-256 内容去重后:
44
- train 77,926 / selection 8,659 / test 10,931,三对交集为 0,官方 train 的图 0 张进入测试集。
45
-
46
- ## 评测结果
47
-
48
- | 任务 | 准确率 | macro-F1 |
49
- |---|---:|---:|
50
- | 种族(7 类) | 77.02% | 76.83% |
51
- | 性别(2 类) | 96.87% | 96.86% |
52
- | 年龄(9 档有序) | 63.93% | 61.29% |
53
-
54
- 三项平均准确率 **79.27%**。年龄 MAE **0.3838 档**,±1 档命中 **97.94%**。
55
-
56
- ## 逐类表现
57
-
58
- ![per-class recall](assets/per_class_recall.png)
59
-
60
- ![confusion matrix](assets/confusion_matrix.png)
61
-
62
- ## 使用方式
63
-
64
- ```python
65
- import inference
66
-
67
- model = inference.load("model.pt")
68
- print(inference.predict(model, "face.jpg"))
69
- ```
70
-
71
- 依赖:`torch`, `timm`, `torchvision`, `pillow`。
72
-
73
- ## 限制与风险
74
-
75
- - **研究用途**:本模型用于人脸属性研究与公平性审计。**不得用于监控、身份核验、招聘、信贷等高风险自动决策。**
76
- - **测试集复用**:该冻结测试集在本项目中累计使用 8 次,指标为描述性,不再具备独立确认意义。
77
- - **单 seed**:训练只跑了一个随机种子,小于 0.3pp 的差异视为噪声。
78
- - **已知群体差异**:种族边界(尤其 Latino / Middle Eastern / Indian / White 之间)本身模糊;
79
- 年龄是最弱的一项;部分性别×种族子群错误率显著偏高。
80
- - **标签来源**:标签来自 FairFace 数据集标注,不代表模型可推断个体真实身份或自我认同。
81
-
82
- ## 数据与许可
83
-
84
- - 数据集:[HuggingFaceM4/FairFace](https://huggingface.co/datasets/HuggingFaceM4/FairFace),CC BY 4.0(图像来自 YFCC100M,原始许可各异)。
85
- - 模型权重:基于上述数据训练的衍生作品,随本卡以 CC BY 4.0 提供。
86
- - 预训练骨干模型:[timm/eva02_large_patch14_224.mim_in22k](https://huggingface.co/timm/eva02_large_patch14_224.mim_in22k),原始权重发布页:EVA02-L/14 (MIM-22K)(原始许可见其发布页)。
87
-
88
- ## 引用
89
-
90
- ```bibtex
91
- @inproceedings{karkkainen2021fairface,
92
- title={FairFace: Face Attribute Dataset for Balanced Race, Gender, and Age for Bias Measurement and Mitigation},
93
- author={Karkkainen, Kimmo and Joo, Jungseock},
94
- booktitle={WACV},
95
- year={2021}
96
- }
97
- ```
 
1
+ ---
2
  language:
 
3
  - en
4
+ license: cc-by-4.0
5
+ library_name: pytorch
6
+ pipeline_tag: image-classification
7
+ tags:
8
+ - image-classification
9
+ - fairface
10
+ - face-attribute
11
+ - pytorch
12
+ - timm
13
+ datasets:
14
+ - HuggingFaceM4/FairFace
15
+ base_model: timm/eva02_large_patch14_224.mim_in22k
16
+ metrics:
17
+ - accuracy
18
+ - f1
19
+ ---
20
+ # FairFace-MonkeyCake-3Task-224
21
+
22
+ ## Overview
23
+
24
+ A face attribute classification model based on **EVA02-L/14 (MIM-22K)**, trained on the [HuggingFaceM4/FairFace](https://huggingface.co/datasets/HuggingFaceM4/FairFace) dataset.
25
+ Predicts three attributes: race, gender, and age.
26
+
27
+ > Teacher model with highest overall accuracy; 303M parameters and 344 img/s. Best suited for offline benchmarking rather than real-time edge deployment.
28
+
29
+ ## Model Details
30
+
31
+ | Field | Value |
32
+ |---|---|
33
+ | Backbone | EVA02-L/14 (MIM-22K) ([timm/eva02_large_patch14_224.mim_in22k](https://huggingface.co/timm/eva02_large_patch14_224.mim_in22k)) |
34
+ | Parameters | 303,286,225 |
35
+ | Input | RGB, 224×224 |
36
+ | Normalization | mean=(0.4815, 0.4578, 0.4082), std=(0.2686, 0.2613, 0.2758) |
37
+ | Output | race (7 classes) + gender (2 classes) + age (8 ordinal thresholds / 9 brackets) |
38
+ | Test Set | 10,931 images (frozen deduplicated FairFace official val set) |
39
+
40
+ ## Training Data
41
+
42
+ [HuggingFaceM4/FairFace](https://huggingface.co/datasets/HuggingFaceM4/FairFace)(Karkkainen & Joo, WACV 2021),原始 97,698 张。本项目按 SHA-256 内容去重后:
43
+ train 77,926 / selection 8,659 / test 10,931,三对交集为 0,官方 train 的图 0 张进入测试集。
44
+
45
+ ## Evaluation Results
46
+
47
+ | Task | Accuracy | Macro-F1 |
48
+ |---|---:|---:|
49
+ | Race (7 classes) | 77.02% | 76.83% |
50
+ | Gender (2 classes) | 96.87% | 96.86% |
51
+ | Age (9 ordinal brackets) | 63.93% | 61.29% |
52
+
53
+ 3-Task average accuracy: **79.27%**. Age MAE: **0.3838 brackets**, ±1 bracket accuracy: **97.94%**.
54
+
55
+ ## Per-Class Performance
56
+
57
+ ![per-class recall](assets/per_class_recall.png)
58
+
59
+ ![confusion matrix](assets/confusion_matrix.png)
60
+
61
+ ## Usage
62
+
63
+ ```python
64
+ import inference
65
+
66
+ model = inference.load("model.pt")
67
+ print(inference.predict(model, "face.jpg"))
68
+ ```
69
+
70
+ Dependencies: `torch`, `timm`, `torchvision`, `pillow`.
71
+
72
+ ## Limitations & Ethical Considerations
73
+
74
+ - **Research Use Only**: This model is developed strictly for face attribute research, bias measurement, and fairness auditing. **It must NOT be used for surveillance, identity verification, recruitment, credit evaluation, or any high-risk automated decision-making.**
75
+ - **Test Set Reuse**: This frozen test set was evaluated multiple times across project iterations; reported metrics are descriptive.
76
+ - **Single Random Seed**: Training was conducted under a single seed; differences smaller than 0.3 pp should be treated as noise.
77
+ - **已知群体差异**:种族边界(尤其 Latino / Middle Eastern / Indian / White 之间)本身模糊;
78
+ 年龄是最弱的一项;部分性别×种族子群错误率显著偏高。
79
+ - **Label Attribution**: Labels reflect the categorical annotations of the FairFace dataset and do not represent individual identity, ethnicity, or personal self-identification.
80
+
81
+ ## Data & Licensing
82
+
83
+ - **Dataset**: [HuggingFaceM4/FairFace](https://huggingface.co/datasets/HuggingFaceM4/FairFace), CC BY 4.0 (images sourced from YFCC100M under respective licenses).
84
+ - **Model Checkpoint**: Derivative work trained on FairFace, released under CC BY 4.0.
85
+ - **Pretrained Backbone**: [timm/eva02_large_patch14_224.mim_in22k](https://huggingface.co/timm/eva02_large_patch14_224.mim_in22k) (see upstream release for original license).EVA02-L/14 (MIM-22K)(原始许可见其发布页)。
86
+
87
+ ## Citation
88
+
89
+ ```bibtex
90
+ @inproceedings{karkkainen2021fairface,
91
+ title={FairFace: Face Attribute Dataset for Balanced Race, Gender, and Age for Bias Measurement and Mitigation},
92
+ author={Karkkainen, Kimmo and Joo, Jungseock},
93
+ booktitle={WACV},
94
+ year={2021}
95
+ }
96
+ ```