Commit ·
5fd97e5
verified ·
0
Parent(s):
Duplicate from convergingmachine/vcl-face-understanding
Browse filesCo-authored-by: Mehmet Can Yavuz <convergingmachine@users.noreply.huggingface.co>
- .gitattributes +35 -0
- README.md +101 -0
- yfcc_resnet10_pretrained.ckpt +3 -0
.gitattributes
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
*.7z filter=lfs diff=lfs merge=lfs -text
|
| 2 |
+
*.arrow filter=lfs diff=lfs merge=lfs -text
|
| 3 |
+
*.bin filter=lfs diff=lfs merge=lfs -text
|
| 4 |
+
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
| 5 |
+
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
| 6 |
+
*.ftz filter=lfs diff=lfs merge=lfs -text
|
| 7 |
+
*.gz filter=lfs diff=lfs merge=lfs -text
|
| 8 |
+
*.h5 filter=lfs diff=lfs merge=lfs -text
|
| 9 |
+
*.joblib filter=lfs diff=lfs merge=lfs -text
|
| 10 |
+
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
| 11 |
+
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
| 12 |
+
*.model filter=lfs diff=lfs merge=lfs -text
|
| 13 |
+
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
| 14 |
+
*.npy filter=lfs diff=lfs merge=lfs -text
|
| 15 |
+
*.npz filter=lfs diff=lfs merge=lfs -text
|
| 16 |
+
*.onnx filter=lfs diff=lfs merge=lfs -text
|
| 17 |
+
*.ot filter=lfs diff=lfs merge=lfs -text
|
| 18 |
+
*.parquet filter=lfs diff=lfs merge=lfs -text
|
| 19 |
+
*.pb filter=lfs diff=lfs merge=lfs -text
|
| 20 |
+
*.pickle filter=lfs diff=lfs merge=lfs -text
|
| 21 |
+
*.pkl filter=lfs diff=lfs merge=lfs -text
|
| 22 |
+
*.pt filter=lfs diff=lfs merge=lfs -text
|
| 23 |
+
*.pth filter=lfs diff=lfs merge=lfs -text
|
| 24 |
+
*.rar filter=lfs diff=lfs merge=lfs -text
|
| 25 |
+
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
| 26 |
+
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
| 27 |
+
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
| 28 |
+
*.tar filter=lfs diff=lfs merge=lfs -text
|
| 29 |
+
*.tflite filter=lfs diff=lfs merge=lfs -text
|
| 30 |
+
*.tgz filter=lfs diff=lfs merge=lfs -text
|
| 31 |
+
*.wasm filter=lfs diff=lfs merge=lfs -text
|
| 32 |
+
*.xz filter=lfs diff=lfs merge=lfs -text
|
| 33 |
+
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
+
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
+
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
```yaml
|
| 2 |
+
---
|
| 3 |
+
language: en
|
| 4 |
+
license: mit
|
| 5 |
+
library_name: pytorch
|
| 6 |
+
tags:
|
| 7 |
+
- face-recognition
|
| 8 |
+
- self-supervised-learning
|
| 9 |
+
- contrastive-learning
|
| 10 |
+
datasets:
|
| 11 |
+
- YFCC-CelebA
|
| 12 |
+
- CelebA
|
| 13 |
+
---
|
| 14 |
+
```
|
| 15 |
+
# VCL: Variational Contrastive Learning for Face Understanding
|
| 16 |
+
|
| 17 |
+
VCL is a robust self-supervised learning method designed specifically for face understanding tasks, combining variational contrastive learning with beta-divergence to effectively handle noisy and unlabeled datasets[1].
|
| 18 |
+
|
| 19 |
+
## Model Details
|
| 20 |
+
|
| 21 |
+
### Model Description
|
| 22 |
+
|
| 23 |
+
**Developed by:** Mehmet Can Yavuz and Berrin Yanikoglu
|
| 24 |
+
**Model type:** Self-Supervised Variational Contrastive Learning with Applications to Face Understanding
|
| 25 |
+
**Language(s):** Python
|
| 26 |
+
**License:** MIT
|
| 27 |
+
**Model:** ResNet10t
|
| 28 |
+
|
| 29 |
+
## Uses
|
| 30 |
+
|
| 31 |
+
### Direct Use
|
| 32 |
+
|
| 33 |
+
The model is designed for:
|
| 34 |
+
- Face attribute recognition
|
| 35 |
+
- Face verification tasks
|
| 36 |
+
- Multi-label classification problems
|
| 37 |
+
- Learning from noisy and unlabeled datasets
|
| 38 |
+
|
| 39 |
+
## Model Architecture
|
| 40 |
+
|
| 41 |
+
The architecture consists of three main components:
|
| 42 |
+
- Feature extraction backbone (ResNet10t or VGG11bn)
|
| 43 |
+
- Gaussian sampling head for distribution learning
|
| 44 |
+
- Contrastive learning framework with augmentations
|
| 45 |
+
|
| 46 |
+
## Training Details
|
| 47 |
+
|
| 48 |
+
### Training Data
|
| 49 |
+
|
| 50 |
+
The model was pretrained on the YFCC-CelebA dataset and you can fine-tune on CelebA dataset.
|
| 51 |
+
|
| 52 |
+
### Training Procedure
|
| 53 |
+
|
| 54 |
+
#### Training Hyperparameters
|
| 55 |
+
|
| 56 |
+
**Training regime:**
|
| 57 |
+
- Optimizer: AdamW
|
| 58 |
+
- Learning rate: 1e-3
|
| 59 |
+
- Weight decay: 0.01
|
| 60 |
+
- Batch size: 128
|
| 61 |
+
- Temperature: 0.07
|
| 62 |
+
- Beta: 0.005
|
| 63 |
+
|
| 64 |
+
## Evaluation
|
| 65 |
+
|
| 66 |
+
### Results
|
| 67 |
+
|
| 68 |
+
Performance on CelebA test set with different pretraining approaches:
|
| 69 |
+
|
| 70 |
+
| Setting | ResNet10t (1%) | VGG11bn (1%) | ResNet10t (10%) | VGG11bn (10%) |
|
| 71 |
+
|---------|----------------|---------------|-----------------|---------------|
|
| 72 |
+
| VCL | 0.5836 | 0.5719 | 0.6848 | 0.6796 |
|
| 73 |
+
| VCL (beta) | 0.5998 | 0.5958 | 0.7098 | 0.6998 |
|
| 74 |
+
|
| 75 |
+
## How to Get Started with the Model
|
| 76 |
+
|
| 77 |
+
```python
|
| 78 |
+
# Installation
|
| 79 |
+
git clone https://github.com/convergingmachine/VCL
|
| 80 |
+
cd VCL
|
| 81 |
+
pip install -r requirements.txt
|
| 82 |
+
|
| 83 |
+
# Training
|
| 84 |
+
python train_beta.py
|
| 85 |
+
|
| 86 |
+
|
| 87 |
+
## Citation
|
| 88 |
+
|
| 89 |
+
```bibtex
|
| 90 |
+
@INPROCEEDINGS{10582001,
|
| 91 |
+
author={Yavuz, Mehmet Can and Yanikoglu, Berrin},
|
| 92 |
+
booktitle={2024 IEEE 18th International Conference on Automatic Face and Gesture Recognition (FG)},
|
| 93 |
+
title={Self-Supervised Variational Contrastive Learning with Applications to Face Understanding},
|
| 94 |
+
year={2024},
|
| 95 |
+
pages={1-9},
|
| 96 |
+
doi={10.1109/FG59268.2024.10582001}}
|
| 97 |
+
```
|
| 98 |
+
|
| 99 |
+
## Model Card Contact
|
| 100 |
+
|
| 101 |
+
For questions about this model, please open an issue in the GitHub repository.
|
yfcc_resnet10_pretrained.ckpt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0c5ab72f9baf7b64e3821d020df9d9e348b9f7e47bf7e5a720a054176304c9ff
|
| 3 |
+
size 67090607
|