Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
. 2021 Jan 12;11(1):658.
doi: 10.1038/s41598-020-79965-w.

Automated detection of mouse scratching behaviour using convolutional recurrent neural network

Affiliations

Automated detection of mouse scratching behaviour using convolutional recurrent neural network

Koji Kobayashi et al. Sci Rep. .

Abstract

Scratching is one of the most important behaviours in experimental animals because it can reflect itching and/or psychological stress. Here, we aimed to establish a novel method to detect scratching using deep neural network. Scratching was elicited by injecting a chemical pruritogen lysophosphatidic acid to the back of a mouse, and behaviour was recorded using a standard handy camera. Images showing differences between two consecutive frames in each video were generated, and each frame was manually labelled as showing scratching behaviour or not. Next, a convolutional recurrent neural network (CRNN), composed of sequential convolution, recurrent, and fully connected blocks, was constructed. The CRNN was trained using the manually labelled images and then evaluated for accuracy using a first-look dataset. Sensitivity and positive predictive rates reached 81.6% and 87.9%, respectively. The predicted number and durations of scratching events correlated with those of the human observation. The trained CRNN could also successfully detect scratching in the hapten-induced atopic dermatitis mouse model (sensitivity, 94.8%; positive predictive rate, 82.1%). In conclusion, we established a novel scratching detection method using CRNN and showed that it can be used to study disease models.

PubMed Disclaimer

Conflict of interest statement

The authors declare no competing interests.

Figures

Figure 1
Figure 1
Image pre-processing and integration. (a) Video file was divided into the images of each frame. The absolute difference of each pixel between two continuous frames was calculated and cropped in a square shape (300 × 300 pixel) around the geometric centre of mouse. Images were then grey-scaled and binarized. (b) For segment at time t, the pre-processed images from t − 10 to t + 10 was collected and labelled with the value of frame label at time t. The figure shows segment at t − 1 (including images from − 11 to t + 9, labelled as “0”), segment at t (including images from t − 10 to t + 10, labelled as “1”), and segment at t + 1 (including images from t − 9 to t + 11, labelled as “1”).
Figure 2
Figure 2
CRNN architecture and training. (a) The architecture of CRNN. The images in one segment was separately input into CNN block. The output was flattened and integrated in RNN block and in full connected block. The detailed shapes of output tensor from each layer were shown in Supplementary Table S4. CV convolution, MP maxpooling, LSTM long short-term memory, FC fully connected. (b) The change of loss value during training.
Figure 3
Figure 3
The result of CRNN training. (a) The example of CRNN output interpretation. A segment whose CRNN output was more than 0.5 was classified as scratching segment. (b) The number of true positive/negative segments and false positive/negative segments in the training dataset. (c) The number of true positive/negative segments and false positive/negative segments in the test dataset. (d) The comparison of scratching counts in each video file between prediction and observation in the training dataset. (e) The comparison of duration time of each scratching event between prediction and observation in the training dataset. (f) The comparison of scratching counts in each video file between prediction and observation in the test dataset. (g) The comparison of duration time of each scratching event between prediction and observation in the test dataset. Significantly deviated event was indicated as arrow (see Fig. 4d). The dotted lines indicate the line when prediction was equal to observation.
Figure 4
Figure 4
The detailed investigation of error segments. (a) Three error types. Black boxes indicate scratching segment in prediction or observation. Grey boxes indicate error segment. (b) The number of three errors in the training dataset. (c) The number of three errors in the test dataset. (d) Detailed investigation of the significantly deviated scratching event (indicated by arrow in Fig. 3g). (e) The representative data of grooming and scratching. Black boxes indicate grooming or scratching segment.
Figure 5
Figure 5
Application to DNFB-induced dermatitis model. (a) The number of true positive/negative segments and false positive/negative segments of DNFB-treated mouse video files. (b) The number of three errors. (c) The comparison of scratching counts in each video file between prediction and observation. (d) The comparison of duration time of each scratching event between prediction and observation. The dotted lines indicate the line when prediction was equal to observation.

Similar articles

Cited by

References

    1. Bains RS, et al. Assessing mouse behaviour throughout the light/dark cycle using automated in-cage analysis tools. J. Neurosci. Methods. 2018;300:37–47. doi: 10.1016/j.jneumeth.2017.04.014. - DOI - PMC - PubMed
    1. Yin ZY, et al. Antinociceptive effects of dehydrocorydaline in mouse models of inflammatory pain involve the opioid receptor and inflammatory cytokines. Sci. Rep. 2016;6:1–9. doi: 10.1038/s41598-016-0001-8. - DOI - PMC - PubMed
    1. Ennaceur A. Tests of unconditioned anxiety—pitfalls and disappointments. Physiol. Behav. 2014;135:55–71. doi: 10.1016/j.physbeh.2014.05.032. - DOI - PubMed
    1. Inagaki N, et al. Involvement of unique mechanisms in the induction of scratching behavior in BALB/c mice by compound 48/80. Eur. J. Pharmacol. 2002;448:175–183. doi: 10.1016/S0014-2999(02)01933-7. - DOI - PubMed
    1. Inagaki N, et al. Evaluation and characterization of mouse scratching behavior by a new apparatus, MicroAct. Skin Pharmacol. Appl. Skin Physiol. 2003;16:165–175. doi: 10.1159/000069755. - DOI - PubMed

Publication types