Models

Packaging a model

The shape of a BOAT model package, how tools connect to the editor, and how to test and publish one.

Most new models need no changes to BOAT itself. A package is a folder with a manifest, tool definitions, icons and a small Python adapter. This page is an overview; the full specification lives in the repository's HOW_TO_ADD_MODELS.md.

First, check the fit

A package can be added without touching Core when every tool's input → output → annotation type combination is already supported, either through an existing editor binding or as a generic package tool. New input primitives or storage formats need a Core change first.

Package layout

model-packages/<id>/
  manifest.json                package declaration
  configs/<tag>.json           per-tag settings passed to the backend
  weights/<tag>/weights.json   per-tag weight files: path, URL, size, SHA-256
  commons/adapter.py           worker entry point (Runtime class)
  models/<platform>/           per-platform inference code and runtime locks
    inference/runtime.py       Backend class
    runtime/requirements.lock  hash-pinned dependencies
  runtime/requirements.in      dependencies shared by every platform
  tools/<tool-id>.json         tool definitions
  icons/<tool-id>.svg          tool icons (plain SVG, no scripts)
  licenses/                    upstream licenses and NOTICE.md

Platform directories are macos-metal, linux-cpu, linux-cuda126 and linux-cuda128. Keep them independent, and record any intentional difference between the two CUDA trees in platform-differences.json.

Naming rules

Item Rule Example
Package ID Lowercase, ^[a-z][a-z0-9_-]{0,63}$, same as the folder; never renamed once public my-detector
Tag ^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$; default is reserved base, large, S0
Version MAJOR.MINOR.PATCH 0.1.0
Tool ID Unique in the package; binding tools use <annotation-type>_<tool> object-detection_text-prompt

Tools

A tool JSON declares the annotation types it supports, its input (text, box, point, none, …), its output (boxes, masks, oriented_boxes, points, keypoints) and how results are applied. Add an editor_binding to plug into an existing editor flow, with its shortcuts, canvas input and candidate picker:

{
  "id": "instance-segmentation_auto-search",
  "label": "Auto Search",
  "annotation_types": ["instance_segmentation"],
  "editor_binding": "instance-segmentation_auto-search",
  "input": { "kind": "box", "multiple": false, "negative": false },
  "trigger": "submit",
  "icon": "icons/instance-segmentation_auto-search.svg",
  "output": "masks",
  "apply": "candidate_picker",
  "parameters": {}
}

Tools without a binding get BOAT's generic panel for prompt input, parameters, run, preview and apply.

Test locally

boat model install ./model-packages/my-detector

Installing runs automatic validation: the manifest and tool schemas, the file layout, dependency locks, and a real inference on the target device. Package tests live in tests/ and are excluded from published archives.

Publish

Maintainers build the release with the registry builder, sign index.json with the registry's Ed25519 key and upload the builder's output, never the source folder, to the bucket. Afterwards, run ./sync.sh in the website repository to refresh this site's catalog. See The model registry.

Found a model you would like packaged? Open an issue.

↑↓ navigate↵ open