Skip to content

Data model

Generic by design

The backend must not contain concepts such as animal, root, or cell as special cases. A generic project may eventually contain:

Project
├── Media references
├── Tasks
├── Classes
├── Contributors
├── Annotations
├── Consensus
├── DatasetVersions
└── ModelVersions

Media
├── MediaDerivatives
└── VideoFrames

Prediction
Job

A project can contain multiple tasks and may optionally connect them into a pipeline. For example, frame extraction can precede presence classification, which can precede point, box, or mask annotation. A root project can start directly with segmentation. Exact dependency and conditional-trigger rules remain open design decisions.

A generic annotation might contain fields conceptually similar to:

Annotation
├── media_id
├── contributor_id
├── task_type
├── class_id
├── geometry
├── confidence
├── source
└── created_at

For classification:

geometry = null
class = animal

For detection:

geometry = bounding_box(...)
class = deer

For segmentation:

geometry = mask/polygon(...)
class = root

The same structure supports geometry = point and geometry = path. A prediction references a model version, media item, confidence, and optional geometry. A job represents asynchronous preprocessing, inference, training, or export work.

Media resources are independent from project-specific tasks, classes, and subsets, so several authorized projects can reuse one original file without copying it. Derivatives and extracted video frames remain linked to that original; identical files may later be detected by content hash.

This generic structure lets the platform start with classification while remaining extensible toward detection, segmentation, points, and tracking; see Annotation types.

Dataset versioning

Training operates on frozen, reproducible dataset versions rather than on a constantly changing collection of annotations:

Raw annotations
      ↓
Quality control / consensus
      ↓
DatasetVersion v1
      ↓
Train / validation / test split
      ↓
ModelVersion v1
New annotations + corrections
      ↓
DatasetVersion v2
      ↓
ModelVersion v2

This makes model comparisons and scientific reproducibility much easier.

Models shared between projects

A project's researcher can share one of its models (ModelVersion.shared). Every other project then sees it in its catalogue ("Models from other projects", in the training panel) and can use it: that adds a ModelVersion of its own, with the next version number and the same weights file, and with source_model_id pointing to the shared model and no training_job_id (it was trained elsewhere). Nothing is copied or retrained. Once activated, the adopted model suggests marks while annotating, runs predictions and follows videos like a model trained in the project. Its categories become the project's categories with the same key; the others are ignored.

A training can start from one of the project's models, trained there or adopted (start_from_model_id, "Start from" in the training panel): the trainer copies its weights before training instead of the network's usual ones (fine-tuning; a head sized for other categories starts over), so a shared detector adapts to a new place with few annotated images. The new model's metrics say which version it started from (started_from_version).

The adopted model belongs to the project that adopted it: it stays when the model is no longer shared, when the shared model is deleted and even when its project is deleted. A weights file is only removed with the last model that uses it. Research use only, never commercial.

Contributor identity (MVP)

Public contributors do not require accounts for the MVP. A browser-generated anonymous identifier is stored locally:

contributor_id = anonymous UUID

This lets AnnoTrain count contributors, avoid repeatedly showing the same image to the same contributor, calculate annotation statistics, and preserve contributor-level annotation histories. Optional session codes can later distinguish groups, e.g. BT2026 for annotations produced during the Bioinformatics Tools course.

Project visibility

Future project visibility modes: Private, Unlisted / link only, Public. Publishing is a separate set of choices: a researcher may want public participation without immediately releasing every raw scientific file:

  • Publish annotations
  • Publish dataset
  • Publish trained model
  • Publish training configuration