█

AI/TLDR

Buy me a coffee
Buy me a coffee

Sapiens

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

Vision & UnderstandingOpen source
Language
Python
$git clone https://github.com/facebookresearch/sapiens.git
IN SHORT

What is Sapiens?

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.

Clone the repository

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

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

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.

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.

bashbash
cd $SAPIENS_ROOT/_install
./conda.sh

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).

Commands and code are distilled from the project's own documentation — always check the official repo for the latest.

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

How Sapiens compares

Sapiens alongside other open-source vision & understanding tools AI/TLDR tracks, ranked by GitHub stars.

ToolStarsWhat it does
PaddleOCR★ 93.5kA toolkit for detecting and recognizing text in images across many languages, plus document parsing.
OpenCV★ 91.8kThe long-standing open-source computer-vision library for C++, Python and Java; version 5 rewrote the DNN engine and added ONNX-based LLM and VLM inference in-library.
Ultralytics YOLO★ 63.9kA framework for training and running YOLO models for real-time object detection, segmentation, and tracking.
YOLOv5★ 58.3kUltralytics' PyTorch repo for training, running and exporting YOLOv5 object-detection, instance-segmentation and classification models with plain scripts and PyTorch Hub.
Supervision★ 51.8kA Python toolkit for processing, annotating, and visualizing detections and segmentations from many vision models.
MediaPipe★ 38kGoogle's on-device ML framework: ready-to-run vision, text and audio tasks with one cross-platform API for Android, iOS, web, desktop and edge.
MMDetection★ 33.1kAn OpenMMLab toolbox with many object detection and instance segmentation algorithms for research and production.
Sapiens★ 5.4kFoundation vision models for human-centric tasks like pose, segmentation, depth, and normals