Engines & models
amytl ships its heavy lifting as built-in CPU engines. Provider-backed engines replace them stage by stage.
The Engines tab of the inspector lists the catalogue with a live state badge. Nothing needs downloading.
| Stage | Engine | Runs | Needs a provider |
|---|---|---|---|
| Detect | heuristic (default) | CPU, offline | no |
| Detect | ai | provider | yes |
| Read | antigravity (default) | Antigravity vision | no — uses the Antigravity CLI |
| Read | ai-vision | provider | yes |
| Translate | antigravity (default) | Antigravity text | no — uses the Antigravity CLI |
| Translate | ai | provider | yes |
| Erase | diffusion (default) | CPU, offline | no |
| Erase | blur | CPU, offline | no |
| Typeset | browser canvas | your browser | no |
How the detector works
- Grayscale, then an adaptive threshold that follows local illumination.
- Morphological closing to join strokes within a character.
- 8-connected component labelling, then filtering by size, fill ratio and aspect.
- Neighbour merging into text lines, then into blocks — the boxes you see.
- PCA over the surviving ink estimates each block's slant for typesetting.
How the inpainter works
- Mask patches are rasterised, dilated and turned into a pyramid.
- The coarsest level is seeded from the mean of known pixels and relaxed hard.
- Each finer level inherits the upsampled solution and is relaxed again.
- The final level is written back to the page and saved as the cleaned image.
Resolution policy
Pages are normalised on upload to a 2000px long edge. Detection runs on a 1400px copy and its boxes are scaled back up, which keeps a full page comfortably under a second.