Sapiens
High-resolution models for human tasks.
Install / Use
/learn @facebookresearch/SapiensREADME
Sapiens offers a comprehensive suite for human-centric vision tasks (e.g., 2D pose, part segmentation, depth, normal, etc.). The model family is pretrained on 300 million in-the-wild human images and shows excellent generalization to unconstrained conditions. These models are also designed for extracting high-resolution features, having been natively trained at a 1024 x 1024 image resolution with a 16-pixel patch size.
<p align="center"> <img src="./assets/01.gif" alt="01" title="01" width="400"/> <img src="./assets/03.gif" alt="03" title="03" width="400"/> </p> <p align="center"> <img src="./assets/02.gif" alt="02" title="02" width="400"/> <img src="./assets/04.gif" alt="04" title="04" width="400"/> </p>🚀 Getting Started
Clone the Repository
git clone https://github.com/facebookresearch/sapiens.git
export SAPIENS_ROOT=/path/to/sapiens
Recommended: Lite Installation (Inference-only)
For users setting up their own environment primarily for running existing models in inference mode, we recommend the Sapiens-Lite installation.
This setup offers optimized inference (4x faster) with minimal dependencies (only PyTorch + numpy + cv2).
Full Installation
To replicate our complete training setup, run the provided installation script.
This will create a new conda environment named sapiens and install all necessary dependencies.
cd $SAPIENS_ROOT/_install
./conda.sh
Please download the original checkpoints from hugging-face.
You can be selective about only downloading the checkpoints of interest.
Set $SAPIENS_CHECKPOINT_ROOT to be the path to the sapiens_host folder. Place the checkpoints following this directory structure:
sapiens_host/
├── detector/
│ └── checkpoints/
│ └── rtmpose/
├── pretrain/
│ └── checkpoints/
│ ├── sapiens_0.3b/
├── sapiens_0.3b_epoch_1600_clean.pth
│ ├── sapiens_0.6b/
├── sapiens_0.6b_epoch_1600_clean.pth
│ ├── sapiens_1b/
│ └── sapiens_2b/
├── pose/
└── checkpoints/
├── sapiens_0.3b/
└── seg/
└── depth/
└── normal/
🌟 Human-Centric Vision Tasks
We finetune sapiens for multiple human-centric vision tasks. Please checkout the list below.
-
Image Encoder <sup><small><a href="lite/docs/PRETRAIN_README.md" style="color: #FFA500;">[lite]</a></small></sup>
-
Pose Estimation <sup><small><a href="lite/docs/POSE_README.md" style="color: #FFA500;">[lite]</a></small></sup>
-
Body Part Segmentation <sup><small><a href="lite/docs/SEG_README.md" style="color: #FFA500;">[lite]</a></small></sup>
-
Depth Estimation <sup><small><a href="lite/docs/DEPTH_README.md" style="color: #FFA500;">[lite]</a></small></sup>
-
Surface Normal Estimation <sup><small><a href="lite/docs/NORMAL_README.md" style="color: #FFA500;">[lite]</a></small></sup>
🎯 Easy Steps to Finetuning Sapiens
Finetuning our models is super-easy! Here is a detailed training guide for the following tasks.
📈 Quantitative Evaluations
🤝 Acknowledgements & Support & Contributing
We would like to acknowledge the work by OpenMMLab which this project benefits from.
For any questions or issues, please open an issue in the repository.
See contributing and the code of conduct.
License
This project is licensed under LICENSE.
Portions derived from open-source projects are licensed under Apache 2.0.
📚 Citation
If you use Sapiens in your research, please consider citing us.
@article{khirodkar2024sapiens,
title={Sapiens: Foundation for Human Vision Models},
author={Khirodkar, Rawal and Bagautdinov, Timur and Martinez, Julieta and Zhaoen, Su and James, Austin and Selednik, Peter and Anderson, Stuart and Saito, Shunsuke},
journal={arXiv preprint arXiv:2408.12569},
year={2024}
}
Related Skills
node-connect
349.2kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
109.5kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
349.2kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
349.2kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
