About the Output files help

240 views
Skip to first unread message

ame...@terpmail.umd.edu

unread,
Nov 24, 2015, 12:43:55 PM11/24/15
to idTracker users, tennysos-contact
When idtracker finishes tracking, a window pops up. At that point you are given a few options, one of which is to view 'about the output files'. I've opened this before and I get useful info about trajectories.mat and trajectories_nogaps.mat files. However I can't find this information anywhere else. Does anyone know if there is another way to access this info? Or if anyone would be so kind as to paste that info here?

One more question: When idTracker finishes, it will say for example "99% reliability of identities" in the popup. What are the units that the percentage is referring to? Is it the percentage of video frames where identities are accurate, meaning that there would be an error rate of 1% frames?

All help is appreciated! Thank you. 

Alfonso Pérez Escudero

unread,
Nov 24, 2015, 1:17:43 PM11/24/15
to idTracker users, stephen...@gmail.com, ame...@terpmail.umd.edu
Hi! Sorry for the limited documentation. This is the text about the data files (I will answer your other question in a separate reply):

You will find four output files in the same folder as the video: Two of them are .mat files, to be loaded into Matlab. The other two are .txt files to import the data into any other software. Both .mat and .txt files contain identical information, which is the following:

- X AND Y COORDINATES OF EACH INDIVIDUAL IN EACH FRAME

For .mat files: This information is contained in the variable 'trajectories', which is a three-dimensional matrix. The first dimension runs along frames of the video, the second dimension runs along the different individuals, and the third dimension corresponds to the x and y coordinates. So for example, the element trajectories(1742,3,1) is the x coordinate of individual 3 in frame 1742.

In the .txt files: Each row corresponds to one frame of the video. Columns 1 and 2 are the x and y coordinates of individual 1, respectively. Columns 4 and 5 are the x and y coordinates of individual 2, and so on. NOTE that columns 3, 6, 9 etc. are not coordinates (see below).

-PROBABILITY OF CORRECT ASSIGNMENT

This is an estimation of the probability of correct assignment for each frame. It is usually conservative, see Supplementary Figure 3 of the paper [1].

In the .mat files: The probability is contained in the variable probtrajectories, which is a two-dimensional matrix. The first dimension runs along frames, and the second dimension runs along individuals.

In the .txt files: The probabilities for individual 1 are in column 3, for individual 2 in column 6, and so on.

DIFFERENCE BETWEEN trajectories AND trajectories_nogaps

The files called 'trajectories' contain only the position of each individual when it is not occluded.

The files called 'trajectories_nogaps' contain the position of each individual also when occluded. The probability of correct identity contains a negative number when the position comes from an estimation. -1 means that the animal was occluded, but a centroid was found after resegmentation of the image. -2 means that the image could not be resegmented, so the position of the centroid is not very accurate. See the paper [1] for more information. There may be small differences between 'trajectories' and 'trajectories_nogaps' even in the non-occluded frames, due to a correction algorithm during the estimation of occluded centroids.

[1] Pérez-Escudero, Vicente-Page, Hinz, Arganda, de Polavieja. idTracker: Tracking individuals in a group by automatic identification of unmarked animals. Nature Methods 11(7):743-748 (2014)

Alfonso Pérez Escudero

unread,
Nov 24, 2015, 1:24:53 PM11/24/15
to idTracker users, stephen...@gmail.com, ame...@terpmail.umd.edu
About your second question:

idTracker estimates, for every individual in every frame, what is the probability that the identity is correct. This information is in the variable probtrajectories (except the negative entries, that mean something else as mentioned in my previous reply). The estimation that idTracker gives at the end is the average of all these numbers (only the positive ones). Therefore, 99% means that on average the probability of correct identity is 0.99. This may be either 99% of the frames with estimated probability 1 and 1% with estimated probability 0 (or very low), or all frames with estimated probability 0.99.

But please, keep in mind that this is a very crude estimate. In our experience, estimates above 80% actually meant over 99% of the frames with correct identities (see Supplementary Figure 3 of the paper [1]). But even this calibration that we presente in the paper is valid only for the species and conditions that we tested. We recommend to check visually that the tracking is doing OK for the first videos in a new condition (new species, new set-up and/or new number of individuals). Then, use the estimated quality at the end of the video as a flag of videos that get unusually low values (compared to what you usually get, rather than to anything we get in the paper).

I hope this helps!
Reply all
Reply to author
Forward
0 new messages