logo
0
0
WeChat Login
Forkfromnfeyre/sharp-gui, aheadmain1 commits, behindmain3 commits

Sharp GUI

🇨🇳 中文 | 🇺🇸 English

A Beautiful 3D Gaussian Splatting GUI

Sharp GUI Logo

💡 Background

Homepage: https://lueluelue12138.github.io/sharp-gui/

The "Spatial Photos" feature in iOS 26 offers an amazing immersive experience, but is currently limited to the Apple ecosystem.

As a Web enthusiast, I built Sharp GUI to bridge this gap. My goal is to let anyone—whether on Android, Windows, Mac or VR device —deploy with one click and create and share 3D spatial memories directly via a browser on their local network. This is a hobbyist exploration, built for everyone to enjoy.


Sharp GUI Python React Flask Three.js

Built on Apple ml-sharp. No cloud uploads needed. Host Locally, Access Everywhere.

FeaturesPreviewQuick StartUsageArchitecture

WARNING

No content restrictions for local deployment - Users are fully responsible for generated content. Please comply with local laws and regulations. See Disclaimer.


✨ Why Sharp GUI?

🏠 Host Once, Access Anywhere

No need to install apps on every device. Run Sharp GUI on one computer, and any phone, tablet or VR device on your LAN can access it instantly via browser. Full HTTPS support ensures features like gyroscope work perfectly on all devices.

🚀 Core Features

FeatureDescription
📸 Image to 3DUpload any image, AI generates 3D Gaussian Splatting model
🖼️ Batch ProcessingMulti-select/drag-drop upload with smart queue scheduling
👁️ Real-time PreviewHigh-performance viewer with Three.js + Gaussian Splats 3D
📱 Mobile OptimizedPerfect adaptation for phones/tablets with gyroscope support
🥽 VR PreviewWebXR VR mode support, immersive experience on Quest/Vision Pro with controller joystick movement
📤 One-Click ShareExport as standalone HTML, viewable without server
🚀 One-Click DeployAuto-configures Python env, downloads deps, generates HTTPS certs

🎨 Apple-Style UI Design

Built with Apple Human Interface Guidelines for a premium user experience:

ElementDescription
Glass MorphismGlobal backdrop-filter: blur() with translucent backgrounds
SF Pro FontsApple system font stack for native rendering
Particle BackgroundCanvas-drawn floating particles for tech aesthetics
Smooth AnimationsAll interactions tuned with cubic-bezier easing
Dark ModeAdaptive system dark mode support

🎯 UX Optimizations

  • Skeleton Loading - Smooth gradient animation while loading thumbnails
  • Smart Polling - 2s polling when active, 10s when idle
  • Drag & Drop Upload - Drop images directly into sidebar
  • Drag & Drop Preview - Drop .ply/.splat models to preview directly
  • Queue Management - Cancel/delete pending tasks
  • Progress Bar - Real-time loading percentage
  • Delete Animation - Smooth slide-out effect
  • Collapsible Controls - Bottom bar can be collapsed for more preview space

🔧 Advanced Features

  • 🔒 HTTPS Support - Auto-generated self-signed certificates for LAN access
  • 📦 File Optimization - PLY → Splat format conversion, 43% smaller
  • 🧹 Auto Cleanup - Completed tasks auto-cleaned after 1 hour
  • ⚙️ Configurable Paths - Custom workspace folder
  • 🖥️ Fullscreen Mode - Immersive 3D preview
  • 🥽 VR Mode - WebXR-based VR preview, supports Quest/Vision Pro and other headsets with controller joystick movement
  • 🌐 Internationalization - Chinese/English bilingual UI, auto-detects browser language, manual toggle

📷 Preview

Main Interface

Main Interface

Sidebar gallery + 3D model preview + glassmorphism control bar

Mobile Adaptation

Mobile     Tablet

Left: Mobile drawer sidebar | Right: Tablet split layout

Feature Demos

🎬 Camera Movement Controls

WASD Controls     Virtual Joystick

Left: WASD/QE keyboard movement (Shift for precision) | Right: Mobile virtual joystick

🎬 Batch Upload + Queue Processing

Upload Demo

Drag multiple images to sidebar, queue updates in real-time

🎬 Gyroscope Control (Mobile)

Gyro Demo

Tilt phone to control view, iOS-style real-time indicator ball

🎬 One-Click Export & Share

Share Demo

Click Share to export standalone HTML, double-click to open in any browser


🎨 Design Highlights

  • 🪟 Glass Morphism - Frosted glass control bar with backdrop-filter: blur(30px)
  • Dynamic Particles - Canvas-rendered floating tech-style particles
  • 🎯 iOS-Style Indicator - Mobile gyroscope real-time feedback ball
  • 🎬 Fluid Animations - All interactions with cubic-bezier easing curves
  • 📱 Responsive Design - Perfect for desktop/tablet/mobile

🚀 Quick Start

System Requirements

PlatformInferenceVideo RenderingStatus
macOS Apple Silicon✅ MPS✅ Verified
Linux x86_64 no GPU✅ CPU✅ Verified
Linux x86_64 + NVIDIA✅ CUDA❓ Unverified
macOS Intel✅ CPU❓ Unverified
Windows❓ Unverified❓ Unverified

📢 No GPU? No problem! 3D model generation works on pure CPU. Only video rendering requires CUDA.
👉 Unverified platforms should theoretically work. Report issues on GitHub Issues.

Option 1: Download Pre-built Package (Recommended for Users)

Download the latest version from Releases:

# 1. Download and extract unzip sharp-gui-v1.0.0.zip cd sharp-gui # 2. Run install script (Python only) ./install.sh # Linux/macOS # or install.bat # Windows # 3. Start server ./run.sh # Linux/macOS # or run.bat # Windows

💡 Pre-built packages include compiled frontend, no Node.js required. Ready to use out of the box.
⚠️ Note: Pre-built packages are based on stable releases and may not include the latest development features.

Option 2: Install from Source (Developers / Latest Features)

# 1. Clone project git clone https://github.com/lueluelue12138/sharp-gui.git cd sharp-gui # 2. Run install script (auto-clones ml-sharp and configures environment) ./install.sh # Linux/macOS # or install.bat # Windows # 3. (Optional) To modify frontend, install Node.js 18+ then run: ./build.sh # Build frontend

💡 The install script auto-generates HTTPS certificates. HTTPS mode is recommended for full functionality.

Start Server

./run.sh # Linux/macOS (React version) ./run.sh --legacy # Use original single-file version # or run.bat # Windows

Access https://127.0.0.1:5050 (recommended) or http://127.0.0.1:5050 🎉


📖 Usage

Generate 3D Models

  1. Upload Image - Click "Generate New" or drag images to sidebar
  2. Wait for Processing - Watch queue progress (first run downloads ~500MB model)
  3. Preview Model - Click gallery items to view 3D

3D Interaction Controls

Basic Operations

ActionDesktopMobile
Rotate ViewLeft-click dragSingle finger swipe
PanRight-click dragTwo finger pan
ZoomScroll wheelPinch
Fine ZoomShift + Scroll-
Lock FocusClick on modelTap on model

Camera Movement

ControlDescription
WASD / QEKeyboard camera pan (forward/back/left/right/up/down)
Shift + WASDFast movement mode
Alt + WASDPrecision movement mode
Virtual JoystickMobile touch pan (tap Move button to enable)

Special Modes

ModeActionDescription
GyroscopeTap "Gyro" buttonTilt phone to control view
Front ViewTap "Front View" buttonLock to front view, tap again free
ResetTap "Reset" buttonRestore initial view
FullscreenTap "Fullscreen" buttonImmersive preview
VR PreviewTap "VR" buttonEnter VR mode (requires VR device)

Export & Share

Click Share button to generate a standalone HTML file:

  • 📦 Complete 3D viewer included (Three.js + Gaussian Splats 3D)
  • 🌐 No server needed, double-click to open in browser
  • 📉 Optimized size: PLY → Splat format, 43% smaller
  • 🔒 Includes disclaimer about content responsibility

⚙️ Configuration

Custom Workspace

Configure via UI settings or edit config.json (generated on first run):

{ "workspace_folder": "/path/to/workspace" }

The system auto-creates:

  • inputs/ - Uploaded images
  • outputs/ - Generated models

Enable HTTPS (Recommended)

HTTPS enables gyroscope on LAN devices (browsers require secure context for sensor APIs).

The install script auto-generates certificates. For manual generation:

python generate_cert.py

💡 Windows Users: Install Git for Windows or OpenSSL first.

After generating, restart and access via https://:

ModeLocalLANGyroscope
HTTPShttps://127.0.0.1:5050https://[IP]:5050✅ Available
HTTPhttp://127.0.0.1:5050http://[IP]:5050❌ Local only

First HTTPS access shows certificate warning (self-signed), click "Continue" to proceed.


🏗️ Architecture

Project Structure

sharp-gui/ ├── 📄 app.py # Flask backend + task queue system ├── 📄 install.sh/bat # One-click install scripts ├── 📄 run.sh/bat # Startup scripts (supports --legacy flag) ├── 📄 build.sh/bat # Frontend build scripts ├── 📄 release.sh/bat # Release packaging scripts ├── 📄 generate_cert.py # SSL certificate generator ├── 📁 frontend/ # React modern frontend (v1.0.0+) ├── 📁 templates/ # Original single-file frontend (Legacy) ├── 📁 static/lib/ # Three.js + Gaussian Splats 3D ├── 📁 ml-sharp/ # (after install) Apple ML-Sharp core ├── 📁 inputs/ # Input images └── 📁 outputs/ # Output models (.ply)

Frontend Architecture (React)

frontend/ ├── 📁 src/ │ ├── 📁 api/ # API client (gallery, tasks, settings) │ ├── 📁 components/ │ │ ├── 📁 common/ # Common components (Button, Modal, Loading, ParticleBackground) │ │ ├── 📁 gallery/ # Gallery components (GalleryList, GalleryItem) │ │ ├── 📁 layout/ # Layout components (Sidebar, ControlsBar, TaskQueue, Settings) │ │ └── 📁 viewer/ # Viewer components (ViewerCanvas, VirtualJoystick, GyroIndicator) │ ├── 📁 hooks/ # Custom Hooks (useViewer, useGyroscope, useKeyboard) │ ├── 📁 i18n/ # Internationalization (zh.json, en.json) │ ├── 📁 store/ # Zustand state management │ ├── 📁 styles/ # Global styles (variables, animations) │ ├── 📁 types/ # TypeScript type definitions │ └── 📁 utils/ # Utility functions ├── 📄 vite.config.ts # Vite config (code splitting) └── 📁 dist/ # Build output

Tech Stack

LayerTechnology
FrontendReact 19 + TypeScript + Vite / Single-file (Legacy)
StateZustand
i18ni18next + react-i18next
StylingCSS Modules + Apple Glass Morphism
BackendPython 3.10+, Flask, multi-threaded task queue
AI EngineApple ML-Sharp (PyTorch, gsplat)
3D RenderingThree.js + Gaussian Splats 3D

Performance Optimizations

OptimizationDescription
Code SplittingVite manualChunks: three.js (489KB), gaussian-splats (249KB), react-vendor (4KB)
Thumbnail SystemAuto-generated 200px JPEG thumbnails, saves bandwidth
Smart PollingActive 2s polling, idle 10s, saves resources
Format ConversionPLY → Splat export conversion, 43% smaller file size
Memory CleanupCompleted tasks auto-removed from memory after 1 hour
Progress OptimizationProgress bar only moves forward, no visual jumping

🛠️ Developer Guide

Frontend Development

# Install dependencies cd frontend npm install # Development mode (hot reload) npm run dev # Build for production npm run build # Or use project script ./build.sh

Switch Frontend Version

./run.sh # Use React modern version (default) ./run.sh --legacy # Use original single-file version

Create Release Package

# Auto build and package ./release.sh v1.0.0 # Output: sharp-gui-v1.0.0.zip (includes pre-built frontend)

🤝 Acknowledgements


🙋 Contributing

Issues and Pull Requests are welcome!

  • 🐛 Bug Reports - Submit issues on GitHub Issues
  • 💡 Feature Requests - Discuss new feature ideas via Issues
  • 🔧 Code Contributions - Fork the project and submit PRs

If you've tested on other platforms (Linux/Windows), feedback is appreciated!


⚠️ Disclaimer

Since local deployment has no content restrictions, 3D models generated by this project are created by users using AI tools. Users are solely responsible for the generated content, which is unrelated to this open source project and its developers.

It is strictly prohibited to use this tool to generate or distribute any illegal, infringing, or inappropriate content.


📄 License

This project is open source under the MIT License.

Note: ML-Sharp models have a separate Model License, for non-commercial use only.


If you find this useful, please give a ⭐ Star!

Made with ❤️ by lueluelue12138

About

No description, topics, or website provided.
51.95 MiB
0 forks0 stars1 branches2 TagREADMEOther license
Language
JavaScript85.7%
HTML6.3%
TypeScript4.2%
Python1.3%
Others2.5%