Skip to content

About this project

Two Danio rerio near an Anubias leaf in the observation tank, light refracting into a spectrum on the back glass

Govinda Lienart · AquaMind · updated 2026

Abstract

AquaMind is an open-source computer-vision tool that automatically tracks and analyses the behaviour of zebrafish (Danio rerio) in an observation tank. It replaces the manual behavioural scoring done by hand during a behavioural-ecology PhD with an automated PyTorch and OpenCV pipeline. The system detects and tracks individual fish across video frames, holds identity through occlusion behind plants and pipes, and uses that tracking to measure activity, bottom-dwelling, chasing and feeding strikes for a chemical-alarm-cue antipredator assay.

During a behavioural-ecology PhD I scored fish behaviour by hand, frame by frame, for years: line crossings, feeding strikes, chases. It is slow, it does not scale, and it is hard to keep consistent between observers. AquaMind automates that scoring with a computer-vision pipeline.

The pipeline detects and tracks individual fish across video frames, holding identity even when a fish is partly hidden behind the plant or a pipe, and then uses that tracking to measure real behaviour: activity, bottom-dwelling, chasing and feeding strikes, for a chemical-alarm-cue antipredator assay, a standard paradigm in the field.

Layer Tools
Detection YOLOv8, fine-tuned on hand-labelled frames
Tracking a custom SORT-style tracker: constant-velocity motion model, OC-SORT direction consistency, merge-aware geometry, optional learned appearance embedding
Behaviour kinematic features and CNN + LSTM classifiers, per behaviour
Data MySQL for frames, annotations and tracks
ML operations MLflow for experiment tracking and a model registry, DVC for dataset versioning

The point of the project is the behavioural-ecologist × ML-engineer overlap. I know what the behaviours mean and how they are measured in the field, not just how to detect a moving blob. AquaMind is built end to end: data pipeline, detector, tracker, re-identification and behaviour classifiers, with the experiment tracking and dataset versioning a real project needs.

AquaMind pipeline overview, stages 1 to 9: a data pipeline (frame extraction, annotation, object detection), a custom tracker, a model-assisted annotation stage that relabels the tracker's failures and feeds a retrained detector back into object detection, then re-identification, two behaviour classifiers (chasing, feeding-strike), and deployment.
FigStages 1-9 grouped by role: data pipeline (green, top), tracker (blue), model-assisted annotation (green, right of the tracker), re-identification and two behaviour classifiers running off the same tracked data (bottom), and deployment (grey, upcoming). The dashed purple arrow is a feedback loop, not part of the main forward flow: the tracker's failures are relabelled, and the retrained detector returns to object detection.

AquaMind today is a developer pipeline: scripts, a local MySQL database, MLflow and DVC, no GUI. idtracker.ai already serves non-coding biologists; AquaMind’s value here is the ML engineering and data architecture. A thin Streamlit/Gradio front end and a Docker Compose bundle are a possible later step, not a requirement.

Govinda Lienart, behavioural ecologist (PhD, James Cook University; published in Animal Behaviour) moving into machine-learning engineering.

  • PhD in behavioural ecology, James Cook University
  • Postgraduate AI, Erasmus Hogeschool Brussels
  • PCAP-certified Python programmer