TL;DR
This paper introduces a non-invasive computer vision pipeline that tracks fish shoals to monitor their health via automated locomotion analysis. By modifying a state-of-the-art YOLOv11 detector to ingest multi-frame temporal context and pairing it with standard tracking frameworks (ByteTrack and BoT-SORT), the system reliably extracts collective swimming speed and direction metrics. The approach is validated on a newly curated, highly dense dataset of Sulawesi ricefish.
What Problem Does This Paper Address?
In aquaculture and marine conservation, monitoring fish health is vital for early disease detection and animal welfare. Behavioral shifts—such as erratic bursts or abnormal vertical floating caused by swim bladder disease—serve as primary indicators of stress or pathology.
While vision-based multi-object tracking (MOT) offers a low-cost, non-contact method to capture these behaviors, tracking fish in a realistic environment is notoriously difficult. Fish often look identical, move rapidly, continuously deform their non-rigid bodies, and frequently occlude one another in dense shoals. Furthermore, existing computer vision datasets for fish tracking often use oversimplified setups, such as shallow tanks with uniform backgrounds and no vegetation, which fail to prepare models for real-world conditions.
Methods
The authors employ a Tracking-by-Detection (TbD) paradigm consisting of three main stages: object detection, data association (tracking), and locomotion feature extraction.
- Multi-Frame YOLOv11 Detector: The core innovation lies in modifying the first convolutional layer of the YOLOv11 architecture. Instead of processing a single RGB frame, the network accepts a channel-wise concatenation of multiple frames ($N \times M \times 3n$). The authors experiment with various temporal context windows:
- Symmetric windows (e.g.,
xXxorxxXxx), which look both backward and forward in time relative to the focus frameX. - Sparse windows (e.g.,
x_X_x), which omit the frames immediately adjacent to the focus frame to capture a broader time horizon without increasing channel density. - Asymmetric windows (e.g.,
xxX), which look only at past frames. - Tracking Frameworks: The detections are fed directly into ByteTrack and BoT-SORT, two high-performing tracking algorithms that rely on Kalman filters for motion prediction and prioritize high-confidence detections during frame-to-frame association.
- Locomotion Analysis: Individual fish trajectories are converted into frame-by-frame displacement vectors. To analyze shoal behavior holistically, these vectors are mirrored along the vertical axis to map swimming angles into a standardized $-90^\circ$ (orthogonal downwards) to $90^\circ$ (orthogonal upwards) range, where $0^\circ$ represents perfect horizontal swimming.
Datasets
The authors introduce a new, manually annotated video dataset of Sulawesi ricefish shoals.
- Environment: Unlike simplified lab tanks, this dataset features a realistic home-aquarium-like environment complete with aquatic plants, varying illumination, and complex backgrounds.
- Specifications: High-resolution video (2448 $\times$ 2048 pixels) captured at 30 frames per second.
- Density: It contains two evaluation sequences: Video A is highly dense, averaging ~91.2 fish per frame (9,214 total instances), while Video B is moderately dense, averaging ~19.5 fish per frame (1,969 total instances).
Key Insights and Ideas
- Symmetry is Crucial for Temporal Context: Incorporating future frames alongside past frames significantly improves object detection. Conversely, asymmetric windows that only look into the past (
xxX) perform worse than the single-frame baseline, likely because they introduce visual confusion without bounding the object's immediate trajectory. - Temporal Sparsity Beats Density: Skipping adjacent frames (
x_X_x) performs on par with dense consecutive windows (xxXxx). This suggests that models benefit more from a wider temporal baseline than from highly redundant, frame-by-frame steps. - The "Good Enough" Paradox for Shoal Metrics: While adding multi-frame context marginally improves strict tracking metrics (like IDF1 or HOTA) by 1–3 percentage points, the extracted collective distributions of swimming direction and speed match the ground truth remarkably well across almost all models—including the basic single-frame baseline. For macro-level health monitoring where shoal statistics matter more than maintaining a flawless individual identity for minutes at a time, standard lightweight models are surprisingly sufficient.
Key Results
- Detection Performance: Initializing the sparse symmetric model with pre-trained single-frame weights (
x_X_x_pt) yielded the best results, boosting the strict mAP50-95 score to 76.6%—a massive 13 percentage point improvement over the single-frame baseline. - Model Scale: Medium-sized YOLOv11 models (9.4M parameters) consistently outperformed both the nano and large variants, striking the best balance between feature capacity and generalization on the small training set.
- Tracking vs. Ground Truth: While temporal context improved tracking robustness, a significant performance gap remains when compared to tracking with ground-truth detections (which achieves an 85% HOTA score), highlighting that detection fidelity remains the primary bottleneck.
Limitations and Future Work
The primary limitation of this study is the size of the training dataset (33 frames), which caused the largest YOLOv11 model variant to overfit. Additionally, rapid and erratic fish movements still pose a challenge to the underlying Kalman filters used in the tracking step.
For future work, the authors plan to deploy this system for long-term analysis in a real, biodiversity-focused fish farm. They also aim to explicitly incorporate motion blur modeling into the tracking framework to better handle high-velocity behavioral bursts.
Summary updated