Animal behavior monitoring method, device, equipment and medium
By acquiring video stream data and using the YOLO model to identify animal numbers, center points and posture information, and combining continuous video frames for behavior monitoring, the problems of low monitoring efficiency and low accuracy in traditional methods are solved, and efficient and accurate animal behavior monitoring is achieved.
Patent Information
- Application Number
- CN202510605878.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-12
- Publication Date
- 2025-08-12
AI Technical Summary
Traditional animal behavior monitoring methods are susceptible to non-experimental factors, have low monitoring efficiency and low accuracy.
By acquiring video stream data, the numbering information, center point information and posture information of animals are identified using the YOLO model, and behavior monitoring is carried out in combination with continuous video frames, including trajectory tracking, posture changes and position changes.
It improves the accuracy and efficiency of monitoring, reduces the influence of environmental factors, supports automatic identification of multiple experimental sites and high flexibility, and adapts to a variety of experimental needs.
Smart Images

Figure CN120472537A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of animal experimental analysis, and in particular, to an animal behavior monitoring method, device, equipment and medium. Background Art
[0002] Animal behavior experiments are a scientific research method that observes, records, and analyzes the behavioral patterns of animals in specific environments or conditions to explore the influence of physiological, psychological, and environmental factors on their behavior. By designing specific scenarios and stimuli and recording indicators such as the animals' movement trajectories, dwell time, and exploratory behavior, these experiments provide important insights into anxiety, depression, fear, and the effects of drug interventions. These experiments are widely used in fields such as neuroscience, psychology, and pharmacology, and are crucial for studying conditions such as Alzheimer's disease, depression, and anxiety.
[0003] Traditional statistical methods for behavioral experiments include: 1) manually counting animal movement trajectories, dwell time, exploratory behavior, and other indicators; 2) using the subtraction method (photographing the experimental site to set initial values, then placing a mouse into the site to determine the difference between the mouse and the site values, and then adjusting parameters to track and identify the mouse) or the colorimetric method (obtaining the mouse's body color and subsequently adjusting parameters to achieve a clearer target outline) to track and monitor mice. Both methods are susceptible to non-experimental factors and suffer from low monitoring efficiency. Summary of the Invention
[0004] The present application provides an animal behavior monitoring method, device, equipment and medium to solve one or more technical problems existing in the prior art and at least provide a beneficial option or create conditions.
[0005] Other features and advantages of the present application will become apparent from the following detailed description, or may be learned in part by practice of the present application.
[0006] According to one aspect of an embodiment of the present application, a method for monitoring animal behavior is provided, the method comprising:
[0007] Acquire video stream data for a target area, where a plurality of animals exist in the target area, the video stream data consisting of a plurality of video frames and used to represent the state and / or behavioral action of each of the animals in the target area;
[0008] For each of the video frames, determining target information of each of the animals in the video frame, the target information including number information, center point information, and posture information;
[0009] For each animal, the behavior of the animal is monitored according to the number information, the center point information and the posture information of the animal in each video frame to obtain animal behavior monitoring information.
[0010] In one embodiment of the present application, based on the above solution, determining the target information of each of the animals in the video frame includes:
[0011] The video frame is input into a preset recognition model to obtain the number information, center point information and posture information of each animal in the video frame.
[0012] In one embodiment of the present application, based on the above solution, the preset recognition model is trained in the following manner:
[0013] Inputting preset training data into the recognition model, wherein the training data is data that has undergone geometric space transformation, color transformation, and image distortion correction processing;
[0014] Dividing the training data into a training set and a validation set;
[0015] The recognition model is iteratively trained according to the training set and the validation set.
[0016] In one embodiment of the present application, based on the aforementioned solution, the animal behavior monitoring is performed based on the number information, the center point information, and the posture information of the animal in each video frame to obtain the animal behavior monitoring information, including:
[0017] determining position change information of the animal according to center point information of the animal in each of two adjacent video frames with the same number information;
[0018] determining the posture change information of the animal according to the posture information of the animal with the same number information in each of two adjacent video frames;
[0019] The animal behavior monitoring information is determined based on the position change information and posture change information of the animal between adjacent video frames.
[0020] In one embodiment of the present application, based on the aforementioned solution, determining the position change information of the animal according to the center point information of the animal with the same number information in each of two adjacent video frames includes:
[0021] determining coordinate change information of the animal between the two adjacent video frames according to center point information between the two adjacent video frames;
[0022] The position change information of the animal is determined according to the coordinate change information and a preset proportional coefficient.
[0023] In one embodiment of the present application, based on the aforementioned solution, determining the posture change information of the animal according to the posture information of the animal with the same number information in each of two adjacent video frames includes:
[0024] Determining the head information, coccyx information, and tail information of the animal in two adjacent video frames according to the posture information of the animal with the same number information in the two adjacent video frames;
[0025] The posture change information of the animal between the two adjacent video frames is determined according to the head information, coccyx information and tail information of the animal in the two adjacent video frames.
[0026] In one embodiment of the present application, based on the aforementioned solution, the target area includes a central area and a non-central area, and determining the animal behavior monitoring information based on the position change information and posture change information of the animal between adjacent video frames includes:
[0027] determining the time the animal spends in the central area and the time the animal spends in the non-central area;
[0028] determining the dynamic and static state information of the animal according to the posture change information;
[0029] generating trajectory tracking information of the animal according to the position change information, the stay time in the central area, and the stay time in the non-central area;
[0030] The animal behavior monitoring information is determined based on the trajectory tracking information and the dynamic and static state information.
[0031] According to one aspect of an embodiment of the present application, an animal behavior monitoring device is provided, the device comprising:
[0032] An acquisition unit is configured to acquire video stream data for a target area, wherein a plurality of animals exist in the target area, wherein the video stream data is composed of a plurality of video frames and is configured to represent the state and / or behavior of each of the animals in the target area;
[0033] a determining unit, configured to determine, for each video frame, target information of each of the animals in the video frame, the target information including number information, center point information, and posture information;
[0034] The monitoring unit is used to monitor the behavior of each animal according to the number information, the center point information and the posture information of the animal in each video frame to obtain animal behavior monitoring information.
[0035] According to one aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which a computer program is stored. The computer program includes executable instructions. When the executable instructions are executed by a processor, the method described in the above embodiment is implemented.
[0036] According to one aspect of an embodiment of the present application, an electronic device is provided, comprising: one or more processors; and a memory for storing executable instructions of the processors, wherein when the executable instructions are executed by the one or more processors, the one or more processors implement the method described in the above embodiments.
[0037] The beneficial effects of this application are as follows: by acquiring video stream data for each animal in the target area, and then enhancing each video frame to obtain a video frame, the impact of environmental factors on the video frame is reduced, and the clarity of the video frame is further improved. By combining the animal's number information, center point information and posture information with continuous video frames, the behavior of animals with different number information can be monitored, such as trajectory tracking, posture changes, position changes, and other status or behavior monitoring, thus solving the problems of low accuracy and low monitoring efficiency existing in the relevant existing technologies.
[0038] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] The accompanying drawings are incorporated into and constitute a part of the specification, illustrating embodiments consistent with the present application and, together with the specification, explaining the principles of the present application. Obviously, the drawings described below are only some embodiments of the present application, and those skilled in the art can derive other drawings based on these drawings without inventive effort. In the drawings:
[0040] Figure 1 This is a schematic diagram based on the animal experiment scenario;
[0041] Figure 2 Schematic diagram of the head information, coccyx information and tail information proposed for this application;
[0042] Figure 3 This is an example diagram of the target area corresponding to the OFT experiment proposed in this application;
[0043] Figure 4 This is an example diagram of the target area corresponding to the EMP experiment proposed in this application;
[0044] Figure 5 Flowchart of an animal behavior monitoring method according to an embodiment of the present application;
[0045] Figure 6 is a block diagram of an animal behavior monitoring device according to an embodiment of the present application;
[0046] Figure 7 1 is a structural diagram of an electronic device according to the present application. DETAILED DESCRIPTION
[0047] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this application will be thorough and complete and will fully convey the concepts of the example embodiments to those skilled in the art.
[0048] In addition, described feature, structure or characteristic can be combined in one or more embodiments in any suitable manner.In the following description, many specific details are provided so as to provide a full understanding of the embodiments of the present application. However, it will be appreciated by those skilled in the art that the technical scheme of the present application can be put into practice without one or more of the specific details, or other methods, components, devices, steps etc. can be adopted. In other cases, known methods, devices, implementations or operations are not shown or described in detail to avoid blurring the various aspects of the application.
[0049] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically separate entities. That is, these functional entities may be implemented in software, in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or micro-controller node devices.
[0050] The flowcharts shown in the accompanying drawings are for illustrative purposes only and do not necessarily include all contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may be decomposed, while others may be combined or partially combined. Therefore, the actual execution order may vary depending on the actual situation.
[0051] It should be noted that the term "plurality" used in this document refers to two or more. "And / or" describes a relationship between associated objects, indicating that three possible relationships exist. For example, "A and / or B" can represent: A alone, A and B together, or B alone. The character " / " generally indicates an "or" relationship between the associated objects.
[0052] Animal behavior experiments are a scientific research method that explores the impact of physiological, psychological, and environmental factors on animal behavior by observing, recording, and analyzing the behavioral patterns of animals in specific environments or conditions. Common experimental models include the Open Field Test (OFT), the Elevated Plus Maze (EPM), and the Forced Swim Test (FST). These experiments design specific scenarios and stimuli, and record indicators such as the animal's movement trajectory, residence time, and exploratory behavior, providing an important basis for studying anxiety, depression, fear, and the effects of drug interventions. Such experiments are widely used in fields such as neuroscience, psychology, and pharmacology, and are crucial for diseases such as Alzheimer's disease, depression, and anxiety.
[0053] Traditional statistical methods for behavioral experiments include: 1) manually counting animal movement trajectories, dwell time, exploratory behavior, and other indicators; 2) using the subtraction method (photographing the experimental site to set initial values, then placing a mouse into the site to determine the difference between the mouse and the site values, and then adjusting parameters to track and identify the mouse) or the colorimetric method (obtaining the mouse's body color and subsequently adjusting parameters to achieve a clear target outline) to track and monitor mice. Both methods are susceptible to non-experimental factors and suffer from low monitoring efficiency.
[0054] To address the above issues, this application makes the following improvements: 1) High detection accuracy: Using the YOLO model, the interference of reflections and stains is eliminated by identifying the biological characteristics of animals (such as mice); 2) High versatility and automation: This method has no strict requirements on the color and material of the experimental site and supports automatic identification of the experimental site; 3) High flexibility: The statistical frequency is adjustable to adapt to various experimental needs.
[0055] The following is a detailed description of the implementation details of the technical solution of the embodiment of the present application:
[0056] According to one aspect of the present application, a method for monitoring animal behavior is provided. Figure 5 This is a flow chart of an animal behavior monitoring method according to an embodiment of the present application. The animal behavior monitoring method includes at least steps S1 to S3, which are described in detail as follows:
[0057] In step S1, video stream data for a target area is obtained, where there are a plurality of animals in the target area, and the video stream data consists of a plurality of video frames and is used to represent the state and / or behavior of each of the animals in the target area;
[0058] In step S2, for each of the video frames, target information of each of the animals in the video frame is determined, where the target information includes number information, center point information, and posture information;
[0059] In step S3, for each animal, the behavior of the animal is monitored according to the number information, the center point information and the posture information of the animal in each video frame to obtain animal behavior monitoring information.
[0060] Specifically, the system acquires video stream data for each animal within a target area and then enhances each frame to reduce the impact of environmental factors on the video frames, further improving their clarity. By combining the animal's number, center point, and posture information with continuous video frames, the system monitors the behavior of each animal with a different number, such as tracking its trajectory, posture changes, and position changes. This addresses the low accuracy and inefficiency of existing monitoring technologies.
[0061] This application uses mice as experimental subjects and proposes the following detailed implementation methods:
[0062] Phase 1: Data collection, processing, and model training
[0063] 1.1 Experimental site construction and data collection
[0064] The experimental site layout is as follows Figure 1 As shown, the experimental site and the experimental background are required to have a certain color contrast (such as black site, white background) and no obstruction. This application supports multiple data input modes, including static images and dynamic video files. This application takes video stream data as an example. In order to ensure the real-time response performance and recognition accuracy of the system, high-resolution video stream data (resolution higher than 720p or frame rate higher than 30fps) is preprocessed, including resolution standardization to 720p and frame rate downsampling to 30fps. At the same time, the system is compatible with external camera equipment to realize real-time video acquisition and online analysis functions of experimental scenes, providing experimenters with a convenient real-time monitoring solution.
[0065] Figure 1 The behavioral experiments studied in this study included two types: Figure 1 The experiment on the left is that the camera equipment monitors the behavior of animals (mice) in the target area (such as trajectory tracking, posture changes, etc.), while Figure 1 The experiment on the right is a hanging experiment, in which the animals are hung to study their posture changes.
[0066] We collected videos from various behavioral experiments (OPT, EMP, and FST) and processed them frame-by-frame (i.e., the enhancement process described in this application) to obtain high-quality mouse images. We removed blurry, inter-occluded, and unclear key areas. We also retrieved images of experimental mice from different strains (C57 mice: black, CD rats: white) to improve the multi-angle data of mice.
[0067] 1.2 Data Preprocessing
[0068] The preset recognition model is trained in the following way:
[0069] Inputting preset training data into the recognition model, wherein the training data is data that has undergone geometric space transformation, color transformation, and image distortion correction processing;
[0070] Dividing the training data into a training set and a validation set;
[0071] The recognition model is iteratively trained according to the training set and the validation set.
[0072] To enhance the robustness and generalization of the model, multi-dimensional data augmentation was performed on the training data. Specifically, geometric space transformations (random rotation and scaling), color transformations (grayscaling and contrast adjustment), and image distortion correction were used to construct a broadly adaptable augmented dataset. Specifically addressing image distortion caused by water refraction in the forced swim test (FST), a corresponding data augmentation scheme was designed to simulate the real-world experimental environment and ensure the objectivity and reliability of model evaluation. Finally, the training data was randomly split into a training set and a validation set in an 8:2 ratio.
[0073] 1.3 Data Annotation
[0074] The collected images were annotated using the labelme tool in the Python environment. The key point "head" was marked at the mouth of the mouse, the key point "buttocks" was marked at the tailbone of the body, and the key point "tail" was marked at 1 / 3 of the distance from the end of the tail. Figure 2 As shown, the annotation contents include "black mouse", "white mouse" (color categories) and "head", "buttocks", "tail" (key points), and "head", "buttocks", and "tail" (key points) correspond to the head information, coccyx information, and tail information described in this application respectively.
[0075] 1.4 Model Construction and Training
[0076] YOLOv8 was selected as the base model, owing to its advantages of fast detection and high-precision positioning. YOLOv8l and YOLOv8l_pose were used to train the mouse recognition model and mouse keypoint model, respectively. The models were evaluated using a validation set, using metrics such as precision, recall, chaos matrix, and F1 score. Model parameters were adjusted based on the evaluation results to prevent overfitting.
[0077] Phase 2: Detection and tracking of mice
[0078] 2.1 Experimental site identification
[0079] 2.1.1 Identification and division of regular venues
[0080] For simple, regular sites, the automatic recognition model can be directly obtained through YOLOv8 training and regional division can be performed. In the OPT experiment, multiple unobstructed and animal-free site images were first collected as training data sets, and a high-precision site recognition model was obtained through model training. Based on the output results of the model, the spatial range of the central zone (CentralZone) and the peripheral zone (PeripheralZone) was further defined, such as Figure 3 As shown, it provides a clear spatial positioning basis for subsequent behavioral analysis, and the peripheral area is the non-central area mentioned in this application.
[0081] 2.1.2 Identification and division of irregular sites
[0082] For complex and irregular sites (such as the cross-shaped structure of EMP experiments), Figure 4 As shown, this application utilizes the significant difference in grayscale values between the experimental site and the surrounding background. By calculating the grayscale distribution curve of each row and column, the coordinate point (X, Y) where the grayscale intensity reaches 50% of the peak value is extracted, and this is used as the reference point for accurate division of the experimental site. This method effectively realizes the boundary identification and regional division of complex sites, and provides a reliable spatial positioning basis for subsequent experimental analysis. In the experiment, four values of X1, X2, Y1, and Y2 can be obtained through grayscale. The cross-shaped area containing the points (X1, y) (X2, y) (X, y1) (X, Y2) is the EMP experimental site. It is stipulated that the area containing (X1, y) (X2, y) is the closed arm (Close-arm); the area containing (X, y1) (X, Y2) is the open arm (Open arm); and the area surrounded by (X1, y1) (X1, y2) (X2, y1) (X2, y2) is the central area (CentralZone).
[0083] 3.2 Identification and numbering of mice
[0084] The recognition scenario of multiple mice mainly appears in static detection. The algorithm calls the YOLO model to detect mice in each video frame. For each detected target, after calculating the center point of its bounding box (that is, the center point information described in this application), it uses lateral distance matching (comparing the center point information of the current video frame with the center point information of the previous video frame, and converting pixels to real size through conversion factors (two methods are adopted: camera internal and external parameter conversion / defining how long the rack where the mouse is hung is from the leftmost end to the rightmost end in the real world), and associates the targets with the set lateral distance threshold (to determine whether it is the same mouse). If no existing record is matched, a new Mouse object is created, that is, a new number information is created for the current mouse at this time; if a match is found but the interval between the two frames exceeds the maximum frame gap, only the position information is updated without accumulating the static time.
[0085] It should be noted that the target area proposed in this application can be applied to Figure 1 The area shown on the left (corresponding to Figure 3 and Figure 4 and non-central areas shown), can also be applied to Figure 1 The hanging area corresponding to the hanging mouse experiment is shown on the right.
[0086] In application Figure 1 The target information obtained at this time is also the number information, the center point information and the posture information, but relative to the hanging area of the hanging mouse experiment shown on the right. Figure 1 The relevant content of the center area on the left is not reflected in this application embodiment. Figure 1 For the hanging area corresponding to the hanging mouse experiment shown on the right, the central area and non-central area of the mouse and the corresponding form trajectory are not counted. Only the mouse's static time, posture information, hanging swing trajectory and other data are counted.
[0087] Phase 3: Experimental Data Acquisition
[0088] The core task of this phase is to acquire and analyze behavioral data from mice, including activity time within the experimental arena, movement trajectories, entry and exit patterns (e.g., central and peripheral areas), and identification of resting and active states. This phase enables the system to effectively collect and store detailed behavioral data, providing foundational support for subsequent experimental analysis.
[0089] 3.1 Recording of the activity time, distance, and trajectory of mice in the designated area (trajectory tracking information)
[0090] First, the experimental site in the picture of the video frame of the first frame is extracted and identified, and spatial division is performed (such as open arms, closed arms and central area). Next, the system detects the position of the mouse (i.e., obtains the center point information) for each video frame, obtains the center point coordinates of the mouse, and records the mouse's residence time and movement distance in different areas by tracking the center point. The processing result of each video frame includes the current position coordinates of the mouse (i.e., center point information), which are converted into the actual coordinates of the experimental site, usually in centimeters.
[0091] During this process, the system determines whether the mouse has entered a specific area based on the area division of the site. Specifically, it detects whether the mouse's current location falls into a predefined central area or other related areas, and updates the mouse's activity time in each area based on this data. For example, when a mouse enters the central area, the system increases its stay time in the area and continuously updates its movement distance in the central area. When the mouse leaves the area and enters a new area, the corresponding data will also be recorded and updated.
[0092] In addition, the system also calculates the movement distance of the mouse in each frame, that is, calculates the Euclidean distance between the current position and the last detected position, that is, the coordinate change information of the animal between two adjacent video frames described in this application, and determines the position change information of the animal based on the coordinate change information and a preset proportional coefficient. The preset proportional coefficient is used to characterize the ratio of the Euclidean distance of the animal in two adjacent frames to the distance in the actual scene. By recording these distances frame by frame, the system can accurately derive the total movement distance of the mouse, and calculate the movement distance of the mouse in each area separately by area. The data per second is recorded, and the corresponding statistical data is generated, and finally output in the form of a table for later analysis.
[0093] 3.2 Identification of resting and active states of mice
[0094] When detecting the activity or resting state of a mouse, in order to further improve the accuracy and meticulousness of the data, the present application can determine the activity state of the mouse. Traditional motion monitoring relies only on the position change of the mouse, while ignoring its posture change. The present application can capture the motion information of the key parts of the mouse (such as the head, tail, coccyx), thereby more accurately distinguishing whether the mouse is in a resting state or an active state.
[0095] The determination of whether a mouse is in a static state is mainly based on the following conditions (dynamic and static state information):
[0096] Matching detected targets: After calling the YOLO model for detection in each frame, the center point (center point information) of the bounding box is calculated for each detection result. "Horizontal position matching" is used to determine whether the currently detected target corresponds to an existing record. This is done by comparing the distance between the current center point and the center point information (i.e., center point coordinates) of the mouse in the previous video frame, converted to actual size on the x-axis. If the horizontal distance is less than the set threshold, it is considered the same mouse; otherwise, a new Mouse object is created.
[0097] Continuous Frame Check: If an existing mouse is matched, but the frame interval between two detections exceeds the set maximum frame interval, the static time is not accumulated and only the position data is updated. This is to avoid incorrect time accumulation due to missed detections or video frame jumps.
[0098] Static state judgment: For the same mouse detected continuously, the program calculates the Euclidean distance (movement) between the current detection frame and the previous frame detection frame. If all the following conditions are met at the same time, it is judged to be in a static state:
[0099] First, the movement distance condition: if the movement is less than the set movement threshold, it means that the object position changes very little.
[0100] Second, key point conditions: the detection results contain at least three key points (i.e. the head information, coccyx information and tail information mentioned above).
[0101] Third, the angle condition: After calculating the angle using the first three key points (with the middle key point as the midpoint), the result must be greater than 90 degrees. An angle greater than 90 degrees is considered to meet the characteristics of a static biological movement.
[0102] When the above conditions are met at the same time, the time difference (in seconds) between the current frame and the last detected frame is calculated based on the frame number difference and accumulated into the immobility time of the mouse.
[0103] Update or keep active
[0104] If the stationary judgment condition is not met, only the bounding box and center point information are updated, and the cumulative time of the stationary mouse is not updated, so the mouse is considered to be in an active state.
[0105] 3.3 Experimental data export
[0106] After the experiment, each experimental data (including activity time, movement distance, resting state, and number of entries and exits per second) is automatically recorded and stored in a structured Excel file. In this Excel file, each column represents a different behavioral indicator for a mouse, and each row represents a time point in the experiment. In addition, to facilitate statistical analysis of multiple experimental data, we have also designed a key data extractor to aggregate the key experimental data from each experiment into a single Excel (total) file. In this file, each row represents an experiment, and each column represents a key data point (such as activity time, movement distance, and resting time).
[0107] Specifically, the system automatically records every second of data (such as the mouse's activity time in each area, movement distance, etc.) into a data structure called "stats" and regularly updates this data (every second) to an Excel file. In addition to some basic statistical data (such as total movement distance, time spent in the central area, number of entries into different areas, etc.), the system also includes the mouse's behavioral data at each time point, for example, the time the mouse spent in the open arm, closed arm, central area, etc. in a given second, or the number of times it entered these areas.
[0108] In addition to the Excel file, the system will also generate some image files to further help the experimenter understand the activity of the mice. Figure 4 As shown, these images include mouse movement trajectory maps and heat maps. The movement trajectory map shows the real-time movement path of the mouse in the experimental venue, which can intuitively display the spatial position of the mouse at different time points. The heat map shows the density of mouse activities through areas of different colors. Dense areas usually indicate areas where mice stay for a long time or pass frequently. It is of great value for analyzing mouse behavior patterns, finding hot spots of mouse behavior, and studying emotion-related behaviors such as anxiety. For example, the difference in activity between the central area and the peripheral area may reflect the mouse's anxiety level, while the difference in movement between the open arm and the closed arm may show the mouse's exploratory behavior or emotional response.
[0109] In summary, the present application can accurately monitor static or active animals (mice), and track the trajectories of active animals, thereby collecting animal behavior monitoring information (i.e., statistical tables), thereby providing a good data basis for animal behavior experimental analysis.
[0110] like Figure 6 As shown, Figure 6 This is a block diagram of an animal behavior monitoring device 300 provided in an embodiment of the present application. The animal behavior monitoring device 300 includes:
[0111] An acquisition unit 301 is configured to acquire video stream data for a target area, where a plurality of animals exist in the target area, the video stream data consisting of a plurality of video frames and used to represent the state and / or behavior of each of the animals in the target area;
[0112] A determination unit 302 is configured to determine, for each video frame, target information of each of the animals in the video frame, the target information including number information, center point information, and posture information;
[0113] The monitoring unit 303 is configured to monitor the behavior of each animal according to the number information, the center point information, and the posture information of the animal in each video frame to obtain animal behavior monitoring information.
[0114] Refer to the following Figure 7 4 to describe an electronic device 400 according to this embodiment of the present application. Figure 7 The electronic device 400 shown is merely an example and should not limit the functions and scope of use of the embodiments of the present application.
[0115] like Figure 7 As shown, electronic device 400 is implemented as a general-purpose computing device. Components of electronic device 400 may include, but are not limited to, at least one processing unit 410, at least one storage unit 420, and a bus 430 connecting various system components (including storage unit 420 and processing unit 410).
[0116] The storage unit stores program code, which can be executed by the processing unit 410, so that the processing unit 410 performs the steps described in the above "Example Method" section of this specification according to various exemplary embodiments of the present application.
[0117] The storage unit 420 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 421 and / or a cache memory unit 422 , and may further include a read-only memory unit (ROM) 423 .
[0118] The storage unit 420 may also include a program / utility 424 having a set (at least one) of program modules 425, such program modules 425 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0119] Bus 430 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller node, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0120] The electronic device 400 can also communicate with one or more external devices 1200 (e.g., a keyboard, a pointing device, a Bluetooth device, etc.), one or more devices that enable a user to interact with the electronic device 400, and / or any device that enables the electronic device 400 to communicate with one or more other computing devices (e.g., a router, a modem, etc.). Such communication can occur via an input / output (I / O) interface 450. Furthermore, the electronic device 400 can also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network such as the Internet) via a network adapter 460. As shown, the network adapter 460 communicates with other modules of the electronic device 400 via a bus 430. It should be understood that, although not shown in the figure, other hardware and / or software modules can be used in conjunction with the electronic device 400, including but not limited to microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0121] Through the description of the above embodiments, it is easy for those skilled in the art to understand that the example embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the embodiments of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including, for example, several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiments of the present application.
[0122] Furthermore, the above-mentioned figures are merely illustrative of the processes included in the methods according to exemplary embodiments of the present application and are not intended to be limiting. It is readily understood that the processes illustrated in the above-mentioned figures do not indicate or limit the temporal order of these processes. Furthermore, it is readily understood that these processes may be executed synchronously or asynchronously, for example, in multiple modules.
[0123] It should be understood that the present application is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes can be performed without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
Claims
1. A method for monitoring animal behavior, characterized in that: The method comprises: Acquire video stream data for a target area, where a plurality of animals exist in the target area, the video stream data consisting of a plurality of video frames and used to represent the state and / or behavioral action of each of the animals in the target area; For each of the video frames, determining target information of each of the animals in the video frame, the target information including number information, center point information, and posture information; For each animal, the behavior of the animal is monitored according to the number information, the center point information and the posture information of the animal in each video frame to obtain animal behavior monitoring information.
2. The animal behavior monitoring method according to claim 1, characterized in that: Determining target information of each of the animals in the video frame includes: The video frame is input into a preset recognition model to obtain the number information, center point information and posture information of each animal in the video frame.
3. The animal behavior monitoring method according to claim 2, characterized in that: The preset recognition model is trained in the following way: Inputting preset training data into the recognition model, wherein the training data is data that has undergone geometric space transformation, color transformation, and image distortion correction processing; Dividing the training data into a training set and a validation set; The recognition model is iteratively trained according to the training set and the validation set.
4. The animal behavior monitoring method according to claim 1, characterized in that: The performing behavior monitoring on the animal according to the number information, the center point information, and the posture information of the animal in each of the video frames to obtain animal behavior monitoring information includes: determining position change information of the animal according to center point information of the animal in each of two adjacent video frames with the same number information; determining the posture change information of the animal according to the posture information of the animal with the same number information in each of two adjacent video frames; The animal behavior monitoring information is determined based on the position change information and posture change information of the animal between adjacent video frames.
5. The animal behavior monitoring method according to claim 4, characterized in that: The determining of the position change information of the animal based on the center point information of the animal in the same numbered information of two adjacent video frames includes: determining coordinate change information of the animal between the two adjacent video frames according to center point information between the two adjacent video frames; The position change information of the animal is determined according to the coordinate change information and a preset proportional coefficient.
6. The animal behavior monitoring method according to claim 5, characterized in that: The step of determining the posture change information of the animal based on the posture information of the animal with the same number information in each of two adjacent video frames includes: Determining the head information, coccyx information, and tail information of the animal in two adjacent video frames according to the posture information of the animal with the same number information in the two adjacent video frames; The posture change information of the animal between the two adjacent video frames is determined according to the head information, coccyx information and tail information of the animal in the two adjacent video frames.
7. The animal behavior monitoring method according to claim 6, characterized in that: The target area includes a central area and a non-central area, and determining the animal behavior monitoring information based on the position change information and posture change information of the animal between adjacent video frames includes: determining the time the animal spends in the central area and the time the animal spends in the non-central area; determining the dynamic and static state information of the animal according to the posture change information; generating trajectory tracking information of the animal according to the position change information, the stay time in the central area, and the stay time in the non-central area; The animal behavior monitoring information is determined based on the trajectory tracking information and the dynamic and static state information.
8. An animal behavior monitoring device, characterized in that: The device comprises: An acquisition unit is configured to acquire video stream data for a target area, wherein a plurality of animals exist in the target area, wherein the video stream data is composed of a plurality of video frames and is configured to represent the state and / or behavior of each of the animals in the target area; a determining unit, configured to determine, for each video frame, target information of each of the animals in the video frame, the target information including number information, center point information, and posture information; The monitoring unit is used to monitor the behavior of each animal according to the number information, the center point information and the posture information of the animal in each video frame to obtain animal behavior monitoring information.
9. An electronic device, characterized in that: The electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the animal behavior monitoring method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the animal behavior monitoring method according to any one of claims 1 to 7 is implemented.
Citation Information
Cited By
Method for detecting mouse approach-avoidance behavior based on elevated plus maze and application thereof
CN122761457A