menu_book

Knowledge Base

Documentation, guides, and resources for Noldus products.

EthoVision XT 19 - Edit the Tracks - Swap Subjects

Last updated: Jul 28, 2026

Swap Subjects

The subjects in the selection are swapped. You can check this in the Samples List, where the coordinates and the area are swapped between subjects and for the rows selected.

Notes

  • To search for subject swaps, plot the dependent variable Distance Moved in the Integrated Visualization. The peaks in the plot appearing for two subjects indicate a quick displacement of the body points, that is a suspect subject swap.
  • To quickly swap two subjects for just one sample, drag the mouse around the subject's body points in the video window. Make sure that the Track Editor only displays one sample. Then click the Swap Subjects button.
  • In the Time column of the Samples List, the cell highlighted in blue corresponds to the sample highlighted in white in the video window.
  • If you select several samples and choose to have one sample every n-th visualized, you also swap the body points in the selected range that are not visualized.
  • In the Swap Subjects window, select Swap All Samples to swap the subjects for the entire track length.

Prepare the Data in Multi-Subject Trials

Aim

To fix potential identity swaps after tracking multiple subjects with the Deep Learning body point detection technique.

This Topic Applies To

Experiments set as follows (see Experiment Settings):

  • Number of Subjects per Arena: 2.
  • Tracked Features: Center-point, nose-point and tail-base detection.
  • Body Point Detection Technique: Deep learning.

Background Information

When EthoVision XT tracks unmarked subjects, there is a chance that subject identity is swapped. This could occur for example when two subjects come into contact with each other. In the example below, the dotted line is the true trajectory of the two subjects. After the crossing, the subject orange is labeled as blue, and blue is labeled as orange.

To reduce or entirely remove identity swaps, when using Deep Learning, the software works in two steps:

  • Step 1 (Tracking) - The software finds and tracks the subjects' body points.
  • Step 2 (Data Set Preparation) - The software reviews the tracks and sorts them based on the visual differences between the subjects. This step is carried out after tracking, and automatically when you calculate or visualize the data. As a result, the occurrence of identity swaps is reduced.

Recognition of individuals is based on the differences in the appearance of the subjects' fur. For how to mark your subjects, see the recommendations in Deep Learning: Requirements.

Procedure

The Data Set Preparation is done automatically the first time that you calculate the statistics or visualize the tracks. You can also run this procedure manually in the Track Editor.

  1. Choose Acquisition > Edit Tracks.
  2. Select one trial from the list on the toolbar that is marked with (not yet prepared).
  3. Click Prepare Data.
  4. Wait until the trial name shows "(ready)". Depending on a few factors, including the length of the video and its resolution, this process may take some time.
  5. You can now edit the tracks or run analysis.

Error Messages

If for any reason the Data Set Preparation procedure fails for at least one trial or arena, the Data Preparation Report shows in which trial and arena that happened, and what the possible causes could be.

  • Not enough data points available to reliably train the network. This occurs if the trial was short, or the two animals were separated for too short a time. Another possibility is that the animals were separated, but at least one of them was curled up for a long time. In all those cases the software cannot create a high number of reliable images of the two subjects. In general, we recommend acquiring a trial of at least five minutes, at the maximum sample rate (25 samples/s or higher). Although the message may sound pessimistic, there are cases when the individual discrimination worked well. For example, when the visual difference between the two subjects is very clear, a relatively small number of video frames may still be sufficient to create a reliable network for individual discrimination. Check the identity labels of the two animals and edit the tracks when necessary.
  • No data points available to train the network. This could occur when tracking was very poor because of poor detection (e.g. not enough contrast, or presence of reflections) or because the two subjects were in contact for the entire duration of the trial. In such a situation there are no data points at all available for training the network; individual discrimination fails, no matter how long the trial lasted. We advise checking the lighting conditions, the contrast between the subjects and the background, and repeating the trial.
  • The subjects look too similar. This occurs when the two subjects are not marked and there is no significant difference in their visual appearance. Check the suggestions about marking animals in Deep Learning: Requirements > Individual Marking (for two-subject tracking).

Notes

  • The Data Set Preparation may take some time, depending on the length of the video and the power of the GPU.
  • The Data Set Preparation is not applied to trials where the subjects are tracked with the Contour-based technique for body point detection. For the difference between Contour-based and Deep Learning, see Body Point Detection Technique.
  • The trial where data preparation failed is still added to your results table. However, there may be significant identity swaps. There are two options:
    • Open the trial in the Track Editor and fix the identity swaps. See Swap Subjects.
    • Exclude the problematic trials in your Data Profile. See Filter Tracks.
  • Check that you have the latest version of the driver for the secondary graphics card, which does most of the work in deep learning-based tracking.

See Also

  • Advanced Detection Settings for Tracking Multiple Unmarked Subjects
  • Introduction to Editing Tracks
  • Swap Subjects
  • Deep Learning: Basics
  • Deep Learning: Requirements

Request a trial license

Try the software in your own lab before you buy. We offer trial periods for qualifying researchers.

Noldus is here to assist you throughout the whole process.

shopping_bag
check_circle

Thank you!

We'll get back to you shortly.

error

Please correct the following errors:

error

error

error

error

By clicking Submit, you consent to Noldus processing your data as described in our privacy policy.