evertjr/react-depth

★ 0Forks 1TypeScriptGitHub ↗Compare

README

React Depth

Transform photos into immersive 3D experiences using AI depth estimation and WebGL. Upload any image and watch it come to life with realistic parallax effects powered by the Depth-Anything V2 model.

image image

Requirements

Note: This project has only been tested on macOS.

  • Python 3.8+
  • Node.js 18+
  • uv (recommended) or pip

Quick Start

# Clone the repository
git clone <repository-url>
cd react-depth

# Install frontend dependencies
pnpm i

# Install Python dependencies
uv venv
source .venv/bin/activate
uv pip install torch transformers opencv-python pillow numpy fastapi "uvicorn[standard]" python-multipart

# Start development server
pnpm dev

The app will be available at http://localhost:5173

First Run: The AI model (~400MB) will be automatically downloaded to your system cache (~/.cache/huggingface/) on first use. This may take a few minutes but only happens once.

How it works

  1. Upload an image
  2. AI generates a depth map (auto-downloads model if needed)
  3. WebGL creates parallax effects
  4. Move your mouse to explore the 3D scene

Contributors

evertjr

Issues