A device and method for collecting characteristics of mouse scratching behavior
By combining automated image recognition and deep learning algorithms with ST-GCN and Transformer models, the problem of low efficiency in traditional mouse scratching behavior detection is solved, efficient and accurate behavioral feature collection is achieved, large-scale experiments are supported, and the experimental environment and result consistency are optimized.
Patent Information
- Application Number
- CN202510202929.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-24
- Publication Date
- 2025-09-09
- Estimated Expiration
- 2045-02-24
AI Technical Summary
Traditional mouse scratching behavior detection relies on manual observation, which leads to low efficiency, high labor consumption and inconsistent results, making it difficult to achieve large-scale gene or drug screening.
Using automated image recognition technology and deep learning algorithms, combined with ST-GCN and Transformer models, a device and method for collecting mouse scratching behavior characteristics were designed. Video data was collected through a camera, an adjacency matrix was constructed, and spatiotemporal graph convolution and time series processing were performed. The model was optimized by combining self-supervised and weakly supervised learning.
It improves detection efficiency and data accuracy, reduces manpower requirements, supports large-scale gene or drug screening, optimizes the experimental environment, and ensures consistency and accuracy of results.
Smart Images

Figure CN120036251B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a device and method for collecting characteristics of mouse scratching behavior, and belongs to the field of animal experiments. Background Art
[0002] As the most commonly used model animal for itch research and antipruritic drug development, quantifying the scratching behavior of mice is crucial for assessing itch intensity. Traditionally, scratching behavior in mice has been quantified by manual counting, a labor-intensive method that limits the ability to conduct large-scale genetic or drug screening.
[0003] Traditional itch research often has significant limitations. It requires researchers to watch and record videos for extended periods of time, which is extremely labor-intensive. Different researchers may interpret scratching behavior in the same video differently, leading to inconsistent results. Furthermore, the specific characteristics of individual scratching behaviors, such as intensity or duration, are difficult to accurately measure. Summary of the Invention
[0004] To address the inaccurate results of traditional manual observation methods for detecting mouse scratching behavior, this invention provides a device and method for collecting mouse scratching behavior characteristics. By incorporating automated image recognition technology and deep learning algorithms, this method improves efficiency, shortens experimental cycles, reduces human resource requirements, and enables large-scale gene or drug screening.
[0005] In one aspect, the present invention provides a device for collecting characteristics of mouse scratching behavior, comprising a cover plate 1, a column 2, a base plate 3 and a camera;
[0006] The column 2 is a cylindrical structure with upper and lower openings. The upper end of the column 2 is threadedly connected to the lower end opening of the cover 1, and a transparent circular acrylic plate 201 is provided at the connection. The transparent circular acrylic plate 201 and the cover 1 form a mouse accommodation space.
[0007] The lower end of the column 2 is threadedly connected to the upper end of the base plate 3. A camera for collecting the scratching behavior characteristics of mice is installed on the base plate 3. The space enclosed by the column 2 and the base plate 3 serves as the camera observation and adjustment space.
[0008] Preferably, the cover 1 includes a cover column body 102 and a top plate, and a plurality of small circular holes 101 on the top of the cover are dispersedly arranged on the top plate to provide air and light for the mouse accommodation space; the lower end opening of the cover column body 102 is provided with a cover and column connecting groove 103, which is used to cooperate with the connecting groove of the upper port of the column 2 for threaded connection and fixation of the transparent circular acrylic plate 201.
[0009] Preferably, the column 2 includes a column body 203, the upper and lower ends of the column body 203 are both provided with connecting grooves, and the upper end of the column body 203 has a notch as a semicircular light-transmitting opening 202 for providing air and light for the mouse accommodation space.
[0010] Preferably, the base plate 3 includes a base plate column body 304 and a bottom end plate, and a camera placement groove 302 is provided on the upper surface of the bottom end plate, and the camera placement groove 302 is used to install the camera, and a rectangular wire entry groove 303 is provided on the base plate column body 304, and the camera USB cable passes through the rectangular wire entry groove 303 to connect to the external device; the upper end opening of the base plate column body 304 is provided with a base plate and column connection groove 301, which is used to cooperate with the connection groove of the lower port of the main column 2 for threaded connection.
[0011] In another aspect, the present invention provides a method for collecting characteristics of mouse scratching behavior. The method for collecting characteristics of mouse scratching behavior uses a hybrid model of the ST-GCN model + the Transformer model for prediction. The hybrid model includes:
[0012] In the step A of constructing the adjacency matrix, the camera captures the mouse video, defines the mouse's head, back, limbs, and tail in the video frame as nodes in the graph, and extracts the position coordinates of each node. Then, the connection relationship between the nodes is determined based on the posture estimation, and the adjacency matrix A is constructed.
[0013] The design steps of the spatiotemporal graph convolution layer are to use graph convolution operations to encode the spatial relationship between different nodes at the same time point; input the adjacency matrix A into the ST-GCN layer and output the node feature matrix H at the t+1 time step. (t+1) ;
[0014] Time series processing step, node feature matrix H at time step t+1 (t+1) Input to the Transformer encoder for time series processing;
[0015] The results of the ST-GCN layer and the Transformer encoder are fused and the final prediction result is obtained through the fully connected layer.
[0016] Preferably, the ST-GCN layer outputs the node feature matrix H at the t+1 time step (t+1) for:
[0017]
[0018] Among them, coal() is the ReLU activation function;
[0019] H (t) Represents the node feature matrix at the tth time step;
[0020] A is the adjacency matrix, Aij Represents the elements of the adjacency matrix A, i, j represent nodes;
[0021] is the adjacency matrix after adding the self-loop, Represents the adjacency matrix after adding the self-loop Elements, I N Represents an N×N identity matrix;
[0022] is the degree matrix, is the degree matrix element;
[0023] W (GCN) is a trainable weight matrix.
[0024] Preferably, the Transformer encoder uses a multi-head attention mechanism for time series processing and outputs MultiHead(Q, K, V):
[0025] MultiHead(Q,K,V)=Concat(head1,...,head h )W o
[0026] Among them, the three matrices Q, K, and V are:
[0027] Q=H (t) W Q , K=H (t) W K , V=H (t) W V
[0028] W Q , W K , W V is a trainable projection matrix;
[0029] head1, ..., head h Indicates the 1st to hth heads; the mth head m Get it as follows:
[0030]
[0031] is the projection matrix of the mth head, m = 1, 2, …, h;
[0032] W o is the weight matrix of the output linear transformation, d k is the dimension of the key vector.
[0033] Preferably, residual connections and layer normalization are added after each layer.
[0034] Preferably, absolute position encoding is introduced to give the model cognition of sequence position, and its formula is as follows:
[0035] When the number is even, the position is
[0036] When odd, the position is
[0037] Where pos is the position index, d model is the characteristic dimension of the model.
[0038] Preferably, the model is trained by combining self-supervision and weak supervision. In the pre-training stage, a large amount of unlabeled single-view video data is used for self-supervised learning to enhance the feature representation ability of the model. Then, a small amount of labeled data is introduced for weakly supervised learning, pseudo labels are used to further optimize the model performance, and consistency regularization technology is applied to ensure the consistency of the model output.
[0039] Beneficial effects of the present invention: The present invention provides a feature acquisition device for detecting mouse scratching behavior, which aims to significantly improve the research methods of mouse scratching behavior through automation and intelligent means. Specific advantages include the following:
[0040] 1. Improved data accuracy and research efficiency: By introducing automated image recognition and deep learning algorithms, we avoid the subjective errors of manual counting and ensure the objectivity and consistency of experimental data. High-resolution cameras enable long-term monitoring without affecting the natural behavior of mice, ensuring the authenticity and reliability of data. Fully automated video recording and data analysis significantly reduces the workload of researchers, supports large-scale gene or drug screening, and accelerates experimental progress.
[0041] 2. Optimize the experimental environment and reduce animal stress: The device design simulates natural conditions, reduces stress on mice, maintains their natural behavior patterns, and improves the validity of observations. The compact and rational structure provides a spacious and safe activity space, ensuring clear recording of mouse behavior.
[0042] 3. Advanced Algorithm Combination and Enhanced Model Performance: Combining ST-GCN and Transformer enhances understanding of temporal actions and improves model accuracy and robustness through self-supervision and weakly supervised learning when limited labeled data is available. The optimized model structure ensures efficient operation in resource-constrained environments, supports processing of large-scale datasets, and has broad application prospects. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 This is a schematic diagram of the three-dimensional structure of a device for collecting characteristics of mouse scratching behavior according to the present invention;
[0044] Figure 2 This is a front view of a device for collecting characteristics of mouse scratching behavior according to the present invention;
[0045] Figure 3 This is a top view of a device for collecting characteristics of mouse scratching behavior according to the present invention;
[0046] Figure 4 This is a side view of a device for collecting characteristics of mouse scratching behavior according to the present invention;
[0047] Figure 5 Schematic diagram of the three-dimensional structure of the cover;
[0048] Figure 6 is a front view of the cover;
[0049] Figure 7 is a top view of the cover;
[0050] Figure 8 It is a schematic diagram of the three-dimensional structure of the column;
[0051] Figure 9 It is the front view of the column;
[0052] Figure 10 This is a top view of the column;
[0053] Figure 11 It is a side view of the column;
[0054] Figure 12 Schematic diagram of the three-dimensional structure of the base plate;
[0055] Figure 13 It is the front view of the base plate;
[0056] Figure 14 It is a top view of the base plate;
[0057] Figure 15 is a side view of the base plate;
[0058] Figure 16 It is a schematic diagram of the principle of the method for collecting characteristics of mouse scratching behavior of the present invention.
[0059] In the figure: 1. cover plate; 2. column; 3. base plate.
[0060] 101. Small round hole on the top of the cover plate; 102. Cover plate column; 103. Connecting groove between the cover plate and the column;
[0061] 201. Transparent circular acrylic plate; 202. Semicircular light-transmitting opening; 203. Column body;
[0062] 301, connecting groove between base plate and column; 302, camera placement groove; 303, rectangular wire inlet groove; 304, base plate column. DETAILED DESCRIPTION
[0063] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making any creative efforts shall fall within the scope of protection of the present invention.
[0064] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments may be combined with each other.
[0065] The present invention will be further described below with reference to the accompanying drawings and specific embodiments, but they are not intended to limit the present invention.
[0066] Specific implementation method 1: Figures 1 to 15 This embodiment describes a device for collecting characteristics of mouse scratching behavior, comprising a cover plate 1, a column 2, a bottom plate 3 and a camera; Figures 1 to 4 .
[0067] The column 2 is a cylindrical structure with upper and lower openings. The upper end of the column 2 is threadedly connected to the lower end opening of the cover 1, and a transparent circular acrylic plate 201 is provided at the connection. The transparent circular acrylic plate 201 and the cover 1 form a mouse accommodation space.
[0068] The lower end of the column 2 is threadedly connected to the upper end of the base plate 3. A camera for collecting the scratching behavior characteristics of mice is installed on the base plate 3. The space enclosed by the column 2 and the base plate 3 serves as the camera observation and adjustment space.
[0069] The cover 1 is firmly connected to the top of the column 2 through the connecting groove at the bottom. At the same time, the bottom plate 3 of the device is tightly connected to the bottom of the column 2 through the connecting groove at the top, forming a stable overall structure. The mice move freely on the transparent circular acrylic plate 201, and the camera located on the bottom plate 3 can clearly capture the scratching behavior of the mice. The device provides a natural and stress-free experimental environment, which is convenient for accurately detecting and analyzing their scratching behavior and obtaining accurate and reliable research data.
[0070] See also Figures 5 to 7 The cover plate 1 includes a cover plate column body 102 and a top plate, and a plurality of small round holes 101 on the top of the cover plate are dispersedly arranged on the top plate to provide air and light for the mouse accommodation space; the lower end opening of the cover plate column body 102 is provided with a cover plate and column connecting groove 103, which is used to cooperate with the connecting groove of the upper end of the column 2 for threaded connection and fixation of the transparent circular acrylic plate 201.
[0071] Five small circular holes are located on the top of the cover, primarily for ventilation and lighting. These holes ensure adequate air circulation in the mice's living environment, maintaining appropriate oxygen levels and allowing in an appropriate amount of natural light, simulating a lighting environment close to actual living conditions, thereby further reducing stress on the experimental animals. The connecting groove below the cover 3 not only facilitates a secure connection to the top of the column 2 but also further secures the transparent acrylic plate 201, ensuring the stability of the entire device.
[0072] See also Figures 8 to 11 The column 2 includes a column body 203, and the upper and lower ends of the column body 203 are both provided with connecting grooves. The upper end of the column body 203 has a notch as a semicircular light-transmitting port 202 for providing air and light for the mouse accommodation space.
[0073] The pillar 2, which serves as the device's supporting structure, is hollow and securely connected to the base plate 3 at its lower end, stabilizing the entire device. A semicircular light-transmitting opening 202 is located at the top of the pillar 2. This provides the necessary light to the interior of the device, simulating natural lighting conditions while avoiding the potential interference and stress that direct light sources may cause to the mice. This indirect lighting helps maintain the mice's natural behavioral patterns, making observations more realistic and reliable.
[0074] Covering the top of column 2 is a transparent, circular acrylic plate 201. This not only provides ample space for the mice to move around, but also ensures the camera can clearly record their behavior. The acrylic material was chosen for its balance of transparency and durability, without obstructing the camera's view or affecting the mice's visual perception, thus ensuring the accuracy and authenticity of the behavioral data.
[0075] See also Figures 12 to 15 The bottom plate 3 includes a bottom plate column body 304 and a bottom end plate. The upper surface of the bottom end plate is provided with a camera mounting groove 302, and the camera mounting groove 302 is used to install the camera. A rectangular wire inlet groove 303 is provided on the bottom plate column body 304, and the camera USB cable passes through the rectangular wire inlet groove 303 to connect to the external device; the upper end opening of the bottom plate column body 304 is provided with a bottom plate and column connecting groove 301, which is used to cooperate with the connecting groove of the lower port of the main column 2 for threaded connection.
[0076] The base plate 3 features a rectangular cable entry slot 303, ensuring a secure connection for the camera and preventing wires from interfering with the experimental environment. The camera is connected to an external computer or data processing device via a USB cable. The base plate 3 is tightly connected to the bottom of the column 2 via a connecting slot above, forming a stable overall structure. This ensures the stability of the device and keeps the internal wiring neat and orderly.
[0077] The camera, a core component of the device, is mounted on base plate 3 with its lens facing upwards. It records the mouse's behavior. The camera captures subtle movements, particularly scratching, at high resolution, providing high-quality video footage for subsequent automated analysis.
[0078] Specific implementation method 2: Combined with the following Figure 16 This embodiment describes a method for collecting characteristics of mouse scratching behavior, which is implemented using the device described in embodiment 1. The method for collecting characteristics of mouse scratching behavior uses a hybrid model of ST-GCN model + Transformer model for prediction, see Figure 16 , the hybrid model includes:
[0079] In the step A of constructing the adjacency matrix, the camera captures the mouse video, defines the mouse's head, back, limbs, and tail in the video frame as nodes in the graph, and extracts the position coordinates of each node. Then, the connection relationship between the nodes is determined based on the posture estimation, and the adjacency matrix A is constructed.
[0080] The design steps of the spatiotemporal graph convolution layer are to use graph convolution operations to encode the spatial relationship between different nodes at the same time point; input the adjacency matrix A into the ST-GCN layer and output the node feature matrix H at the t+1 time step. (t+1) ;
[0081] Time series processing step, node feature matrix H at time step t+1 (t+1) Input to the Transformer encoder for time series processing;
[0082] The results of the ST-GCN layer and the Transformer encoder are fused and the final prediction result is obtained through the fully connected layer.
[0083] Combining the spatial modeling capabilities of ST-GCN and the time series processing capabilities of Transformer enhances the understanding of temporal actions. Through this combination, the model can not only capture the spatial relationship between different nodes at the same time point, but also effectively handle dependencies and global context information over long time spans. The implementation steps are as follows:
[0084] 1. Build graph structure:
[0085] (1) The head, back, limbs, and tail of the mouse are defined as nodes in the graph, and the position coordinates of these key points are extracted from the video frames using a high-resolution posture estimation model (HRNet).
[0086] (2) Based on anatomical knowledge and posture estimation results, the connection relationship between nodes is defined: the head is connected to the neck, the limbs are connected to the drive, and the tail is connected to the tail root. These connection relationships reflect the spatial adjacency and functional correlation of various parts of the mouse body.
[0087] Construct an adjacency matrix A to represent the connection relationship between nodes. The adjacency matrix is a symmetric matrix, where the element A ij Indicates whether there is an edge between node i and node j.
[0088] 2. Design of spatiotemporal graph convolution layer:
[0089] At the same time point, graph convolution is used to encode the spatial relationship between different nodes.
[0090] The information of neighboring nodes is used to update the feature representation of each node. The ST-GCN layer can be expressed as:
[0091]
[0092] Among them, σ() is the ReLU activation function;
[0093] H (t) Represents the node feature matrix at the tth time step;
[0094] A is the adjacency matrix, A ij Represents the elements of the adjacency matrix A, i, j represent nodes;
[0095] is the adjacency matrix after adding the self-loop, Represents the adjacency matrix after adding the self-loop Elements, I N Represents an N×N identity matrix;
[0096] is the degree matrix, is the degree matrix element;
[0097] W (GCN) is a trainable weight matrix.
[0098] 3. Transformer Encoder:
[0099] For each time step t, the node feature H is first obtained through the ST-GCN layer (t) , and then input into the Transformer encoder,
[0100] The Transformer encoder uses a multi-head attention mechanism for time series processing and outputs MultiHead(Q, K, V):
[0101] MultiHead(Q,K,V)=Concat(head1,...,head h )W o
[0102] Generation of Q (query), K (key), V (value):
[0103] Q=H (t) W Q , K=H (t) W K , V=H (t) W V
[0104] W Q , W K , W V is a trainable projection matrix; H (t) is the input sequence.
[0105] head1, ..., head h Indicates the 1st to hth heads; the mth head m Get it as follows:
[0106]
[0107] is the projection matrix of the mth head, m = 1, 2, …, h;
[0108] W o is the weight matrix of the output linear transformation, d k is the dimension of the key vector.
[0109] 4. Residual connection and normalization:
[0110] In order to prevent the gradient from disappearing or exploding and to promote the training of deeper networks, residual connections and layer normalization are added after each layer to ensure the stability and consistency of information flow. The formula is as follows:
[0111] X out =LayerNorm(X in +Sublayer(X in ))
[0112] where X in and X out They are input and output features respectively, and Sublater represents a sublayer.
[0113] 5. Position coding:
[0114] Since Tansformer itself does not have the ability to understand sequential information, absolute position encoding is introduced to give the model an understanding of sequence position. The formula is as follows:
[0115] When the number is even, the position is
[0116] When odd, the position is
[0117] Where pos is the position index, d model is the characteristic dimension of the model.
[0118] 6. Integration and optimization
[0119] The results of the ST-GCN layer and the Transformer encoder are fused and passed through the fully connected layer to obtain the final prediction result. At the same time, an appropriate loss function (cross entropy loss) and optimization algorithm (Adam) are used for model training.
[0120] This implementation uses a combination of self-supervision and weak supervision to train the model. In the pre-training phase, a large amount of unlabeled single-view video data is used for self-supervised learning to enhance the model's feature representation capabilities. Then, a small amount of labeled data is introduced for weakly supervised learning, pseudo-labels are used to further optimize model performance, and consistency regularization techniques are applied to ensure the consistency of model output. This can significantly improve the accuracy and robustness of the mouse scratching behavior detection model when labeled data is limited, providing strong support for itch research and antipruritic drug development. The implementation steps are as follows:
[0121] 1. Self-supervised pre-training:
[0122] (1) Design contrastive learning tasks to perform inter-frame prediction, occlusion region prediction, and image transformation-based tasks (rotation, scaling, and cropping). For each frame, generate multiple enhanced versions, and use the different enhanced versions of the same frame as positive sample pairs, and the enhanced versions between different frames as negative sample pairs. Use the contrastive loss function (InfoNCE Loss) to maximize the similarity between positive sample pairs and minimize the similarity between negative sample pairs.
[0123] (2) Design a frame prediction task to predict the content of the next frame or the next few frames, and train the model to capture temporal continuity. Randomly occlude parts of the image and train the model to predict the content of the occluded area, enhancing its understanding of local and global information. Perform simple transformations on the image through rotation, scaling, cropping, etc., and train the model to recognize the relationship between these transformed images and the original image.
[0124] 2. Weakly supervised fine-tuning:
[0125] (1) Collect and annotate a small amount of high-quality video data on mouse scratching behavior to ensure that behavioral patterns under various conditions are covered.
[0126] (2) Use the pre-trained model to infer the unlabeled data and generate high-confidence pseudo labels. A threshold is set, and only when the model prediction probability exceeds the threshold will it be accepted as a pseudo label.
[0127] (3) Apply the consistency regularization technique (Mean Teacher) to make the model output consistent results under different data augmentation conditions. Use the mixed sample technique to linearly combine the labeled data and pseudo-labeled data to generate new training samples.
[0128] The main steps of the Mean Teacher model are as follows:
[0129] ① Use two models: a student model and a teacher model. The weight of the teacher model is the exponential moving average of the weight of the student model and does not participate in backpropagation.
[0130] ②In each iteration, the student model receives the augmented input, while the teacher model receives the unaugmented input. The difference in their outputs is calculated and added to the total loss as the consistency loss.
[0131] Combining cross entropy loss (for labeled data) and consistency loss (for pseudo-labeled data) to form a comprehensive loss function to guide model parameter updates.
[0132] Although the present invention is described herein with reference to specific embodiments, it should be understood that these embodiments are merely illustrative of the principles and applications of the invention. It should be understood that many modifications may be made to the illustrative embodiments, and that other arrangements may be devised, without departing from the spirit and scope of the invention as defined by the appended claims. It should be understood that the various dependent claims and features described herein may be combined in ways other than those described in the original claims. It should also be understood that features described in conjunction with individual embodiments may be used in conjunction with other described embodiments.
Claims
1. A method for collecting characteristics of mouse scratching behavior, the method is implemented based on a characteristic collection device, the characteristic collection device comprising a cover plate (1), a column (2), a bottom plate (3) and a camera; the column (2) is a cylindrical structure with upper and lower openings, the upper end of the column (2) is threadedly connected to the lower end opening of the cover plate (1), and a transparent circular acrylic plate (201) is provided at the connection, the transparent circular acrylic plate (201) and the cover plate (1) construct a mouse accommodation space; the lower end of the column (2) is threadedly connected to the upper end of the bottom plate (3), a camera for collecting characteristics of mouse scratching behavior is installed on the bottom plate (3), and the space enclosed by the column (2) and the bottom plate (3) serves as an observation and adjustment space for the camera; It is characterized by: The method for collecting mouse scratching behavior characteristics uses a hybrid model of the ST-GCN model + Transformer model for prediction. The hybrid model includes: In the step A of constructing the adjacency matrix, the camera captures the mouse video, defines the mouse's head, back, limbs, and tail in the video frame as nodes in the graph, and extracts the position coordinates of each node. Then, the connection relationship between the nodes is determined based on the posture estimation, and the adjacency matrix A is constructed. The design steps of the spatiotemporal graph convolution layer are to use graph convolution operations to encode the spatial relationship between different nodes at the same time point; input the adjacency matrix A into the ST-GCN layer and output the node feature matrix H at the t+1 time step. (t+1) ; Time series processing step, node feature matrix H at time step t+1 (t+1) Input to the Transformer encoder for time series processing; The results of the ST-GCN layer and the Transformer encoder are fused and the final prediction result is obtained through the fully connected layer; The ST-GCN layer outputs the node feature matrix H at the t+1 time step (t+1) for: Among them, σ() is the ReLU activation function; H (t) Represents the node feature matrix at the tth time step; A is the adjacency matrix, A ij Represents the elements of the adjacency matrix A, i, j represent nodes; is the adjacency matrix after adding the self-loop, Represents the adjacency matrix after adding the self-loop Elements, I N Represents an N×N identity matrix; is the degree matrix, is the degree matrix element; W (GCN) is a trainable weight matrix; The Transformer encoder uses a multi-head attention mechanism for time series processing and outputs MultiHead(Q, K, V): MultiHead(Q,K,V)=Concat(head1,...,head h )W o Among them, the three matrices Q, K, and V are: Q=H (t) W Q ,K=H (t) W K ,V=H (t) W V W Q , W K , W V is a trainable projection matrix; head1, ..., head h Indicates the 1st to hth heads; the mth head m Get it as follows: is the projection matrix of the mth head, m = 1, 2, …, h; W o is the weight matrix of the output linear transformation, d k is the dimension of the key vector.
2. A method for collecting mouse scratching behavior characteristics according to claim 1, characterized in that: Add residual connections and layer normalization after each layer.
3. The method for collecting mouse scratching behavior characteristics according to claim 1, wherein: Absolute position encoding is introduced to give the model awareness of sequence positions. The formula is as follows: Where pos is the position index, d model is the characteristic dimension of the model.
4. The method for collecting mouse scratching behavior characteristics according to claim 1, wherein: The model is trained using a combination of self-supervision and weak supervision. In the pre-training phase, a large amount of unlabeled single-view video data is used for self-supervised learning to enhance the model's feature representation capabilities. Then, a small amount of labeled data is introduced for weakly supervised learning, pseudo labels are used to further optimize the model performance, and consistency regularization technology is applied to ensure the consistency of the model output.
5. The method for collecting mouse scratching behavior characteristics according to claim 1, wherein: The cover plate (1) comprises a cover plate column body (102) and a top plate, wherein a plurality of small circular holes (101) on the top of the cover plate are dispersedly arranged on the top plate for providing air and light for the mouse accommodation space; a cover plate and column connection groove (103) is provided at the lower end opening of the cover plate column body (102) for cooperating with the connection groove of the upper end of the column (2) for threaded connection and fixing the transparent circular acrylic plate (201).
6. The method for collecting mouse scratching behavior characteristics according to claim 1, characterized in that: The column (2) includes a column body (203), the upper and lower ends of the column body (203) are both provided with connection grooves, and the upper end of the column body (203) has a notch as a semicircular light-transmitting opening (202) for providing air and light for the mouse accommodation space.
7. The method for collecting mouse scratching behavior characteristics according to claim 1, characterized in that: The bottom plate (3) comprises a bottom plate column body (304) and a bottom end plate. The upper surface of the bottom end plate is provided with a camera placement groove (302), and the camera placement groove (302) is used to install a camera. The bottom plate column body (304) is provided with a rectangular wire entry groove (303), and the camera USB cable passes through the rectangular wire entry groove (303) to connect to an external device. The upper end opening of the bottom plate column body (304) is provided with a bottom plate and column connection groove, which is used to cooperate with the connection groove of the lower end of the column (2) for threaded connection.
Citation Information
Patent Citations
Transform sign language segmentation method based on human skeleton input
CN117058750A
Experimental mouse behavior analysis device and method based on YOLO and ST-GCN algorithm fusion
CN117746504A