Skip to content
XyrroPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Glimpse3D

Generate interactive 3D meshes from your camera in real time. Point your webcam at an object, click capture, and get a textured 3D mesh you can orbit, zoom, and pan.

Powered by TripoSR (Stability AI) for single-view 3D reconstruction.

Quick Start

# Requires: uv, Python 3.10-3.12, PyTorch
bash run.sh

Then open http://localhost:8000.

Prerequisites

  • Python 3.10-3.12 (managed automatically by uv)
  • uv — fast Python package manager
  • PyTorch — install before running:
    # macOS (MPS)
    uv pip install torch
    
    # Linux (CUDA 12.1)
    uv pip install torch --index-url https://download.pytorch.org/whl/cu121
    
    # CPU only
    uv pip install torch --index-url https://download.pytorch.org/whl/cpu

The first run downloads ~1.5GB of model weights from HuggingFace.

How It Works

  1. Browser captures a frame from your camera
  2. Backend removes the background (rembg/U2Net)
  3. TripoSR generates a 3D mesh with vertex colors
  4. GLB mesh is sent back and rendered with Three.js

Features

  • Live camera with rear-camera preference on mobile
  • Auto-capture mode (every 5 seconds)
  • Interactive 3D viewer — orbit, zoom, pan with mouse/touch
  • Resolution control — Fast (128), Standard (256), High (512)
  • Resizable split view — drag the divider between camera and viewer
  • Auto device detection — uses CUDA, MPS (Apple Silicon), or CPU

Project Structure

├── backend/
│   ├── main.py              # FastAPI app and endpoints
│   ├── model_manager.py     # TripoSR model singleton
│   └── mesh_generator.py    # Image preprocessing and mesh generation
├── frontend/
│   ├── index.html           # Split-view layout
│   ├── css/styles.css       # Dark theme UI
│   └── js/
│       ├── app.js           # Main orchestrator
│       ├── camera.js        # Camera capture
│       ├── viewer.js        # Three.js 3D viewer
│       └── api.js           # Backend API client
├── patches/                 # PyMCubes compatibility patch for TripoSR
├── pyproject.toml           # Dependencies (uv/pip)
└── run.sh                   # One-command setup and launch

Acknowledgments

  • TripoSR by VAST AI Research & Stability AI
  • Three.js for WebGL rendering
  • rembg for background removal

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages