# Sapiens

> Foundation vision models for human-centric tasks like pose, segmentation, depth, and normals

- Category: Multimodal Generation / Vision & Understanding
- Language: Python
- Repository: https://github.com/facebookresearch/sapiens
- Canonical page: https://ai-tldr.dev/tools/sapiens/

## In short

Sapiens is a family of vision models from Meta's Reality Labs, built for human-centric tasks: 2D pose estimation, body-part segmentation, depth estimation, and surface normal estimation. The models were pretrained on 300 million in-the-wild human images, so they generalize well to unconstrained, real-world conditions. It sits in the Vision & Understanding category of the Multimodal Generation tools and is open-source, written in Python.

## Overview

Sapiens is a family of vision models from Meta's Reality Labs, built for human-centric tasks: 2D pose estimation, body-part segmentation, depth estimation, and surface normal estimation. The models were pretrained on 300 million in-the-wild human images, so they generalize well to unconstrained, real-world conditions.

The models are trained natively at 1024x1024 resolution with a 16-pixel patch size, which lets them extract high-resolution features for detailed human understanding. The family comes in several sizes (0.3B, 0.6B, 1B, and 2B parameters), so you can trade accuracy against compute for your hardware.

It fits the computer vision category as a set of pretrained backbones plus task-specific heads. Researchers and engineers can run the published checkpoints for inference or finetune them on their own human-centric data. A lighter inference-only path (Sapiens-Lite) keeps dependencies minimal.

## What it does

- Single model family covering four human-centric tasks: 2D pose, body-part segmentation, depth, and surface normal estimation
- Pretrained on 300 million in-the-wild human images for strong generalization to unconstrained scenes
- Native 1024x1024 training resolution with a 16-pixel patch size for high-resolution features
- Multiple model sizes — 0.3B, 0.6B, 1B, and 2B parameters — to match your compute budget
- Sapiens-Lite inference path with optimized speed and minimal dependencies (PyTorch + numpy + cv2)
- Checkpoints published on Hugging Face, with documented finetuning guides for each task

## Getting started

Clone the repository, then pick the lite inference setup or the full training environment. Pretrained checkpoints are downloaded separately from Hugging Face.

1. Clone the repository

   Clone the repo and point the SAPIENS_ROOT environment variable at it.

```bash
git clone https://github.com/facebookresearch/sapiens.git
export SAPIENS_ROOT=/path/to/sapiens
```

2. Lite installation (inference only)

   If you mainly want to run existing models, use the Sapiens-Lite setup. It offers optimized inference with minimal dependencies (PyTorch + numpy + cv2). See lite/README.md for the steps.

3. Full installation (training)

   To replicate the complete training setup, run the provided install script. It creates a conda environment named sapiens and installs all dependencies.

```bash
cd $SAPIENS_ROOT/_install
./conda.sh
```

4. Download checkpoints

   Download the original checkpoints from Hugging Face (facebook/sapiens), set $SAPIENS_CHECKPOINT_ROOT to the sapiens_host folder, and place files in the documented directory structure. Per-task guides live in docs/ (POSE_README, SEG_README, DEPTH_README, NORMAL_README).

## When to use it

- Estimating 2D human pose from in-the-wild images or video frames
- Producing body-part segmentation masks for avatars, try-on, or editing pipelines
- Generating per-pixel depth and surface normal maps of people for 3D reconstruction
- Finetuning a pretrained human-vision backbone on your own labeled dataset
