File size: 1,994 Bytes
3c040b2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
---
license: mit
tags:
  - primateface
  - face-detection
  - pose-estimation
  - primates
  - animal-behavior
  - computer-vision
library_name: primateface
---

# PrimateFace Models

Pre-trained models for [PrimateFace](https://github.com/KordingLab/PrimateFace) --- an open-source toolkit for primate face detection, landmark estimation, and facial behavior analysis across 60+ primate genera.

## Models

| Model | Task | Architecture | File | Size |
|---|---|---|---|---|
| **Face Detection** | Bounding box detection | Cascade R-CNN (ResNet-101 + FPN) | `detection/cascade_rcnn_r101_fpn.pth` | 340 MB |
| **Face Pose** | 68-keypoint landmark estimation | HRNetV2-W18-DARK | `pose/hrnetv2_w18_dark_68kpt.pth` | 38 MB |

Both models were trained on PrimateFace data spanning 60+ primate genera using the [MMDetection](https://github.com/open-mmlab/mmdetection) and [MMPose](https://github.com/open-mmlab/mmpose) frameworks.

## Keypoint Format

68-point facial landmarks following the dlib standard (COCO format: `[x, y, visibility] x 68`):
- Jaw contour (17 points)
- Eyebrows (10 points)
- Nose bridge + base (9 points)
- Eyes (12 points)
- Mouth outer + inner (20 points)

## Quick Start

```python
# Download models automatically
python demos/download_models.py

# Or use the Python API
from huggingface_hub import hf_hub_download

det_path = hf_hub_download(
    repo_id="fparodi/primateface-models",
    filename="cascade_rcnn_r101_fpn.pth",
    subfolder="detection",
)

pose_path = hf_hub_download(
    repo_id="fparodi/primateface-models",
    filename="hrnetv2_w18_dark_68kpt.pth",
    subfolder="pose",
)
```

## Citation

```bibtex
@article{parodi2025primateface,
  title={PrimateFace: A Machine Learning Resource for Automated Face Analysis in Human and Non-human Primates},
  author={Parodi, Felipe and Matelsky, Jordan and others},
  year={2025},
  url={https://www.biorxiv.org/content/10.1101/2025.08.12.669927}
}
```

## License

MIT --- same as the PrimateFace repository.