# Behavior Recognition: Requirements

Species

▪The Behavior Recognition function has been developed and tested for tracking rats and mice, not other animal species.

Number of arenas

▪When tracking live: one arena.

▪When tracking from pre-recorded video files: one to four arenas.

Subjects

▪If you use multiple arenas, the subjects must have similar size. The apparent size of the subjects is specified in the Detection Settings. That size is used for all arenas.

▪The subject’s length (nose to tail base) in the video image must be at least 60 pixels for rats, and 55 pixels for mice. In all cases its length must not exceed half the arena size.

▪The subject’s fur must be of uniform color. Hooded animals like Lister and Long-Evans rats have not been tested with Behavior Recognition.

▪For rats: the subject must be older than approximately three weeks. In all cases the subject must be able to walk.

▪In the Detection Settings, make sure that the subject’s tail is not detected. To do so, use the erosion filter. See Advanced detection settings: Subject contour

▪Behavior detection is much depending on the subject age and size. For Wistar rats of age 3-5 weeks, the behavior size setting can be used about one week; from age 5 weeks on, it may be used two weeks. We advise to create separate Detection Settings for different age classes.

Camera and video

▪The camera is placed above the subject, and provides a top view of the test setup.

▪Because video compression introduces artifacts, live video is preferred over pre-recorded video.

▪Video frame size (video resolution) must be greater than 352 x 288 per arena.

▪The frame rate of the recorded videos can only be a multiple of the sample rate that you intend to use. For example, for a sample rate of 25 samples per second, the camera/video file frame rate should be 25 or 50 etc. For a sample rate of 30, set the frame rate to 30 or 60.

▪The video image must not be overexposed. Details of the subject’s fur must be visible.

▪If you use pre-recorded video, compression should be as lossless as possible. Reducing compression by decreasing the GOP size (that is, the number of video frames between two full frames) produces better results than increasing video resolution. Values of GOP size of 10-15 worked well, however the lower the better. Reducing GOP size, however, increases file size.

▪To check that your video file has artifacts, create a separate experiment with Activity analysis enabled. Set the Activity threshold to a minimum. See Activity settings. If video contains artifacts, you should see purple pixels appearing with a regular rhythm. See also Troubleshooting: Behavior recognition

▪Try to avoid evident fish eye-effect (barrel distortion) in the video image, which hampers behavior recognition. If necessary, use a lens with lower distortion.

Test environment

▪The test setup must be simple, for example a home cage (without bars) or an open field with no objects around.

▪The animal should not climb on top of objects like a shelter. When the animal climbs on top of an object, it gets closer to the camera, and its apparent size changes significantly. This may bias results. See also Behavior Recognition: Data, performance and accuracy

▪Lighting must be from the top, not backlighting. Slow changes in lighting in the course of the test are not a problem, but moving spotlights reduce reliability of detection.

▪Avoid reflections on the walls.

Tracking settings

▪In the Experiment Settings, you must select Contour-based as Body Point Detection Technique.

▪In the Detection Settings, the sample rate must be set between 25 and 31 samples per second.

Further recommendations

▪During acquisition, keep DDS (Detection Determines Speed) selected.

▪After acquiring data, visualize the detected behaviors in the Integrated Visualization and check whether no gaps between scored behaviors occur. If gaps occur, which are not due to the fact that the subject is not found, they could be the result of video frames not being analyzed due to high processor load. To decrease processor load, lower the video resolution. Also, try not to use Differencing as detection method, and any of the methods named For occlusions as the tracking method. See Advanced detection settings: Method