ClayArgus (clayarg)

Full-local macOS photogrammetry pipeline.
Photos in, Fusion 360-ready mesh out.
Coin (or, yes, a banana) for scale.
Nothing leaves your machine.

AGPL-3.0 v0.3.0 macOS · Apple Silicon Python + Swift
zsh — ben@MiniM1

Why "ClayArgus"?

Clay — built to scan clay models into Fusion 360. Works on anything you can photograph, but clay is where it started.

Argus — the many-eyed giant from Greek myth. The tool examines every photo for blur, exposure, and duplicates before solving.

Pipeline

I. Image Quality Analysis Laplacian blur detection, exposure clipping, perceptual hash dedup
II. Scale Detection Hough circles (coins) or YOLO (banana) for real-world sizing
III. Subject Framing Apple Vision objectness saliency auto-crop
IV. Visual Preview MJPEG flythrough + confirm before solve
V. 3D Solve Apple Object Capture via standalone Swift CLI (clayarg-capture)
VI. Mesh Optimization PyMeshLab decimation, repair, scaling → .obj / .stl / .ply

Install

# clone
$ git clone https://github.com/Intrafocal/clayarg
$ cd clayarg
# build the swift cli
$ cd src/swift && swift build -c release && cd ../..
# install python package
$ pip install -e .
macOS 14+ (Sonoma) Apple Silicon (M1+) Xcode 15+ CLI tools Python 3.12+

Usage

$ clayarg run ./photos --name my-part
Flag Default Description
--name (required) Project name, used for output filenames
--detail medium preview / reduced / medium / full / raw
--poly-count 10000 Target triangle count after decimation
--format obj obj / stl / ply
--sensitivity normal Feature sensitivity: normal / high
--scale-obj Which object is the reference: smaller / larger
--scale-ref quarter / euro / pound / loonie / banana
--scale-mm Define your own coin diameter in mm
--skip-qa off Skip image quality analysis
--skip-framing off Skip Apple Vision subject framing

Output

clayarg_mymodel/
  mymodel_raw.obj — high-fidelity capture
  mymodel_fusion.obj — decimated, repaired, Fusion-ready
  cropped/ — auto-cropped images (Phase III)
  preview.mjpeg — camera path flythrough
  processing_report.json — quality scores, scale, culling decisions

Architecture

Two independently built components, loosely coupled via subprocess + JSON on stdout.

Swift CLI clayarg-capture — standalone executable wrapping PhotogrammetrySession. Can be used independently.
Python clayarg — orchestrator. Image QA, scale detection (Hough circles + YOLOv8n via cv2.dnn), Apple Vision framing, Swift CLI subprocess, PyMeshLab mesh optimization.