Generate custom gridfinity bins from photos of your tools.
- Place tools on A4/Letter paper (portrait or landscape)
- Take a photo from above
- Upload and adjust paper corners for scale calibration
- AI traces tool outlines automatically
- Save traced tools to your library
- Create bins, add tools from the library, arrange the layout
- Download STL/3MF for 3D printing
Try it at tracefinity.net without installing anything, or self-host:
# local model (no API key needed)
docker run -p 3000:3000 -v ./data:/app/storage ghcr.io/tracefinity/tracefinity
# or with Gemini API
docker run -p 3000:3000 -v ./data:/app/storage -e GOOGLE_API_KEY=your-key ghcr.io/tracefinity/tracefinityBy default, Tracefinity uses a local InSPyReNet model for tracing -- no API key needed. Set GOOGLE_API_KEY to use Gemini instead for higher accuracy on complex tools.
| Variable | Default | Description |
|---|---|---|
GOOGLE_API_KEY |
Gemini API key. When set, uses Gemini instead of the local model | |
GEMINI_IMAGE_MODEL |
gemini-3.1-flash-image-preview |
Gemini model for mask generation (see below) |
Prerequisites: Python 3.11+, Node.js 20+
git clone https://github.com/tracefinity/tracefinity
cd tracefinity
# First time setup
cd backend && python3 -m venv venv && source venv/bin/activate && pip install -r requirements.txt
cd ../frontend && npm install
cd ..
# Run (starts backend on :8000 and frontend on :4001)
make devTracefinity supports three ways to trace tool outlines from photos. All three produce the same output -- black and white mask images that get converted to editable polygons via OpenCV contour extraction.
When no API key is configured, Tracefinity uses InSPyReNet, a background removal model that runs entirely on your machine. No API key, no network access, no cost. ~0.7s per image on Apple Silicon, ~2-3s on CPU. Model weights (~80MB) download automatically on first trace. See #13 for how this model was chosen.
Set GOOGLE_API_KEY to use Google's Gemini models instead. Higher accuracy overall, especially on complex or reflective tools. To get a key: Google AI Studio (free tier available).
| Model | Pros | Cons |
|---|---|---|
gemini-3.1-flash-image-preview (default) |
Fast, good mask quality | Preview model |
gemini-3-pro-image-preview |
Best mask quality, pixel-accurate alignment | Slower, preview model |
gemini-2.5-flash-image |
Faster, cheaper, GA | Returns arbitrary dimensions, needs post-hoc alignment |
No API key and prefer not to use the local model? Upload a mask manually:
- Upload your photo and set paper corners
- Click "Manual" and download the corrected image
- Open Gemini and paste the image with the provided prompt
- Download the generated mask (black tools on white background)
- Upload the mask back to Tracefinity
- AI-powered tracing -- Local model or Gemini generates accurate tool silhouettes from photos
- Manual mask upload -- Use the Gemini web interface without an API key
- Selective saving -- Choose which traced outlines to keep before saving to your library
- Tool library -- Save traced tools and reuse them across multiple bins
- Tool editor -- Rotate tools, add/remove vertices, adjust outlines, snap to grid
- Smooth or accurate -- Toggle Chaikin subdivision for smooth curves, or keep the raw trace; SVG and STL exports both respect this
- Finger holes -- Circular, square, or rectangular cutouts for easy tool removal
- Interior rings -- Hollow tools (e.g. spanners) traced correctly with holes preserved
- Bin builder -- Drag and arrange tools with snap-to-grid, auto-sizing to fit the gridfinity grid
- Cutout clearance -- Configurable tolerance so tools fit without being too loose
- Text labels -- Recessed or embossed text on bins
- Gridfinity compatible -- Proper base profile, magnet holes, stacking lip
- Live 3D preview -- See your bin in three.js before printing
- STL and 3MF export -- 3MF supports multi-colour printing for embossed text
- SVG export -- Individual tool outlines as SVG, with smoothing applied
- Bed splitting -- Large bins auto-split into printable pieces with diagonal fit detection
- Landscape and portrait -- Paper orientation auto-detected from corner positions
- Single-container Docker -- Frontend and backend in one image, data in a single volume
Gridfinity is a modular storage system designed by Zack Freedman. Bins snap into baseplates on a 42mm grid, making it easy to organise tools, components, and supplies. The system is open source and hugely popular in the 3D printing community.
MIT
