# Adjust the settings for nose-tail base detection (Deep learning)

Aim

To achieve detection of the nose- and tail-base points of your subjects using the Deep learning method.

This topic applies to tracking of one subject per arena. If you track two or more subjects per arena with Deep learning, you do need to adjust settings besides the sample rate.

Prerequisites

▪In the Experiment Settings:

▪Under Subjects, 1 is selected.

▪Under Tracked Features, Center-point, nose-point and tail-base detection is selected.

▪Under Body point detection technique, Deep learning is selected.

▪You optimized the lighting and the background based on Deep learning: Requirements.

Procedure

1.Open the Detection Settings.

2.In the Video section (top-right), select the video file (if you track offline) and choose the sample rate. See Video file, image quality and sample rate

3.Under Advanced > Method, choose the detection method and the contrast range. See Advanced detection settings: Method

4.In the Detection Settings window, under Detection, click the Automated Setup button and follow the instructions. When the Automated Setup gives good detection, proceed with the next step. See Detection settings: Automated setup

5.Play the video or wait until the subject in the live image is located (a) far from walls and other objects (especially when the walls and objects provide little or no contrast with the subject), (b) its body is not curled or contracted, and (c) its nose is visible.

tip For best results, position the video on a frame where the animal is slightly stretched.

6.If you work with hooded animals, like the Lister rats, or the Long-Evans rats, under Method, next to Deep learning settings, select Hooded rats.

7.Under Method, next to Deep learning settings, click the Define button.

The Cutout window opens. EthoVision XT shows a square box around the subject.

The size of this box should already be optimized based on the detected subject. The Cutout box should include the whole subject’s body leaving some space around it.

8.If that is not the case, click Automated.

9.Click OK.

10.The Video window now shows the subjects with its nose and tail-base highlighted (nose = light blue).

11.If the nose and tail base are not detected sufficiently well, click Define again and move the slider until the box includes the entire body of the subject. See the suggestions below.

▪The tail of the rodent does not have to be included.

▪important Keep some space between the subject and the outline of the Cutout box.

Notes

▪To improve detection, see also Deep learning: Requirements

▪The Cutout box size is saved in the Detection Settings. The next time you click Define, the Cutout dialog shows last saved value.

▪Which value for the Cutout box size? The Cutout value is shown for reference. Do not focus on a specific value, because other, similar values may work fine (for example, 135 and 137). However, take note of that value if you know that it works, so you can use it in the next experiment assuming that you use the same camera distance, arena size, etc.

As a rule of thumb, the Cutout box should include the animal also when it is stretched. Make sure that the box includes some space around the animal, at least half the body length.

▪Small animals. With small animals, the Cutout box can quickly become too small or too big. Adjust the Cutout value by small steps, until the nose and tail-base points are detected correctly.

▪Occlusions. When the subject image is obstructed by e.g. a door, increase the Cutout box size, so that the nose or tail can be found on the other side of the obstruction. This usually improves the detection.

▪Reflections. If there are reflections at the wall of the apparatus, and these give problems with detection of the nose point try to reduce the size of the Cutout box. See an example in Troubleshooting: The detected nose point is far from the animal’s contour

▪Multiple arenas. When you work with two or more arenas, the Cutout box is displayed only in the last arena. Adjust its size as described above.

Examples of a good Cutout box size

▪Subject in an open field

In the first picture below, detection won’t work because the rat’s nose is outside the box. In the second picture, detection may work but a large Cutout size increases the risk that other objects are included that are of similar color as the rat.

note In this example, the subject is near the wall of the open field. Although that should be avoided, in this case there are no reflections and the walls are as dark as the floor; therefore, the contrast is good. This makes it possible to use an image when the subject is near the walls.

▪Subject in a corridor or a T- / Y-maze

See also

▪Deep learning: Requirements

▪The chapter Methods Settings in the EthoVision XT Video Tutorial