Data analysis#

While idtracker.ai’s job ends when the trajectory files are validated. There are some extra tools (not part of but compatible with idtracker.ai), Trajectorytools and Fish Midline.

Trajectorytools#

A Python package that performs basic trajectory analysis and it is available at fjhheras/trajectorytools.

You can find some analysis routines from [1] implemented with trajectorytools in polavieja_lab/idtrackerai_notebooks. Here we present some of the analysis we get using a 10 juvenile fish video:

Plot of the trajectories of zebrafish tracked with idtracker.ai Neighbors density plot of zebrafish tracked with idtracker.ai

Smoothed trajectories (left) and density of neighbors around a focal fish (right)

../_images/velocity_and_acceleration.png

Velocities and accelerations#

../_images/polar_plots.png

Polar distributions of positions, turnings and accelerations#

../_images/distances_vs_random.png

Inter-individual distance histograms compared with shuffled trajectories#

Fish Midline#

A short Python script available at polavieja_lab/midline to extract posture information of animals tracked with idtracker.ai. Intended to be used with fish data but easily customizable and adaptable.

https://gitlab.com/polavieja_lab/midline/-/raw/master/example.gif

Example of posture information extracted with Fish Midline.#

References