Application controls and options¶
This reference describes the controls implemented in src/index.html, src/js/ui.js, and the layout/analysis modules on the current main branch.
Choose a diagram¶
The sample gallery loads 16 choices from src/samples/samples.json: animal cell, heart, flower, eye, ear, mitochondrion, tooth, earth layers, volcano, Ohm's law circuit, pulley/lever, Australia states, solar system, plant cell, USGS water cycle, and skin layers. Selecting a sample starts its analysis; the app does not automatically analyze the heart on ordinary startup. Select a thumbnail to run it. Upload or drop a PNG, JPEG/JPG, or WebP image to use your own source. Files larger than 15 MiB are rejected. Transparent pixels are composited onto white; the longest image side is scaled to at most 1,400 pixels for analysis.
Use a clear labeled diagram where possible. Handwriting, rotated text, busy fills, overlapping leaders, and low-contrast lines can reduce recognition quality.
Output options¶
Paper¶
| Choice | Physical dimensions |
|---|---|
| Swell paper: Letter | 8.5 × 11 in (215.9 × 279.4 mm) |
| Swell paper: Tabloid | 11 × 17 in (279.4 × 431.8 mm) |
| Braille page | 11.5 × 11 in (292.1 × 279.4 mm) |
Letter and Tabloid automatically use landscape when the source width/height ratio exceeds 1.15; otherwise they use portrait. Braille page does not auto-rotate. Layout preserves image aspect ratio and reserves a 15 mm margin. Changing paper rebuilds layout/checks, not OCR or segmentation.
Outline style¶
- Detailed (like the original): retains more source structure. It drops connected specks under 4 mm where possible, emphasizes edges associated with named-part masks, and retains other detail as finer lines. It can preserve useful internal anatomy but leave crowded regions for review.
- Simplified (3 mm spacing): merges nearby lines at approximately the 3 mm scale, thins merged regions to centerlines, removes fragments shorter than 12.5 mm, and produces a cleaner structural layer. It can remove meaningful detail as well as noise.
This is a trade-off, not a quality ranking. Compare both styles on crowded diagrams. Changing style rebuilds layout/checks without rerunning OCR or segmentation.
Use Autotrace (Potrace)¶
Off by default. When enabled, the locally vendored Potrace WebAssembly package reconstructs the source as SVG; the app rasterizes that SVG at the normalized source dimensions and uses the reconstructed raster for OCR, leader detection, foreground/line analysis, and segmentation. The original remains available in the Original view.
Try it when raster edges are noisy, but compare carefully: reconstruction can simplify small details, alter boundaries, or affect OCR. If initialization fails or no visible contours are produced, the run reports an error and restores the previous result. Toggling Autotrace does not start processing on its own: the change is applied the next time you press the Start button (full pipeline, because the reconstructed image feeds OCR and segmentation).
Use experimental SAM 2.1 segmentation (WebGPU)¶
Off by default and experimental. This backend uses SAM 2.1 Hiera Tiny (fp16 ONNX, staged by npm run vendor, ~78 MB) and requires WebGPU. SlimSAM on WASM remains the default because it runs everywhere. Applying the option via the Start button reruns the full pipeline. See Models and inference engines for the Transformers.js v4 prompt-handling notes.
Use Indra OCR¶
Off by default and experimental. When checked, Indra OCR v1.1.0 is attempted first; if it errors or returns no text, PaddleOCR is tried, then Tesseract.js if PaddleOCR cannot run. When unchecked, PaddleOCR is first and Tesseract is the fallback. This is sequential fallback, not an ensemble.
The browser port currently supports Latin-script recognition only; the reference package's CJK/RTL/world recognizers, orientation/script classifiers, and language-model rescoring are not ported. Do not select it expecting multilingual OCR. Model assets must be prepared by npm run vendor. Toggling this option does not start processing on its own: the engine change is applied the next time you press the Start button, which reruns the full pipeline. See OCR engines.
Use experimental SAM 2.1 segmentation (WebGPU)¶
Off by default. When checked, the next analysis attempts to use the locally vendored SAM 2.1 Hiera Tiny fp16 model instead of SlimSAM. The model files add about 78 MB during npm run vendor. This backend requires navigator.gpu and a usable WebGPU adapter; browser support alone is not sufficient if the operating system, GPU, or graphics driver cannot provide one. TactiDiagram deliberately gates SAM 2.1 off on Firefox because the current ONNX Runtime WebGPU path is not reliable there. If WebGPU is unavailable, model initialization fails, or inference fails mid-run, the application automatically selects or retries the complete segmentation run with SlimSAM and reports the fallback reason. A completed fallback run is a SlimSAM result. Chrome and Edge are the recommended browsers; see the WebGPU setup guide for hardware-acceleration settings, GPU diagnostics, platform caveats, and browser-specific behavior. This option is experimental and not validated across every browser/GPU combination.
Tracing sensitivity (0–100)¶
The slider moves in steps of 5 and defaults to 55. Lower values are more conservative and can suppress noise, but may miss pale or faint contours. Higher values lower detection thresholds and can recover lighter regions and strokes, but may add noise and unnecessary detail. Sensitivity affects foreground, edge, colour-region, and thin-stroke recovery; it does not disable physical layout or braille-clearance logic.
After the slider changes, press the Start button: tracing is recalculated from the current prepared image while OCR and segmentation are reused, so the update stays fast. The button label shows "Apply settings & re-analyze" when settings have changed. Start at 55 and adjust by 5–10 after inspecting What the AI saw. There is no universally correct value.
Title (in braille, optional)¶
Enter up to 40 characters. The title is encoded in uncontracted UEB Grade 1 braille and placed in a reserved area above the diagram. Leave blank if not required or if page space is limited. Proofread the title and braille; this is not a full literary transcription tool. Changing it rebuilds layout/checks only.
Fill parts with textures¶
When enabled, the layout assigns distinct patterns to up to four sufficiently large, non-dominant segmented parts. Small parts and parts covering most of the figure are excluded; fills are inset from boundaries and kept clear of structural lines where possible. When disabled, the layout relies on outlines and line hierarchy. Textures can encode distinctions that colour cannot, but must be checked on a physical proof. Changing this option rebuilds layout/checks only.
Use letter keys for every label¶
When enabled, all labels that can be placed use unique two-letter alphabetic braille keys rather than full braille words. A key page maps each key to its full print label.
When disabled, the layout first tries full uncontracted braille and uses a key only when the full label cannot be placed without collisions or leaving the page. Thus a key page may still be produced with this option off. Review key uniqueness and mapping. Changing it rebuilds layout/checks only.
Result views¶
- Tactile graphic: layout preview. Tactile shows the page; Overlay places the original beneath the tactile drawing; Original shows the normalized source only.
- What the AI saw: prepared analysis image with OCR boxes, leader estimates, segmentation masks, and anchors. If Autotrace is on, this view reflects the reconstructed image; use Original to compare with the upload.
- vs. edge tracing: compares the label-guided output with a simple Canny edge-tracing baseline at the same page scale. The baseline is a diagnostic, not a competing complete transcription system.
- Key page: shows the key legend when any labels use keys. If all labels fit in full braille, it reports that no key page is needed.
- 3D relief: interactive raised-geometry view. Drag to rotate and scroll to zoom. The moving-light control pauses/resumes raking light. WebGL is required for this view and STL export, not for SVG or print/PDF.
Review labels¶
Each detected entry shows text, braille preview, placement status (full braille or key), association status (leader traced or label sits on the part), segmentation status, and any automatic vocabulary correction.
- Edit text: change the field and commit it (Enter or focus change). Braille and layout update; OCR is not rerun.
- Merge: the up-arrow appends this entry to the entry immediately above and combines their bounding boxes. Use only when OCR split one multi-line label. It removes the lower entry; inspect the merged label and association.
- Remove / Undo: exclude a false or irrelevant detected label, or restore it. This changes layout, not the analysis run.
The current interface cannot add a label that OCR missed entirely. Hovering an entry highlights its associated mask/label in supported views.
Guideline check¶
The table reports residual print marks, braille placement, close-line area, short fragments, braille clearance, texture count, and diagnostic leader lengths alongside a Canny baseline. A neutral row may be diagnostic rather than pass/fail. These geometric measurements do not establish scientific correctness, semantic label-to-part accuracy, tactile discrimination, or compliance certification.
Export¶
- Download editable tactile SVG: saves vector geometry with millimetre page dimensions and named groups. Inkscape is the recommended FOSS editor; other SVG editors can be used.
- Key page: downloads the key-page SVG.
- Print / PDF: opens a print document containing the tactile page and automatically appends the key page when keys are present. Use Save as PDF or print at 100% / actual size; disable fit-to-page.
- Download STL for 3D printing: available in the 3D relief tab; exports a plate model of raised lines, textures, and braille.
Screen-only preview elements are not necessarily part of the production SVG. Preserve physical page dimensions and braille/line sizes when editing. Keep an untouched export and independently recheck edits; vector-editor changes do not update the app's automated report.
Current limitations¶
The app has no in-app freehand contour editor, freehand leader editor, add-missed-label control, contracted UEB, multilingual braille transcription, or automatic tactile-usability certification. Larger vision-language and segmentation models on the research roadmap are not current app options.
Use direct Potrace SVG output (full analysis)¶
This option runs the complete pipeline normally, including OCR, leader detection, foreground and line analysis, part segmentation, tactile layout, and guideline checks. It then converts the original image to a monochrome edge map and traces object boundaries into editable Potrace paths, using that trace as the primary diagram artwork instead of the segmented drawing. Source colours and filled regions are discarded; the SVG uses black paths on a transparent background (no white page rectangle or opaque label patches). OCR-detected printed labels are excluded from the edge map and replaced by braille placed using the normal tactile layout's coordinates, collision handling, and clearance rules. Each braille label is a separate editable SVG layer.
The Use letter keys for every label checkbox works in this mode. When enabled, every placed label uses a unique two-letter alphabetic braille key, and the normal key page maps each key to its full print label. The key page is included in print/PDF output when required. The analysis view still shows leader associations and segmentation for review, even though segmented geometry is not used in the primary SVG. Potrace can simplify fine detail; inspect paths and label placement before production.
The direct trace is generated from the original uploaded image, even if Use Autotrace is also enabled. In that combined configuration, the Autotrace reconstruction is used only as the analysis input; direct output traces the untouched source. The edge-map stage masks OCR label boxes, calculates Sobel gradients independently in RGB channels, applies a bounded Otsu threshold, and passes a black/white bitmap to Potrace. Its SVG is transparent and monochrome by design: no original colours, filled regions, page-white rectangle, or opaque print-label patches are retained. This differs from standard segmented output, which renders semantic part masks and may include textures and opaque white knockouts.
The downloadable layered Potrace SVG has a Potrace linework layer, an optional braille-title layer, and an independent Inkscape layer for each placed braille label. Label layers can be moved independently in Inkscape or another SVG editor. The key page remains a separate export and is included in print/PDF when keys are present. The geometric guideline report is based on the normal analysis/layout data; it is not a validation report for the direct trace's path quality. The direct mode hides the 3D relief and edge-baseline comparison views because those views represent the segmented layout, not the direct SVG artwork.