Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -1,3 +1,47 @@
|
|
| 1 |
---
|
| 2 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
tags:
|
| 3 |
+
- pytorch
|
| 4 |
+
- vision
|
| 5 |
+
- face-analysis
|
| 6 |
+
- beauty-prediction
|
| 7 |
+
- scut-fbp5500
|
| 8 |
+
library_name: generic
|
| 9 |
+
license: mit
|
| 10 |
---
|
| 11 |
+
|
| 12 |
+
# SCUT-FBP5500 ResNet-18 Model
|
| 13 |
+
|
| 14 |
+
This repository contains the PyTorch weights for a facial beauty prediction model trained on the [SCUT-FBP5500 dataset](https://github.com/HCIILAB/SCUT-FBP5500-Database-Release).
|
| 15 |
+
|
| 16 |
+
## Model Files
|
| 17 |
+
|
| 18 |
+
- **`resnet18.pth`**: Original weights (saved in Python 2). Requires `encoding='latin1'` to load in Python 3.
|
| 19 |
+
- **`resnet18_py3.pth`**: Converted weights compatible with Python 3+ (Recommended).
|
| 20 |
+
|
| 21 |
+
## Model Details
|
| 22 |
+
|
| 23 |
+
- **Architecture:** ResNet-18
|
| 24 |
+
- **Dataset:** SCUT-FBP5500 (Facial Beauty Prediction)
|
| 25 |
+
- **Framework:** PyTorch
|
| 26 |
+
|
| 27 |
+
## Origin
|
| 28 |
+
|
| 29 |
+
The original weights were provided by [brian-xu](https://github.com/brian-xu/torch-converter). The `resnet18_py3.pth` file is a converted version using `_use_new_zipfile_serialization=True`.
|
| 30 |
+
|
| 31 |
+
## Usage (Python 3)
|
| 32 |
+
|
| 33 |
+
```python
|
| 34 |
+
import torch
|
| 35 |
+
import torchvision.models as models
|
| 36 |
+
|
| 37 |
+
model = models.resnet18(num_classes=1)
|
| 38 |
+
|
| 39 |
+
# Load the converted weights (Recommended)
|
| 40 |
+
state_dict = torch.load("resnet18_py3.pth")
|
| 41 |
+
model.load_state_dict(state_dict)
|
| 42 |
+
model.eval()
|
| 43 |
+
```
|
| 44 |
+
|
| 45 |
+
## Licensing
|
| 46 |
+
|
| 47 |
+
Please refer to the original [SCUT-FBP5500 Database](https://github.com/HCIILAB/SCUT-FBP5500-Database-Release) for usage terms regarding the dataset and derived models.
|