Skip to content

Latest commit

 

History

17 Commits

Folders and files

Repository files navigation

showcase

ElTo — Image to 3D Model Converter

ElTo is a desktop application built with Python and PySide6 that converts 2D images into textured 3D models using AI (TripoSR).

It features an integrated 3D viewport powered by Three.js, automatic background removal, built-in mesh post-processing, and flexible export options.

Offline


Features

  • Fast AI Reconstruction: Powered by the TripoSR deep learning architecture.
  • Interactive 3D Viewer: Built-in WebGL viewer using Three.js to orbit, pan, zoom, and inspect generated models.
  • Built-in Image Editor: Free-form crop and position tuning before generating.
  • Automatic Background Removal: Powered by rembg to separate subjects cleanly from backgrounds.
  • Mesh Post-Processing: Built-in mesh decimation and Laplacian smoothing options.
  • Multiple Export Formats: Export models directly to .obj, .glb, and .gltf formats.
  • Flexible Input: Drag and drop images or paste directly from the clipboard (Ctrl + V).
image image

Installation & Setup

1. Clone the repository

git clone [https://github.com/YASSER-27/Elto-Image-To-3d-Model.git](https://github.com/YASSER-27/Elto-Image-To-3d-Model.git)
cd Elto-Image-To-3d-Model
  1. Create a virtual environment
python -m venv venv
# On Windows:
venv\Scripts\activate
# On Linux/macOS:
source venv/bin/activate
  1. Install dependencies
pip install -r requirements.txt
  1. Download Model
git lfs install
git clone https://huggingface.co/stabilityai/TripoSR

Usage

Run the main application script:

python ElTo.py

elto_web [ 127.0.0.1:5732 ]

Running it

cd elto_web
pip install flask
python run.py

What changed vs. the desktop version

  • UI: the Qt sidebar (import/crop/quality/decimate/smooth/generate/save) is now a plain HTML/CSS/JS sidebar in static/index.html + static/app.js, same layout, same colors, same options.
  • 3D viewer: unchanged Three.js code, extracted verbatim from _build_viewer_html / _build_gltf_viewer_html. The only edit: the 4 spots that called bridge.saveFile(...) through QWebChannel now trigger a normal browser download instead — there's no Qt "Save As" dialog on the web, so the browser's own download flow replaces it.
  • Crop tool: replaced with a smaller drag-to-select canvas cropper (static/crop.js). It's simpler than the original CropDialog (no resize handles on an existing rectangle — you draw a new one each time), but does the same job.
  • Generation pipeline: pipeline.py is EngineThread/_process_image with the exact same body, only the communication layer changed (Qt signals → a small dict the Flask routes poll). The model loading, image preprocessing, mesh extraction, decimate/smooth, and OBJ/GLB/GLTF export logic is byte-for-byte the same.
  • meshCommand was dropped — checked the original code and it was never actually called from any JS, only defined and unused.

-Import an image by clicking "Import Image", dropping an image into the preview area, or pasting from clipboard (Ctrl + V).

-Click "Edit" to crop or adjust the image if needed.

-Configure target settings and adjust decimate or smoothing sliders.

-Click "Generate 3D Model" to process the image.

-Export your final result using "Save OBJ", "Save GLB", or "Save GLTF".

Format Description
.glb Binary format including vertex colors and textures. Ideal for web deployment and game engines.
.gltf JSON-based 3D structure file. Easy to parse and edit.
.obj Universal geometry format supported by Blender, Maya, 3ds Max, and other 3D software.

Releases

Packages

Contributors

Languages