The current study aimed to automate the quantification of motor deficits in rats. The initial evaluation model assesses motor loss resulting from an intracortical microelectrode implantation in the motor cortex. We report on the development and use of a tracking algorithm using easily adaptable, simple, and readily available coding software.
We have recently demonstrated that implanting intracortical microelectrodes in the motor corteces of rats results in immediate and lasting motor deficits. Motor impairments were manually quantified through an open field grid test to measure the gross motor function and through a ladder test to measure the fine motor function. Here, we discuss a technique for the automated quantification of the video-recorded tests using our custom Capadona Behavioral Video Analysis System: Grid and Ladder Test, or BVAS. Leveraging simple and readily available coding software (see the Table of Materials), this program allows for the tracking of a single animal on both the open field grid and the ladder tests. In open field grid tracking, the code thresholds the video for intensity, tracks the position of the rat over the 3 min duration of the grid test, and analyzes the path. It then computes and returns measurements for the total distance traveled, the maximum velocity achieved, the number of left- and right-handed turns, and the total number of grid lines crossed by the rat. In ladder tracking, the code again thresholds the video for intensity, tracks the movement of the rat across the ladder, and returns calculated measurements including the time it took the rat to cross the ladder, the number of paw slips occurring below the plane of the ladder rungs, and the incidence of failures due to stagnation or reversals. We envision that the BVAS developed here can be employed for the analysis of motor function in a variety of applications, including many injury or disease models.
There are many established methods to assess both functional and behavioral motor and cognitive impairments1,2,3. Some of the more commonly employed methods include testing fine motor function via paw placement, stepping, and limb coordination on a ladder test4, testing gross motor function and stress behavior via the open field grid test5,6, and testing for fear, depression, and despair via the forced swim test7,8 or rotor rod9. However, many of these methods rely on human researchers to "score" the animal or to judge its performance subjectively. The need for a subjective human assessment can slow the generation and analysis of the data, as well as present the opportunity for an intentional or unintentional influence of research bias in the study10. Further, subjective assessment of the data also presents the risk of inaccurate data representation, be it through forgetfulness, poor motivation, improper training, or negligence11.
We have recently reported the use of both an open field grid test and a ladder test in rats implanted with intracortical microelectrodes12,13. Due to the novelty of the findings in those studies, we immediately began employing those and additional functional testing in many ongoing studies in the laboratory. In anticipation of unintentional human-generated variability resulting from an increase in the number of subjective evaluators, and to improve the analysis throughput, we set out to create an automated, computer-assisted program to score behavioral testing, and greatly limit the potential for error.
Here, we report on the development of the BVAS. The BVAS uses computer analysis to score an open field grid test and a ladder test as metrics of gross and fine motor function, respectively. The results can be used to elucidate possible motor function deficits caused by injury or disease, regardless of the injury or disease model. The analysis codes can be adapted to account for changes in behavioral testing equipment or to score various metrics of motor function. Therefore, the BVAS can be implemented in many applications, beyond our intended use or the intended use of those currently employed by other laboratories.
Note that the open field grid and ladder tests require video recording. Therefore, each test will require a video camera [1080 p, minimum 15 frames per second (fps)], a laptop, and a room to store the video data. For both tests, place the camera in a centered position, allowing for the whole apparatus to be seen on the frame. Anchor the camera on a tripod or scaffolding so that it does not move during the testing. Keep the edges of the video frame as close to parallel with the edges of the testing apparatus as possible. Be sure the same personnel complete all testing and the room is well-lit with a temperature-controlled system. Use the same room for all animals throughout the course of the testing, with minimal changes to the room. Cereals or banana chips make good rewards to encourage the animals to complete the behavior tests.
All procedures and animal care practices were approved by and performed in accordance with the Louis Stokes Cleveland Department of Veterans Affairs Medical Center Institutional Animal Care and Use Committee. The behavioral testing protocol closely follows previously published work12,13.
1. Behavioral Testing: Filming the Tasks
NOTE: Here, the animals were tested for 8 weeks to detect any chronic behavioral changes. The study duration is dependent on the application/injury/disease model used for the study.
2. File Storage and Naming
NOTE: The BVAS code uses specifically designated video file and folder naming conventions so that videos may be reliably parsed and analyzed properly. Different naming conventions are currently not supported. After the completion of a testing session, the video file is saved in the default location under a default name.
3. System Installation
NOTE: The BVAS was built and tested on PC operating systems and leverages Runtime components from simple and readily available coding software. Other system configurations are currently not supported.
4. System Use
5. Output Data Analysis
Following the methods presented here, rats completed the open field grid and ladder tests 2x per week. The data were analyzed both by using BVAS and manually with a stop-watch by trained and novice reviewers. The results presented are an average of the raw weekly scores from a single non-implanted control animal over an 8 week study, where week "0" corresponds to the baseline testing. Note there was no testing during week 1 as this was a rest week for the surgery animals. Because the open field grid is tested 1x per day, the ladder is tested 5x per day, and there are two testing days per week, there is a sample of 16 trials for open field grid whereas there are 80 trials for the ladder test in the same 8 week time period.
BVAS vs. manual analysis:
To confirm the consistency of the BVAS system and validate it against manual analysis, the results for grid lines crossed and ladder crossing time were compared to the manual results from three expert reviewers (n = 3) as a "gold standard." Novice users (n = 7) also reviewed the data both manually and using the BVAS. For the validation, each reviewer examined the same one day of experiments for one animal (grid testing = one video/trial; ladder testing = five independent trials). The results for the open field grid test showed that expert reviewers were more consistent than novice reviewers were (a variance of 0 versus a variance of 17.1, respectively), but when using the BVAS, there was zero variance for both expert and novice users (Figure 4A). Similarly, the results for the ladder test showed that expert reviewers were more consistent than novice reviewers were (~3.5x larger: a variance of 0.120 versus a variance of 0.414, respectively), but when using the BVAS, there was again zero variance for both expert and novice users (Figure 4B).
Therefore, where possible, behavior metrics for both the open field grid and ladder test were quantified manually by the same expert user and compared to the results generated using the BVAS. Here, the results from all included animals throughout the duration of the experiments were evaluated. All error is reported as a standard error of the mean (SEM) unless reported otherwise. The difference between the two methods ranged from an average of 0.64 ± 0.06 s for the ladder test and 3.56 ± 0.53 lines for the grid test. The average difference for the open field grid test over the course of 8 weeks between the two methods was 11.13 ± 3.03%. The average difference for the ladder test over the course of 8 weeks between the two methods was 9.05 ± 1.07%. The percent difference between the two methods was calculated following Equation 1.
Equation 1:
Note also for the ladder test timing, the manual data collection is only precise to 1 s (which can change based on the device used to keep time), while the BVAS is precise to the inverse of the frame rate of the video being reviewed. For example, if the video is filmed at 15 frames per second, the BVAS data is precise to 1/15th of a second.
Open field grid test:
Following previously published protocols12,13, animals were allowed to run freely in an open field grid test for 3 min to measure their gross motor function and stress behavior. The video recorded during the testing was analyzed using the BVAS to quantify the raw scores for the maximum velocity, the total distance, the number of gridlines crossed, and the percentage of right turns achieved by the animal (Figure 5). While this data is only representative of one animal, trends were seen over the course of the study of increased maximum velocity achieved, increased total distance traveled, and an increased number of gridlines crossed. Unsurprisingly, when compared to each other, the total distance traveled, and the total gridlines crossed had a strong positive correlation. Comparing the manual quantification to the BVAS gridline quantification revealed comparable results (Figure 5C). For this particular animal, the percentage of right turns largely hovered between 40% and 50% (Figure 5D). Of note, the metrics for the total distance traveled, maximum velocity, and turn direction were unable to be quantified manually, and represent another added feature of the automated BVAS program.
Ladder test:
As previously reported4,14, the ladder testing was completed to measure the coordinated grasp and fine motor function. The video recorded during the testing was analyzed using the BVAS to quantify the raw scores for the time to cross and the number of paw slips (Figure 6).In this animal, there was a decreasing trend in the time to cross the ladder, followed by an increase in time starting around week 4. Comparing the manual quantification to the BVAS crossing time quantification revealed comparable results (Figure 6A). As the animal presented was a non-surgical control, paw slips were infrequent, and comparable in number between the left and right paw (Figure 6B).
Figure 1: Example of open field grid test results. (A) This panel shows the behavioral testing 1 m2 open testing area with a black background and pink grid lines. (B) This is an example of a plot of a single animal's 3-min grid run. This animal made one circuit of the grid and then remained mostly stationary for the remainder of the time. The red O's and X's denote where the turn detection algorithm detected a left (O) or a right (X) turn. (C) This is a second example of a plot of a single animal's 3-min grid run. This animal was extremely active for the entire 3-min testing period. The red O's and X's denote where the turn detection algorithm detected a left (O) or a right (X) turn. (D) This is an example of the output in the data file for the two runs seen in panels B and C. Please click here to view a larger version of this figure.
Figure 2: Example of a ladder data reviewer screen. (A) This panel shows the ladder data reviewer screen, complete with a screenshot demonstrating the ladder test set-up. This screen is where the user will confirm detected slips and failures. This example shows a positively detected right front paw slip. (B) This is an example of the output in the data file for the ladder run that was examined in panel A. Please click here to view a larger version of this figure.
Figure 3: Example of BVAS analysis screens. (A) This panel shows the top menu of the BVAS. Note the four buttons along the bottom and the Email Settings drop-down menu in the top left corner. (B) This is an example of a file selection screen, in this case for the ladder video analysis. (C) This is an example of a debug analysis viewer for a grid test video. This demonstrates the detection algorithm during the analysis of a grid test. (D) This panel shows an example of a debug analysis viewer for a ladder test video. This demonstrates the detection algorithm during the analysis of a ladder test. Please click here to view a larger version of this figure.
Figure 4: Example of expert and novice testing results. These panels show the results of a manual and a BVAS expert and novice testing for (A) the number of gridlines crossed on the open field grid test and (B) the time to cross on the ladder test. For both tests, the results showed that expert users had a lower variance than the novice users for the manual analysis, while using the BVAS resulted in zero variance, regardless of the user expertise. The standard deviation is reported. Please click here to view a larger version of this figure.
Figure 5: Representative open field grid test results. These panels show representative open field grid test results for a non-implanted control animal for (A) the maximum velocity achieved, (B) the total distance traveled, (C) the total number of gridlines crossed, and (D) the percentage of right turns made by the animal. Please click here to view a larger version of this figure.
Figure 6: Representative ladder test results. These panels show representative ladder test results for a non-implanted control animal for (A) the time to cross the ladder, and (B) the number of right- and left-front-paw slips. Please click here to view a larger version of this figure.
The most critical portion of the protocol to ensure a strong analysis is the consistent filming. If the videos are well lit and filmed at the correct position as discussed in the first section of the protocol, the system will be able to do a precise analysis. As with any image-processing problem, the work done in preprocessing will make the post-processing more accurate and simple. As such, making sure that the apparatus and animals are well-lit during the testing and any shadows or other motion in the frame is kept to a minimum will mean the BVAS can function at a higher level of accuracy.
The protocol presented here can be used to efficiently and reproducibly analyze results from both gross and fine motor function testing in rodents via an open field grid and a ladder test. Additionally, it reduces the possibility of human error or bias in the analysis process as the data analysis is largely completed by the self-functioning computer without any user input. Because of this feature, the BVAS system can be used with the same level of accuracy by both expert and novice users. The BVAS program is self-checking, easy to implement, and inexpensive to use. Further, the code can be adapted to fit a researcher's individual needs. For example, the open field grid code can be used to analyze a variety of metrics including the total distance traveled, the maximum speed achieved, and the number of left and right turns, and could likely be easily modified for the tracking in a water maze or forced swim task. Additional modifications can be made to the code to account for varying room lighting, differences in grid and ladder line color, and differences in animal color. Although the testing apparatus and the BVAS code presented here were designed for their use in rat studies, we expect that either could be scaled up or down to be used with various sized animals, although this has not been verified to date.
As with all behavior testing and data analysis, it is important to maintain as much consistency as possible throughout the study and subsequent analyses. Although the presented BVAS greatly reduces any reliance on human input for the data analysis, human variance can come into play with the researcher working with the animals and handling the procedures15. Furthermore, changes in the testing location16 or housing and husbandry conditions17 can also influence the results. While the BVAS can be updated to account for lighting and camera angle, factors such as smells, personnel, or diet can only be accounted for at the time of the study. Therefore, researchers should take caution to remain as consistent as possible in the animal testing and housing conditions, testing personnel, and analytical methods, among others.
The BVAS is novel because of its compound detection system. Each frame of the video is passed through multiple image filters to create binary masks all calibrated to look for the rat in the frame. Each possible rat shape is then rated by the system on its likelihood of being the rat. This rating factors in size, the number of filters the shape is detected on, and the last known location and the predicted location of the animal based on the previous trajectory. This makes for a strong animal detection that can overcome most issues that arise based on shadows and changes in the lighting. Unlike current commercially available animal tracking systems, this method does not require any modifications to the animal to make it more visible and uses a single standard-speed webcam for the video recording. The BVAS system is also an improvement over conventional manually quantified behavior testing because all the metrics that are outputted are objectively measured from the videos. A human quantified behavioral study will have some subjectivity in nature as the researcher decides what constitutes a paw slip or grid line cross.
The system requires a somewhat specific setup to work to its fullest capabilities. While it is possible to adapt the system to changes in the apparatus, it would currently require some fluency in computer coding to edit the code. With some coding fluency, troubleshooting is made easy because the error notice emails include a full error information readout. If the videos fed into the system are not at the ideal resolution or frame rate (1080 p, 15 fps), the user is alerted via a warning message. This change will affect the accuracy of the system, but it still can run on lower resolution videos. Any lighting or shadow problems that cause an error during the analysis will lead to a dynamic error message sent to the user-entered email. The user can then use the debug viewer to watch the frame by frame analysis to understand what issue arose. The error message also includes an error report, so if it is a coding issue, it can be addressed simply.
In the future, the BVAS system may be able to be further adapted without any knowledge of the syntax from coding software. The addition of a tracking options menu could allow the user to select the color of the animal and grid lines simply and conveniently. The ladder test tracking will also increase in accuracy with the possible addition of a cascade object detector in the code and a better ladder lighting rig to accompany the ladder test and filming apparatus. Therefore, we expect that the BVAS system described here can be readily implemented into an array of behavioral and motor function tasks spanning a wide variety of disease and injury models.
The authors have nothing to disclose.
This study was supported by the Merit Review Award # B1495-R (to Jeffrey R. Capadona) and the Presidential Early Career Award for Scientist and Engineers (PECASE) (to Jeffrey R. Capadona) from the United States Department of Veterans Affairs Rehabilitation Research and Development Service. Additionally, this work was supported in part by the Office of the Assistant Secretary of Defense for Health Affairs through the Peer Reviewed Medical Research Program under Award No. W81XWH-15-1-0608. The authors acknowledge SOURCE for its summer research funding support. The contents do not represent the views of the United States Department of Veterans Affairs or the United States Government. The authors would like to thank Hiroyuki Arakawa in the CWRU Rodent Behavior Core for his guidance in designing and testing rodent behavioral protocols. The authors would also like to thank James Drake and Kevin Talbot from the CWRU Department of Mechanical and Aerospace Engineering for their help in designing and manufacturing the rodent ladder test.
Sprague Dawley rats, male, 201-225g | Charles River | CD | |
Webcam HD Pro c920 | Logitec | 960-000764 | |
Excel | Microsoft | N/A | |
Matalb 2017a, Computer Vision System Toolbox | Mathworks | N/A | |
Open field grid test | Made in-house at Case Western Reserve University | N/A | |
Ladder test | Made in-house at Case Western Reserve University | N/A |