Most automated animal tracking is done in the lab, against clean backgrounds and under even light. As an undergraduate researcher in the Hofmann Lab at UT Austin in 2025, I built a pipeline that works in the wild instead: following individual Plains Longear Sunfish (Lepomis aquilensis) through drone footage of a natural stream, where the males gather in breeding colonies and each defends a nest.
The question
How does an animal’s behaviour and use of space vary across different environments? Answering that needs numbers: where each animal is in every frame, how it moves, and whom it meets. Pose tracking turns video into that record, and gives a quantitative basis for describing behaviour.
The tool is SLEAP, a deep-learning framework for multi-animal pose tracking (Pereira et al. 2022). It learns from frames a person has labelled by hand, then predicts the same body points on every other frame.
Why wild footage is hard
A stream is close to the worst case for a tracking model:
- Light distortion. Ripples and dappled shade move across the whole scene.
- A patterned bottom. Gravel, cobble and algae look a lot like fish.
- Occlusion. Fish pass under debris, into shadow and over one another.
- Many animals. Several species share the water, and male and female sunfish look different.
The pipeline
Each fish is described by a five-point skeleton: head, dorsal, tail base, mid-tail and tail tip. From there the work is a loop.
- Prepare the video from the raw drone footage.
- Label a small set of frames by hand.
- Configure two models: one finds each fish, the other places the body points on it.
- Train on a remote GPU server.
- Run the model over the whole video and link detections into tracks.
- Assess the result, correct its mistakes, and train again.
Early models needed several rounds of that loop. After refining the labelling and the footage, a good model could be produced in a single round of training, and it tracked every frame of the video.
What the tracks show
Once every fish has a position in every frame, the video becomes data.
Passing it on
A pipeline is only useful if other people can run it. I wrote the workflow up as a guide for the lab, SLEAP from Scratch, which assumes no prior knowledge and covers everything from installation to training on the remote server and exporting results.
The tracking was presented as part of the poster Resilient Brains: Behavioral and Physiological Homeostasis in Highly Variable Environments (Phofolos, Wong, Husain and Hofmann).
References
Pereira, Talmo D., et al. 2022. “SLEAP: A Deep Learning System for Multi-Animal Pose Tracking.” Nature Methods 19 (4): 486–495. https://doi.org/10.1038/s41592-022-01426-1.


