1 ADR 0049 two step plant discovery
Forgejo Actions edited this page 2026-09-25 16:38:07 +00:00

ADR 0049: Two-Step Plant Discovery Pipeline

Status: proposed Date: 2026-06-12

Context

Current plant discovery uses a single-step worker approach. Recent improvements (PR #305) introduced YOLO-World for detection and PlantNet for identification, but these are bundled in one execution.

We need to align visual discovery with the People pattern: face_detection -> owner_face_recognition.

Splitting into plant_detection and plant_identification (or generic discovery_detection and discovery_identification) allows:

  1. Reusing generic detection results.
  2. Independent scaling of detection vs. identification.
  3. Better UX for "Detected but not yet identified" states.
  4. Chained pipelines where detection crops feed classification.

Options Considered

Option Summary Benefits Costs / Risks
Bundled (Current) Worker does both in one job. Simple Core logic. Opaque provenance; can't reuse crops; difficult to scale identification independently.
Two-Step (Decoupled) Detection worker crops; Identification worker classifies. Aligns with People; reuse crops; independent models/scaling. More complex job chaining in Core.

Decision

Two-Step (Decoupled).

We will split plant discovery into plant_detection (producer of regions) and plant_identification (consumer of regions/crops).

Consequences

  • Core must support job chaining (detection -> identification).
  • Worker protocol must support passing crops or region refs.
  • Media Detail Viewer should handle "detection-only" results.
  • Plant identification becomes a second-stage job enqueued upon detection completion.

Revisit Triggers

  • [Generic detection-classification framework replaces domain-specific lanes]