Video generators# provides a tool to generate tracked videos, i.e. a composition of the original input video with the trajectories and labels on top. These videos can be useful to visually validate the tacking or to share your results. The command below:

idtrackerai_video path/to/session_folder

generates a general tracked video inside the session folder (see the Youtube video below on the left).

Individual videos can also be generated by adding the flag --individual to the command above, this creates a small individual video for each animal (see the Youtube video below on the middle) and, also, a general video collage (see the Youtube video below on the right).

Both video styles (general or individual) can draw the original video in grayscale by adding --gray to the command.

Finally, the video time interval can be optionally defined using --s (start) and --e (end). For example

idtrackerai_video path/to/session_folder --individual --gray --s 0 --e 1000

generates individual videos in grayscale from frame 0 to frame 1000 with the trajectories of session_folder.

By running idtrackerai_video -h, a list of all available options is displayed:


Generate individual video. Default is a general video.


Draw the original video in grayscale.


path Path to the trajectory file, default is session_dir/trajectories/trajectories_wo_gaps.npy.


int Trail length, number of points used to draw the individual trajectories traces. Only for general videos. Default is 30.


int Frame where to start the video.


int Frame where to end the video.


int Size of the squared individual videos. Defaults to the median body length of the animals.