Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
tags:
|
| 4 |
+
- age-transformation
|
| 5 |
+
- face-aging
|
| 6 |
+
- stylegan
|
| 7 |
+
- sam
|
| 8 |
+
---
|
| 9 |
+
|
| 10 |
+
# SAM (Style-based Age Manipulation) Model
|
| 11 |
+
|
| 12 |
+
This is the SAM model for realistic face aging/de-aging transformations.
|
| 13 |
+
Used in the DermaIntel application for the Aging Simulation feature.
|
| 14 |
+
|
| 15 |
+
## Model Details
|
| 16 |
+
|
| 17 |
+
- **Architecture**: StyleGAN2-based age manipulation
|
| 18 |
+
- **Training Data**: FFHQ (Flickr-Faces-HQ)
|
| 19 |
+
- **File**: sam_ffhq_aging.pt (~2.1 GB)
|
| 20 |
+
- **Purpose**: Age transformation (aging and de-aging faces)
|
| 21 |
+
|
| 22 |
+
## Usage
|
| 23 |
+
|
| 24 |
+
```python
|
| 25 |
+
from huggingface_hub import hf_hub_download
|
| 26 |
+
|
| 27 |
+
# Download model
|
| 28 |
+
model_path = hf_hub_download(
|
| 29 |
+
repo_id="PayamFard123/dermaintel-sam-aging",
|
| 30 |
+
filename="sam_ffhq_aging.pt"
|
| 31 |
+
)
|
| 32 |
+
|
| 33 |
+
# Load with PyTorch
|
| 34 |
+
import torch
|
| 35 |
+
checkpoint = torch.load(model_path, map_location='cpu')
|
| 36 |
+
```
|
| 37 |
+
|
| 38 |
+
## Features
|
| 39 |
+
|
| 40 |
+
- Realistic aging effects (wrinkles, skin texture changes)
|
| 41 |
+
- De-aging (smoothing, rejuvenation)
|
| 42 |
+
- Preserves facial identity during transformation
|
| 43 |
+
- Works with various age ranges (10-90 years)
|
| 44 |
+
|
| 45 |
+
## Original Source
|
| 46 |
+
|
| 47 |
+
Based on SAM (Style-based Age Manipulation) research.
|