Metadata-Version: 2.4
Name: image-to-mesh-cli
Version: 0.1.1
Summary: Image -> semantic segmentation -> per-object Unity meshes
License-Expression: Apache-2.0
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: ultralytics>=8.2
Requires-Dist: pillow>=10.0
Requires-Dist: numpy>=1.26
Dynamic: license-file

# image-to-mesh-cli

Image → semantic segmentation → per-object Unity meshes.

Free, local pipeline: YOLO-seg cuts an image into object masks + transparent
crops, then each crop becomes a Unity-importable mesh (textured-quad stub
today, TripoSR backend optional).

## Install

```bash
pip install image-to-mesh-cli
# or from source:
pip install -e .
```

Requires Python 3.10+.

## Use

```bash
image-to-mesh segment test_images/bus.jpg --out output/bus
image-to-mesh mesh --manifest output/bus/manifest.json --out output/bus/meshes --backend stub
image-to-mesh pipeline test_images/bus.jpg --out output/bus --backend stub
```

Outputs per image: `overlay.jpg`, `masks/`, `crops/` (RGBA, square-padded for
image-to-3D), `manifest.json`, `meshes/` (`.obj` + `.mtl` + texture).

Drag `meshes/*.obj` into Unity — each imports with its crop as texture.

## Backends

- `stub` (default): textured quads, works everywhere, no GPU needed.
- `triposr`: real single-image-to-3D via TripoSR. Needs torch plus a checkout at
  `./triposr_weights_src` (cloned from VAST-AI-Research/TripoSR). Falls back to
  `stub` when unavailable.
