Skip to content

Files

Latest commit

9c6b7f9 · Aug 2, 2025

History

History

sapiens-node

README.md

sapiens-node

This project demonstrates how to use Sapiens, a foundation model for human tasks (segmentation, depth, and normal estimation) in a Node.js environment.

Instructions

  1. Clone the repository:
    git clone https://github.com/huggingface/transformers.js-examples.git
  2. Change directory to the sapiens-node project:
    cd transformers.js-examples/sapiens-node
  3. Install the dependencies:
    npm install
  4. Run the example:
    node index.js

Results

The following images illustrate the input image, its corresponding depth map, and the normal map generated by the model:

Input Image Depth Map Normal Map
Input Image Depth Map Normal Map