Improving Nose-Tail tracking in EthoVision XT

Knowledge Base Search

MyNoldus Knowledge Base Related to EthoVision XT Improving Nose-Tail tracking in EthoVision XT

How Nose-Tail Tracking Works

EthoVision XT can use two different methods to track the nose and tail:

  • Contour-based detection looks at the outline of the area detected as the animal to find the correct shape of the nose and tail.
  • Deep learning uses a trained neural network model to identify the nose and tail of a mouse or rat. This method, available in EthoVision XT 16 and up, uses the image of the animal and can accurately place the nose and tail even outside the yellow detected area of the animal. Deep learning requires a suitable NVIDIA GPU; if that is not present, contour-based detection is required. When deep learning is available and you are working with rodents, it will generally give the best results.

Contour-Based Detection

When using contour-based detection, it's important to adjust the detection settings so that the yellow area (which indicates everything detected as the animal) corresponds as closely as possible to the real outline of the animal, since the outline is being used to identify the points.

In the Detection Settings, under the method there is a pulldown selection of the algorithm to identify the nose and tail points. The options are:

  • Any species / Default: A general method suitable for many animals. If tracking rodents, ensure the tail is detected. (Previously called "Shape-Based / Default" in XT 14 and earlier.)
  • Rodents / Default: Fits a model rodent shape to the detected outline. It is more robust because it doesn't require the nose and tail to be visible. Useful for open field, water maze, or novel object tests. (Previously "Simple Model / Rodents".)
  • Rodents / For Occlusions: Better for cases where parts of the animal may be occluded. More computationally demanding. Works best without tail tracking (adjust using Erosion and Dilation settings). (Previously "Advanced Model / Rodents".)
  • Adult Fish / For Occlusions: Designed for adult zebrafish and similar species when viewed from above. Ensure the entire body including the tail is detected. (Previously "Advanced Model / Adult Fish".)
  • Other Species / For Occlusions: May work better for other animals or fish viewed from the side. (Previously "Advanced Model / Other".)

Optimizing the "Rodents / For Occlusion" method

When using the "Advanced Model / Rodents" method, you can improve results by specifying the animal's size:

  • In Detection Settings, first optimize the yellow detection area to match the actual body outline.
  • Click the Advanced button next to Subject Size.
  • In the "Modeled Subject Size" panel, check the value under Current Pixels. Click Grab to copy it to Average Pixels, or enter the value manually.
  • Check the box under Fix to lock the average size.

This often improves tracking accuracy. If tracking multiple animals and they are sometimes merged into one when in contact, lowering the Average Pixels value may help.

Deep Learning

Deep learning works best when the animal’s outline is clearly visible throughout the arena. Uniform lighting and a minimum animal size of 30 pixels in length are recommended.

There are two specific settings for deep learning in the Detection Settings:

  • Hooded rats: Check this box if your animals are black and white rather than a single color.
  • Define (Cutout size): Click this to adjust the yellow box surrounding the animal. The box should extend 0.5–1 body length beyond the animal (excluding the tail). You can use the Automated button or adjust the slider manually.

General Advice

If center, nose, and tail tracking are generally accurate but with frequent swaps, try the following:

  • Ensure the arena is large enough to contain the animal even when rearing, but not so large that extraneous elements are detected. The animal’s nose must remain within the arena boundary.
  • Address reflections on the side walls by lightly sanding them to reduce shininess if EthoVision is mistaking reflections for animal outlines.
  • Adjust contrast to detect the entire animal. Avoid overly high contrast that detects only the center and misses edges.
  • Use even, indirect, diffuse lighting. Shadows or uneven lighting can cause detection issues. Refer to the EthoVision manual for lighting placement tips.
  • Increasing aperture (camera diaphragm) may enhance contrast without increasing light intensity.
  • Use the maximum sample rate (25–30 samples/sec) to improve nose-tail tracking resolution.
  • For better tracking, especially under high system load, consider 2-stage tracking: acquire video first, then retrack from that video. Use the "Detection Determines Speed" option for video tracking.