Mouse behavior recognition and sleep interference method
Through visual recognition technology combined with mouse movement characteristics, using convolutional neural network models to identify mouse location information, and use the relative location relationship of the lever to drive away from the moving dial to solve the difficulty of complexity and sleep interference of mouse behavior recognition technology. The problem realizes the effective combination of mouse behavior recognition and sleep interference.
Patent Information
- Application Number
- CN202411753669.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-02
- Publication Date
- 2025-01-24
AI Technical Summary
The existing mouse behavior recognition technology is complex, difficult to train, poor system robustness and portability, making it difficult to implement mouse behavior recognition.
Using visual recognition technology combined with mouse movement characteristics, by taking images of the mouse activity area, using the convolutional neural network model to identify the mouse position information, and using the relative position of the lever to gradually drive away the mouse to wake up and disturb the mouse. Its sleep.
A closed -loop control of mice to identify and sleep interference was achieved, and it overcome the problem of crushing damage caused by direct drive rods. It does not affect mice to divert water and eat, which is in line with fragmented sleep.
Smart Images

Figure CN119344242A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of mouse behavior recognition and application, and in particular to a mouse behavior recognition and sleep interference method. Background Art
[0002] Mice play an indispensable role in life science and medical research due to their unique biological characteristics and experimental advantages.
[0003] Mouse behavior has received much attention in animal experiments. When animals are under the influence of drugs, poisons, and various external physical factors, their activity frequency, activity range, memory, sleep, etc. may change due to these external factors. This requires observing the changes in animal activities to judge.
[0004] Mouse behavior recognition based on artificial neural network models is currently an active research field. For example, Chinese patent documents CN110751085A and CN107239767A disclose mouse behavior recognition methods. Generally speaking, mouse behaviors are diverse and subtle, and their recognition results in a complex mouse behavior recognition model, difficult training, poor system robustness and portability, and thus a one-step approach to mouse behavior recognition is not easy to implement.
[0005] In the process of implementing mouse behavior recognition technology, the inventors found that visual recognition technology can identify mice with a high probability, especially accurately identifying mice in a simple background. On this basis, combined with the mouse's movement characteristics, it is more feasible to determine the mouse's single behavior, and thus has practical application value.
[0006] In view of this, the present invention proposes a solution that combines mouse single behavior recognition and sleep interference, so as to put mouse behavior recognition technology into practical application and generate practical technical value. Summary of the invention
[0007] The purpose of the present invention is to provide a mouse behavior recognition and sleep disturbance method, so that the mouse single behavior recognition can be practically applied in the aspect of sleep disturbance.
[0008] To this end, the present invention provides a method for identifying mouse behavior and disturbing sleep, S1, shooting an image of a mouse activity area, inputting the image into a mouse identification model, outputting the position information of each mouse, that is, the rectangular frame coordinates of the framed mouse, wherein the mouse is judged to be immobile only when both the shape and the position of the mouse rectangular frame do not change within a unit time; S2, calculating the position coordinates of two points on the lever according to the identification information of the center point of the lever and an arm point in the mouse activity area image; S3, converting the rectangular frame coordinates of each mouse and the two-point position coordinates of the lever into real coordinate information according to the coordinate conversion relationship between the pixel coordinates of the image and the real coordinates, and calculating the relative position relationship between the mouse and the lever using the real coordinate information of the two and geometric knowledge; S4, when it is determined that a mouse is about to sleep, using the relative position relationship between the lever and the mouse, driving the lever to rotate to the position where the mouse is immobile, and driving the mouse in a progressive toggle manner, rotating one circle in this way to wake up all the mice in the mouse activity area from immobility, wherein the mouse is about to sleep behavior is determined according to the duration of the mouse immobility behavior.
[0009] The present invention realizes the recognition of the sleeping behavior of mice through the immobility behavior of mice, and performs lever driving control according to the recognition result, thereby realizing the closed-loop control of the recognition and interference of the sleeping behavior of mice.
[0010] The present invention first uses a progressive toggle drive to wake up the mouse, and then drives the activity to help the mouse get out of the sleeping state, thereby overcoming the problem of crushing injuries that may be caused by direct driving. In addition, the method of the present invention does not affect the mouse's water intake and feeding during the interference period, and is consistent with the fragmented sleep (SF) of the mouse.
[0011] In addition to the above-described purposes, features and advantages, the present invention has other purposes, features and advantages. The present invention will be further described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] The drawings constituting a part of the present application are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings: Figure 1 is a flow chart of the mouse behavior identification and sleep disturbance method of the present invention; Figure 2 is a block diagram of the mouse behavior recognition and sleep disturbance system of the present invention; Figure 3 is a flow chart of the sleep disturbance process in mice; Figure 4 is a schematic diagram of the relative geometric position relationship between the mouse and the lever given in the mouse activity area image; Figure 5This is a schematic diagram of the principle of judging the immobility behavior of mice. DETAILED DESCRIPTION
[0013] The present invention will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments.
[0014] Figure 1 This is a flowchart of the mouse behavior recognition and sleep disturbance method of the present invention, combined with reference to Figures 1 to 4 , the present invention includes the following steps S1-S4.
[0015] S1. Take an image of the mouse activity area, input the image into a mouse recognition model, and output the position information of each mouse, that is, the coordinates of the rectangular frame of the mouse. The mouse recognition model is a trained convolutional neural network model. The mouse is judged as immobile only when the shape and position of the rectangular frame of the mouse do not change within a unit time.
[0016] S2. Calculate the position coordinates of two points on the lever according to the identification information of the center point of the lever and one arm point in the image of the mouse activity area.
[0017] S3. According to the coordinate conversion relationship between the pixel coordinates of the image and the real coordinates, the rectangular frame coordinates of each mouse and the two-point position coordinates of the lever are converted into real coordinate information, and the relative position relationship between the mouse and the lever is calculated using the real coordinate information of the two and geometric knowledge.
[0018] S4. When it is determined that a mouse is about to fall asleep, the relative position relationship between the lever and the mouse is used to drive the lever to rotate to the position where the mouse is immobile, and the mouse is driven away by gradual toggling. After one rotation, all immobile mice in the mouse activity area are awakened, and the mouse is determined to be about to fall asleep based on the duration of the mouse's immobile behavior.
[0019] In the present invention, mice are restrained in a breeding house environment. At this time, a camera can be used to take photos of the mice's activity area and input them into a mouse recognition model to identify the mice. The mice are framed in a rectangular frame in the image, and the pixel coordinates of the four corner points of the rectangular frame are output.
[0020] The above mouse recognition model can be implemented using a trained convolutional neural network (CNN). To increase the versatility of the model, images of mouse activity areas to be labeled in different feeding scenarios can be used to create training sets and test sets. After the model is trained and tested, it can be used to identify mice in mouse activity scenarios.
[0021] The present invention utilizes the mouse position information output by the mouse recognition model, that is, the pixel coordinates of the rectangular frame that frames the mouse (such as Figure 4 and Figure 5As shown in the figure, it is determined whether the mouse moves or rotates. Among them, the change of the position of the same rectangular box is movement, and the change of the shape of the same rectangular box is rotation. The movement behavior of the mouse can be regarded as a combination of the movement and rotation of the mouse pixel coordinates. If both do not change within a unit time, such as 1S, it is determined that the mouse is immobile.
[0022] In the present invention, if the immobility of a mouse is determined only by the change in position, there may be misjudgment. For example, a mouse turning in circles without moving may be misjudged as immobility. Figure 5 As shown, the distance between the center point O' of the rectangular frame A'B'C'D' and the center point O of the original rectangular frame ABCD does not exceed the set threshold (the threshold is determined by the image format size), and it is determined that the position has not changed; the rectangular frame exceeds the threshold range of 1.2-1.5 times the center point of the original rectangular frame (the threshold is adjustable), and it is determined that the shape has changed. The above threshold configuration can accommodate the systematic error of the mouse recognition model.
[0023] The present invention does not identify the detailed features of individual mice. In other words, it does not matter whether it is mouse A or mouse B. As long as the position and shape of the rectangular frame that frames the mouse do not change, it is determined that there is immobility of the mouse at that position.
[0024] The method for determining the sleeping behavior of mice in the present invention is as follows: if the mouse does not move for 40 seconds (this time can be adjusted), the mouse is considered to be sleeping. Specifically, in a number of consecutive 40S frames, if the change in the pixel coordinates of the rectangular frame containing the mouse does not exceed the threshold, the mouse is considered to be about to fall asleep.
[0025] The camera is directly placed in the center of the top of the mouse feeding house, which is a transparent round tube and a square tube. A sleep disturbance lever is set above the bottom of the feeding tube, which is rotated by a servo motor or reciprocated by a linear drive. The food box and water bottle containing mouse feed are placed on the side wall or the air-permeable top cover of the feeding tube. Other details are not given in detail.
[0026] A system for executing the method of the present invention is as follows Figure 2 As shown, it includes a camera, a computing unit, a control unit, a servo motor, and a lever. The computing unit includes a mouse recognition model, a lever position algorithm module, an immobility behavior determination module, and a relative position calculation module. The camera realizes image acquisition of the mouse activity area, the mouse recognition model is used to frame the mouse and give the position information of the rectangular frame, the lever position algorithm module is used to calculate the position coordinates of the center point of the lever and a lever arm point, the immobility behavior determination module is used to determine the immobility behavior of the mouse, and the relative position calculation module is used to calculate the relative position between the mouse and the lever. The control unit is used to control the servo motor according to the set interference strategy.
[0027] In one embodiment, the field of view of the camera covers the entire bottom area of the barrel, that is, the mouse activity area, which is used to capture images of the mouse activity area. In another embodiment, images from multiple cameras can be spliced into a complete image.
[0028] In the present invention, the center position of the lever in the feeding tube and the lever arm are provided with identification information such as color blocks. The center coordinates of all color blocks can be found from the image through a color block search algorithm (such as a Blob analysis algorithm in a visual algorithm, which analyzes the connected domains of the same pixels in the image). The center coordinates of the two color blocks can be used to determine the position of the lever in the image (such as Figure 4 as shown).
[0029] The coordinate transformation relationship between the pixel coordinates in the image and the real coordinates (i.e., the mapping matrix) can be obtained through calibration.
[0030] The image coordinates of the mouse and the lever obtained from the captured images can be converted into the real coordinates of the mouse and the lever through the above-mentioned coordinate conversion mapping matrix, and then the relative position relationship between the mouse and the lever, such as the angle or the moving distance, can be obtained through geometric relationships.
[0031] The angle controls the servo motor according to the sleep intervention / deprivation algorithm to achieve controlled movement of the lever. At the same time, the lever is driven to rotate to the position of the mouse, driving the mouse away from the original position.
[0032] The servo motor drives the lever to control the movement. In addition to using a progressive toggling motion to wake up mice that are about to fall asleep, it can also perform a variety of movement modes, such as uniform rotational motion (forcing mice to run in circles along the wall of the cylinder at a uniform speed, including fast, medium and slow speeds) and variable speed rotational motion (forcing mice to run in circles along the wall of the cylinder at a uniform speed). These movement modes can be selected and combined to achieve movement programming for subsequent mouse driving activities.
[0033] In the present invention, the sleep disturbance of mice is performed when they are about to fall asleep. This time period can usually be set as the immobility of the mice for 40 seconds. However, this time period is set as an adjustable parameter in the present invention and can also be set as other time periods.
[0034] Since there are multiple mice in the feeding tube, the duration of the mice's immobility behavior can be judged to statistically analyze the mice's activity, diet, and sleep patterns. It can also be used to judge whether the mice are about to enter sleep behavior. The method used is as follows: Select a unit time interval (for example, 1, this value is adjustable), judge and accumulate the number of mouse immobility behaviors at the positions of the rectangular frames framed in the mouse activity area image at the current moment, where four rectangular frames are framed at the current moment. If rectangular frame A existed at the previous moment and did not change, the number of mouse immobility behaviors is 1; if rectangular frame A existed at the moment before the previous moment and did not change, the cumulative number of counts is 2; otherwise, the number of counts is 1; if rectangular frame B did not exist at the previous moment, the number of counts of rectangular frame B is 0, and the number of mouse immobility behaviors at the rectangular frames framed at the current moment is updated.
[0035] If the count value accumulates to 40 times, it is determined that a mouse is about to enter sleep behavior, and the intervention process is triggered to interfere with the immobility behavior of all mice.
[0036] In one embodiment, the sleep period and the sleep disturbance period of the mouse are arranged according to the experimental needs. The sleep disturbance method of the present invention is carried out during the sleep disturbance period, and during the sleep period of the mouse, all actions are stopped.
[0037] like Figure 3 As shown, in the lever rotation intervention mode, the mouse sleep intervention method is as follows: Entering the sleep intervention period, start counting the immobility behavior of mice. If the immobility behavior count of the mouse in the rectangular frame reaches 80 times, it is determined that a mouse is about to fall asleep. According to the angle between the lever and the mouse, the lever is controlled to reach the immobility position of the mouse to wake it up. The lever action mode is: gradual toggle driving, forcing the mouse to leave the original position. If the mouse is still immobile after driving n times (2-3 times), it is considered dead / in poor condition, and the interference is stopped and an alarm is issued to notify the experimenter. Otherwise, continue to drive the next mouse in the immobility behavior away from the original position until it rotates one circle to wake up all the mice. After all the mice are woken up, the lever is rotated in a set movement mode, such as uniform speed or variable speed to a set number of circles, such as 1 to 6 circles, or rotated for a full set time to help the mouse get out of the sleep state.
[0038] The above process is repeated. The present invention significantly reduces the number of disturbances to the sleep of mice.
[0039] After sleep disturbance, other movement strategies can be designed, such as keeping the lever spinning and letting the mouse run in circles along the wall of the cylinder.
[0040] Progressive paddle movement means that the lever first swings / moves to the position of the mouse, then retreats, and then swings in an angle increment / moves in a distance increment to contact the mouse, forming a progressive paddle movement. This can force the mouse to calmly leave its original position to avoid crushing injuries to the mouse caused by continuous rotation or reciprocating movement. Repeat this process 2-3 times, with a 1S-2S break each time.
[0041] To ensure the interference effect, a comparative embodiment is as follows: during the set sleep interference period, the lever rotates six times per minute, runs for one minute and stops for five minutes, and repeats this cycle to prevent the mouse from entering a sleep state. This interference strategy does not wake up the mouse, and direct expulsion has problems such as blind interference and crushing injuries. The present invention takes the mouse's own state into consideration when interfering with sleep, first wakes up the mouse with a specific lever action, and then drives the mouse to move, thereby overcoming the problems of blind interference and crushing injuries.
[0042] The above description is only an embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for mouse behavior identification and sleep disturbance, characterized in that: The following steps are involved: S1, taking an image of the mouse activity area, inputting the image into a mouse recognition model, and outputting the position information of each mouse, that is, the coordinates of the rectangular frame of the mouse, wherein the mouse is judged as immobile only when both the shape and position of the mouse rectangular frame do not change within a unit time; S2, calculating the position coordinates of two points on the lever according to the identification information of the center point of the lever and one arm point in the image of the mouse activity area; S3, according to the coordinate conversion relationship between the pixel coordinates of the image and the real coordinates, the rectangular frame coordinates of each mouse and the two-point position coordinates of the lever are converted into real coordinate information, and the relative position relationship between the mouse and the lever is calculated using the real coordinate information of the two and geometric knowledge; S4. When it is determined that a mouse is about to fall asleep, the relative position relationship between the lever and the mouse is used to drive the lever to rotate to the position where the mouse is immobile, and the mouse is driven away by gradual toggling. After one rotation, all immobile mice in the mouse activity area are awakened, and the mouse is determined to be about to fall asleep based on the duration of the mouse's immobile behavior.
2. The method for mouse behavior recognition and sleep disturbance according to claim 1, characterized in that: The relative position relationship between the mouse and the lever is the angle between the lever and the mouse, wherein the movement mode of the lever is a rotation mode.
3. The method for mouse behavior recognition and sleep disturbance according to claim 1, characterized in that: The relative position relationship between the mouse and the lever is the translation distance between the lever and the mouse, wherein the movement mode of the lever is translational movement.
4. The mouse behavior recognition and sleep disturbance method according to claim 1, characterized in that: When mice that are about to sleep are driven away by gradual toggling, multiple drives are used. If the mouse still does not move after multiple drives, the mouse is judged to be dead / in poor condition, and an alarm is sounded to inform the experimenter.
5. The method for mouse behavior recognition and sleep disturbance according to claim 1, characterized in that: The identification information of the center point of the lever and one arm point is a color block, and the center coordinates of the color block are calculated according to an image algorithm as the position coordinates of the two points on the lever.
6. The mouse behavior recognition and sleep disturbance method according to claim 1, characterized in that: Step S4 also includes, in each sleep disturbance process, after waking up all mice from immobility, the lever continues to rotate to a set number of circles to drive the mice to move and thus get out of the sleeping state.
Citation Information
Patent Citations
Identification method and system of behaviors of mice
CN107239767A
Mouse behavior recognition system
CN110751085A
Method and systems for monitoring daily activities of animal
CN101826197A
Extraction method for mouse video multidimensional characteristic value and video classification method
CN108664942A
Mouse sleep management device
CN111789036A