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.
Note: This project has only been tested on macOS.
- Python 3.8+
- Node.js 18+
- uv (recommended) or pip
# 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 devThe 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.
- Upload an image
- AI generates a depth map (auto-downloads model if needed)
- WebGL creates parallax effects
- Move your mouse to explore the 3D scene

