Abstract
Studying and quantifying fish behaviour is important to understand how fish interact with their environments. Yet much of fish behaviour in aquatic ecosystems remains hard to observe and time-consuming to manually document. Automated tracking through computer vision techniques can provide fine-scale movement data of many individuals across spatial and temporal scales. When used alongside statistical methodologies such as structural equation models (SEMs), these data can be used to infer underlying latent behavioural events of an animal without direct observations. However, interpreting the main modes of fish behaviour when presented with large datasets remains a challenge. We developed a cross-validation routine to evaluate methods for accurately predicting behaviour from a large field dataset. We created SEM behavioural models using different combinations of temporal buffers in training data and evaluated them against a fixed evaluation dataset for three common fish species (Moses perch, southern herring and yellowfin bream). We then used the SEM model with the lowest error for each species to translate movement data into ecologically relevant behavioural events. The temporal buffer generating the SEM models with the best predictive capacity varied among species, from 1 min for Moses perch and southern herring, to 45 min for yellowfin bream. Models were able to accurately predict behavioural events such as foraging (slow, sinuous movement near the substrate) and fine-scale diurnal migration (fast, directional movement near the surface). We developed a framework to optimise temporal partitioning in computer vision tracking data using SEMs. We demonstrate how data can be translated into ecologically relevant behavioural events such as foraging and fine-scale migrations. This is a step towards bridging the gap between development and application of new technologies to monitor behaviour of animals in aquatic ecosystems.
Introduction
Understanding fish behavior is critical for ecological monitoring, yet traditional manual observation is often impractical due to the sheer volume of data generated by underwater cameras. While computer vision (CV) can automate the tracking of fish, raw movement coordinates do not inherently describe complex behaviors. Furthermore, CV tracking in the wild faces the statistical hurdle of "pseudoreplication": because individual fish are often unidentified, the same animal might be tracked across multiple short bursts, leading to biased statistical models if treated as independent data points.
This paper presents a novel framework that bridges the gap between raw pixels and ecological insight. By combining deep learning-based tracking with Structural Equation Modelling (SEM), the researchers successfully translated raw movement data into meaningful "latent" behaviors, such as foraging and migration, while accounting for the challenges of tracking unidentified individuals.
Methods and Materials
The researchers developed a multi-stage pipeline to process 90 hours of underwater video collected at a piped tidal weir in the Maroochy River estuary, Australia. The study focused on three species: Moses perch (Lutjanus russellii), southern herring (Herklotsichthys castelnaui), and yellowfin bream (Acanthopagrus australis).
Object Detection and Tracking
The pipeline utilized a Faster R-CNN architecture with a ResNet50 backbone to detect fish species. To link these detections into continuous tracks, the team employed Sequential Non-Maximum Suppression (Seq-NMS).
Feature Extraction and SEM
For every track, four key movement metrics were calculated: spatial angle, spatial speed, detection depth, and sinuosity. These metrics, alongside environmental covariates, were integrated into a Structural Equation Model. Unlike simple regression, SEMs allow researchers to model "latent" variables—hidden states like "foraging" that cannot be measured directly but influence observed movement patterns.
Buffered Leave Block Out Cross-Validation
To combat pseudoreplication, the study introduced a "buffered leave block out" cross-validation routine. By testing various temporal buffers (from 1 to 60 minutes) to separate training and evaluation data, the researchers ensured the models learned generalized behaviors rather than memorizing the movements of specific individuals present at a given time.
Results and Discussion
The SEM framework successfully identified two primary behavioral modes across the target species:
- Foraging: Characterized by slow, sinuous movements near the substrate (bottom).
- Fine-scale Migration: Characterized by fast, directional (low sinuosity) movements near the water surface.
The optimal training buffer varied significantly by species. Moses perch and southern herring required only a 1-minute buffer, likely due to lower abundance or rapid behavioral shifts. In contrast, the highly abundant yellowfin bream required a 45-minute buffer to overcome the bias of tracking the same individuals repeatedly. Interestingly, environmental covariates like tides and time of day did not significantly influence the latent behavioral states in this dataset, suggesting that movement patterns themselves were the strongest indicators of behavior.
Conclusion and Future Work
This study demonstrates how automated tracking data can be translated into ecologically relevant behavioral events. While the current 2D camera setup limits depth perception, future work incorporating stereo imagery could provide true 3D spatial metrics. Additionally, integrating fine-grained image classification to identify individual fish could further refine the data. This framework represents a significant step toward bridging the gap between technological development and the practical application of monitoring animal behavior in aquatic ecosystems.
Summary updated