A method for calculating activity energy consumption of experimental mice based on behavior tracking
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-24
- Publication Date
- 2026-08-11
AI Technical Summary
[0006](一)动物在原地静止时的肌肉微震颤、理毛、甚至是呼吸频率的改变,都伴随着巨大的能量波动,而目前的非接触式监测技术往往将其忽略
[0047] (i) Extremely high measurement accuracy, filling the static blind zone: Employing pixel frequency energy extraction technology based on foreground mask edge and texture jitter, the total number of pixels in the 0/255 state transition sequence S(t) within the mask is statistically analyzed. By introducing microscopic spectral energy of 1-15Hz, this invention can accurately identify and quantify the energy-consuming behaviors of animals in a static state (such as shivering, local tremors, local grooming, etc.). Experimental data show that in the animal's static phase, the method of this invention fills the gap in the microscopic motion energy consumption (average percentage of approximately 8%) missed by methods that rely solely on displacement calculation (i.e., only using step S4 and lacking step S5).
Smart Images

Figure CN122551433A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of computational behavioral science and physiology, and in particular to a method for calculating the energy expenditure of laboratory mice based on behavior tracking. Background Technology
[0002] In pharmacological screening, stress injury, aging, or metabolic disease models (such as obesity and diabetes), the instantaneous and cumulative energy expenditure of laboratory mice is a core indicator for assessing physiological function. Energy expenditure is the ultimate manifestation of energy exchange between an organism and its environment, and its fluctuations can reflect the toxic side effects or therapeutic effects of drugs.
[0003] Traditional methods rely heavily on complex physical sensors or biochemical detection equipment. Metabolic cages are typically used to measure gas parameters and then calculate the energy consumption of laboratory animals. However, the extremely narrow and enclosed environment of metabolic cages causes "stress interference," making the data unable to reflect the metabolic baseline of animals in their natural living conditions.
[0004] Meanwhile, traditional indirect calorimetry often suffers from low temporal resolution, with significant time intervals between measurements, making it impossible to precisely observe energy consumption at different times. This can mask the effects of some drugs with "dual-effect" properties. A typical example is ketamine. In the initial stage of drug action (0-30 min), experimental animals exhibit low activity and sedation, with reduced energy consumption. However, after 30 min, they enter a state of sustained high activity, with a significant increase in energy consumption. In this situation, because current technology can only record the total energy consumption within this 1-hour period, the decrease and increase in energy consumption cancel each other out, ultimately presenting a normal energy consumption value, thus masking the drug's efficacy.
[0005] In 2019, a new technique emerged that utilizes infrared and visible light image processing to determine the physiological characteristics of laboratory animals without physical contact. However, this type of existing technology has the following drawbacks:
[0006] (i) When an animal is still, the slight muscle tremors, grooming, and even changes in respiratory rate are accompanied by huge energy fluctuations, which are often overlooked by current non-contact monitoring technologies.
[0007] (ii) It relies heavily on infrared thermal imaging sensors to obtain respiration and body temperature, but high-quality thermal imaging sensors are extremely expensive (thousands of US dollars) and are very sensitive to ambient temperature, making them unsuitable for large-scale deployment in ordinary animal facilities.
[0008] (iii) The core of the thermal imaging signal is easily affected by the ambient temperature and humidity, and has strict requirements on the animal's position - the mouth and nose must be exposed (the respiratory rate calculation requires the algorithm to accurately locate the animal's mouth and nose area). If the animal is curled up, facing away from the camera, or in a crowded state, the local features of the thermal imaging will be lost to some extent. Summary of the Invention
[0009] Based on the above problems, the purpose of this invention is to provide a method for calculating the activity energy consumption of experimental mice based on behavior tracking. By constructing a dual-flow continuous physical quantification model that integrates macroscopic displacement work and microscopic spectral energy, the method achieves a prediction of metabolic energy consumption that is highly consistent with the indirect calorimetry method (gold standard).
[0010] The technical solution adopted by this invention to achieve its objective is a method for calculating the energy expenditure of laboratory mice based on behavior tracking, comprising the following steps:
[0011] S1. Experimental data collection: Measure the mass of the experimental mice, the length and width of the experimental box, put the experimental mice into the experimental box, and use a top-mounted camera to take a video of the mice's activities inside the experimental box.
[0012] S2. Foreground mask generation based on adaptive background subtraction: Obtain the mask image M after background subtraction. t ;
[0013] S3, Behavior Tracking: Generate target detection rectangles for mice in all video frames to determine the real-time position of the experimental mice;
[0014] S4. Calculation of Macroscopic Displacement Energy: The instantaneous velocity of the experimental mouse is calculated using its real-time position. Then, the displacement work done by the mouse at each instant is calculated to obtain the macroscopic displacement energy of the mouse at each instant during its movement. ;
[0015] S5. Microscopic Spectral Energy Deconstruction: Extract the pixel time change rate as S(t), and then process S(t) within a preset frequency range to obtain the energy characteristics of the experimental mouse's microscopic movements. ;
[0016] S6. Nonlinear mapping: This maps the macroscopic displacement energy at each moment. Energy characteristics of microscopic movements Feature fusion is performed to construct a binary feature vector. Finally, the binary feature vectors The data is input into the XGBoost gradient boosting tree of the regression model and co-mapped to obtain the energy consumption of the experimental mice at each time step.
[0017] Furthermore, step S2 specifically includes:
[0018] S201, Calculate the background reference image I background The background is estimated by taking the maximum value method, which means taking the maximum value at the pixel level across time for a certain number of frames, so that the pixels with large pixel values are represented by white background pixels, while the pixel intensity of black mouse pixels with small pixel values is ignored.
[0019] S202. Calculate the difference intensity between each frame of the original video and the background, as shown in the following formula, to obtain the foreground video with the background removed:
[0020]
[0021] Where I original I represents any original image in the video. foreground This represents the foreground image of the frame after the background has been removed.
[0022] S203. Generate mask image M through binarization thresholding. t The M t pixel values 255 is white, representing the area covered by the animal, and 0 is black, representing the background area.
[0023] Furthermore, in step S3, the target detection rectangles that select the mouse in all video frames are generated using the YOLOv11 target detection model. The output of the model is the coordinates of the top-left corner of the target detection rectangle in each frame. and the coordinates of the bottom right corner .
[0024] Furthermore, step S4 specifically includes:
[0025] S401. Calculate the coordinates of the center point of the target detection bounding box in each frame. :
[0026]
[0027] S402. Calculate the Euclidean distance d between the center points of the target detection bounding boxes in adjacent frames. t The calculation formula is as follows:
[0028]
[0029] Where W and H are the length and width of the experimental chamber, respectively, and the normalized coordinates are... Converted to actual physical distance;
[0030] S403, Calculate instantaneous velocity FPS is the video frame rate;
[0031] S404, Using the formula for calculating kinetic energy The displacement physical work done by the experimental mouse at each moment is calculated, i.e., the macroscopic displacement energy, where m is the mass of the experimental mouse.
[0032] Furthermore, step S5 specifically includes:
[0033] S501. Within the target detection bounding box of each frame, calculate the image mask M. t With M t-1 The total number of pixels that undergo state transitions between states is denoted as S(t);
[0034] S502, Time-domain signal preprocessing: The S(t) signal is detrended and filtered using a digital bandpass filter, wherein the lower cutoff frequency of the digital bandpass filter is f1 and the upper cutoff frequency is f2.
[0035] S503. Perform FFT (Fast Fourier Transform) on the filtered S(t) signal to calculate its power spectral density (PSD), which is a statistical result characterizing the energy distribution of the S(t) signal at each frequency component.
[0036] S504. Feature Quantization: Calculate the total energy of the S(t) signal within the frequency ranges f1 and f2, i.e., the energy characteristics of the microscopic movements of the experimental mouse. The calculation formula is as follows:
[0037]
[0038] In the formula, f is a dummy integration variable, used only for the mathematical description of the integration process and has no practical meaning; PSD(f) represents the power spectral density value at frequency f. Denotes the differential of f. This represents the integral between the power spectral densities of f1 and f2.
[0039] Furthermore, f1 = 1Hz and f2 = 15Hz.
[0040] Furthermore, in step S6, the energy consumption of the experimental mice at each time step is obtained through the gradient boosting tree (XGBoost) regression model:
[0041] For any time t, the eigenvector XGBoost output:
[0042]
[0043] in Both are binary classification and regression trees (CART), for each input feature vector x t Classification and regression trees classify x using several layers of rule-based binary classification logic. tCorresponding to a final output value Finally, by summing the output values of all classification and regression trees, the energy consumption y at time t is obtained. t .
[0044] Where K is the number of binary classification regression trees (CART) in the XGBoost model. More trees result in a more complex model, capable of fitting more complex patterns, but may reduce generalization ability. This invention chooses K=50; however, in practical applications, this number can be adjusted according to actual needs.
[0045] 'k' is a letter designation used to identify different CARTs and has no actual meaning.
[0046] The beneficial effects of this invention are as follows:
[0047] (i) Extremely high measurement accuracy, filling the static blind zone: Employing pixel frequency energy extraction technology based on foreground mask edge and texture jitter, the total number of pixels in the 0 / 255 state transition sequence S(t) within the mask is statistically analyzed. By introducing microscopic spectral energy of 1-15Hz, this invention can accurately identify and quantify the energy-consuming behaviors of animals in a static state (such as shivering, local tremors, local grooming, etc.). Experimental data show that in the animal's static phase, the method of this invention fills the gap in the microscopic motion energy consumption (average percentage of approximately 8%) missed by methods that rely solely on displacement calculation (i.e., only using step S4 and lacking step S5).
[0048] (II) Strong Robustness and Applicability: It does not rely on tracking local feature points such as the mouth and nose. Even in environments where animals overlap, curl up, or are unevenly lit, as long as the complete foreground mask can be extracted, physiological energy consumption can be reconstructed through global pixel fluctuations, solving the failure problem of existing technologies in complex breeding environments. It explicitly defines the extraction of a specific frequency band (1-15 Hz) of power spectral density (PSD) as the input for energy consumption mapping in video processing, enhancing anti-interference and robustness. This frequency band accurately covers the physiological tremor frequencies of rodents, while effectively filtering extremely low-frequency illumination drift noise and extremely high-frequency image sensor shot noise, ensuring data stability under complex experimental lighting conditions.
[0049] (III) The system adopts a feature fusion framework of macroscopic displacement and microscopic motion, and simultaneously calculates the kinematic acceleration features (macroscopic) and pixel-level jump features (microscopic) of the target. It is then mapped to metabolic energy consumption through XGBoost, achieving comprehensive coverage of the animal's energy consumption state. Whether the animal is running vigorously (displacement work is dominant) or feeding / resting in place (spectral energy is dominant), the system can output a high-precision continuous energy consumption curve.
[0050] (iv) Significant cost advantages: Successfully eliminating reliance on expensive infrared thermal imagers, achieving high correlation (R) with indirect thermal measurement systems (metabolic cages) using only ordinary laboratory RGB monitoring cameras. 2 > 0.85) Monitoring results.
[0051] (v) High throughput and non-invasiveness: It achieves true "zero interference" monitoring. Animals do not need to enter a closed metabolic cage or wear sensors. They can be continuously monitored 24 hours a day in a home cage, providing a more realistic physiological data benchmark for long-term drug efficacy evaluation. Attached Figure Description
[0052] Figure 1 This is a schematic diagram of the process of an embodiment of the present invention;
[0053] Figure 2 This is a graph showing the change in instantaneous energy consumption over time, calculated from a mouse activity video lasting approximately 20 seconds, as shown in this embodiment of the invention. Detailed Implementation
[0054] To better understand the above-mentioned objectives, features, and advantages of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0055] Figure 1 This invention illustrates a specific embodiment of the method for calculating the activity energy expenditure of laboratory mice based on behavior tracking, comprising the following steps:
[0056] S1. Experimental Data Acquisition: Measure the mass of the experimental mice, the length and width of the experimental box, place the experimental mice in the experimental box, and use a top-mounted camera to capture video of the mice's activities inside the experimental box.
[0057] S2. Foreground mask generation based on adaptive background subtraction, specifically including:
[0058] S201, Calculate the background reference image I background The background is estimated using the maximum value method, which involves taking the maximum value across a certain number of frames at the pixel level over time. This ensures that pixels with large white background values are represented, while the pixel intensity of black mice with small values is ignored. To avoid estimating the mice as background, the number of frames used for background estimation should be as large as possible. This ensures that for any given pixel, there is at least one frame where it is not covered by a mouse. However, the more frames there are, the greater the computational burden. Therefore, the number of video frames chosen is generally around 500.
[0059] S202. Calculate the difference intensity between each frame of the original video and the background, as shown in the following formula, to obtain the foreground video with the background removed:
[0060]
[0061] Where I original I represents any original image in the video. foreground This represents the foreground image of the frame after the background has been removed.
[0062] S203. Generate mask image M through binarization thresholding. t The M t pixel values 255 is white, representing the area covered by the animal, and 0 is black, representing the background area.
[0063] The mask image M generated after background subtraction t This will be used for subsequent analysis, facilitating computation and significantly improving the generalization ability of the object detection model in the second step. This is because the image scene after background removal is very simple, consisting only of black and white, which makes it possible to use it for various scenarios with only one training, greatly improving the ease of use of the algorithm.
[0064] S3. Behavior Tracking: Using existing mouse data, a YOLOv11 object detection model is trained to generate bounding boxes for the mice in all video frames, determining the real-time position of the experimental mice. The model output is the coordinates of the top-left corner of the bounding box in each frame. and the coordinates of the bottom right corner .
[0065] The YOLOv11 target detection model trained on the aforementioned mouse data is the model disclosed in the existing patent "Method and apparatus for determining physiological characteristics of experimental animals basedupon infrared and visible light images". This model uniformly labeled 3075 frames out of 435067 frames of data, selected 2537 frames (0.58%) as the training dataset and 538 frames as the validation dataset, set the learning rate to 0.000055, the batch size to 4, and the model training lasted for 60 epochs.
[0066] S4. Calculation of macroscopic displacement energy, specifically including:
[0067] S401. Based on the determination of the position of the experimental mouse at any given time in step S3, the coordinates of the upper left corner of the detection box output by the model are used to determine the position of the experimental mouse at any given time. and the coordinates of the bottom right corner Calculate the coordinates of the center point of the target detection bounding box in each frame. :
[0068]
[0069] S402. Calculate the Euclidean distance d between the center points of the target detection bounding boxes in adjacent frames. t The calculation formula is as follows:
[0070]
[0071] Where W and H are the length and width of the experimental chamber, respectively, and the normalized coordinates are... Converted to actual physical distance;
[0072] S403, Calculate instantaneous velocity FPS is the video frame rate;
[0073] S404, Using the formula for calculating kinetic energy Calculate the displacement physical work done by the experimental mouse at each moment, i.e., the macroscopic displacement energy. , where m is the mass of the experimental mouse.
[0074] S5. Microscopic spectral energy deconstruction, specifically including:
[0075] S501. Within the target detection bounding box of each frame, calculate the image mask M. t With M t-1 The total number of pixels that undergo state transitions (from 0 to 255 or from 255 to 0) is denoted as S(t). This signal reflects the visual fluctuations in the animal's body edges and surface texture caused by any minute movements.
[0076] S502, Time-domain signal preprocessing: The S(t) signal is detrended and filtered using a digital bandpass filter. The lower cutoff frequency of the digital bandpass filter is f1=1Hz and the upper cutoff frequency is f2=15Hz. The selection of this frequency band is based on the fact that the main frequencies of the animal's respiratory rate, limb tremors caused by grooming, and shivering fall within this range.
[0077] S503. Perform FFT (Fast Fourier Transform) on the filtered S(t) signal to calculate its power spectral density (PSD), which is a statistical result characterizing the energy distribution of the S(t) signal at each frequency component.
[0078] S504. Feature Quantization: Calculate the total energy of the S(t) signal within the frequency ranges f1 and f2, i.e., the energy characteristics of the microscopic movements of the experimental mouse. The calculation formula is as follows:
[0079]
[0080] In the formula, f is a dummy integration variable, used only for the mathematical description of the integration process and has no practical meaning; PSD(f) represents the power spectral density value at frequency f. Denotes the differential of f. This represents the integral between the power spectral densities of f1 and f2.
[0081] S6. Nonlinear mapping: This maps the macroscopic displacement energy at each moment. Energy characteristics of microscopic movements Feature fusion is performed to construct a binary feature vector. Finally, the binary feature vectors The data is input into the XGBoost gradient boosting tree of the regression model and co-mapped to obtain the energy consumption of the experimental mice at each time step.
[0082] The aforementioned gradient boosting tree XGBoost regression model is a prior art technique, publicly disclosed in the reference "Rahima, K., & Muhammad, H. (2024) YOLOv11: an Overview of the Key ArchitecturalEnhancements, Computing Research Repository, abs / 2410.17725".
[0083] Specifically, for the eigenvector at any time t XGBoost output:
[0084]
[0085] in Both are binary classification and regression trees (CART), for each input feature vector x t Classification and regression trees classify x using several layers of rule-based binary classification logic. t Corresponding to a final output value Finally, by summing the output values of all classification and regression trees, the energy consumption y at time t is obtained. t .
[0086] Where K is the number of binary classification regression trees (CART) in the XGBoost model, and in this embodiment, the number of trees is chosen to be K=50.
[0087] Figure 2 The diagram shows the change in instantaneous energy consumption over time calculated from a video of a mouse activity lasting approximately 20 seconds, as presented in this embodiment.
Claims
1. A method for calculating the energy expenditure of laboratory mice based on behavior tracking, characterized in that, Includes the following steps: S1. Experimental data collection: Measure the mass of the experimental mice, the length and width of the experimental box, put the experimental mice into the experimental box, and use a top-mounted camera to take a video of the mice's activities inside the experimental box. S2. Foreground mask generation based on adaptive background subtraction: Obtain the mask image M after background subtraction. t ; S3. Behavior Tracking: Generate target detection rectangles for mice in all video frames to determine the real-time position of the experimental mice; S4. Calculation of Macroscopic Displacement Energy: The instantaneous velocity of the experimental mouse is calculated using its real-time position. Then, the displacement work done by the mouse at each instant is calculated to obtain the macroscopic displacement energy of the mouse at each instant during its movement. ; S5. Microscopic Spectral Energy Deconstruction: Extract the pixel time change rate as S(t), and then process S(t) within a preset frequency range to obtain the energy characteristics of the experimental mouse's microscopic movements. ; S6. Nonlinear mapping: This maps the macroscopic displacement energy at each moment. Energy characteristics of microscopic movements Feature fusion is performed to construct a binary feature vector. Finally, the binary feature vectors The data is input into the XGBoost gradient boosting tree of the regression model and co-mapped to obtain the energy consumption of the experimental mice at each time step.
2. The method for calculating the energy expenditure of experimental mice based on behavior tracking according to claim 1, characterized in that, Step S2 is as follows: S201, Calculate the background reference image I background The background is estimated by taking the maximum value method, which means taking the maximum value at the pixel level across time for a certain number of frames, so that the pixels with large pixel values are represented by white background pixels, while the pixel intensity of black mouse pixels with small pixel values is ignored. S202. Calculate the difference intensity between each frame of the original video and the background, as shown in the following formula, to obtain the foreground video with the background removed: Where I original I represents any original image in the video. foreground This represents the foreground image of the frame after the background has been removed. S203. Generate mask image M through binarization thresholding. t The M t pixel values 255 is white, representing the area covered by the animal, and 0 is black, representing the background area.
3. The method for calculating the energy expenditure of experimental mice based on behavior tracking according to claim 1, characterized in that: In step S3, the target detection rectangles that select the mouse are generated for all video frames using the YOLOv11 target detection model. The model output is the coordinates of the top-left corner of the target detection rectangle in each frame. and the coordinates of the bottom right corner .
4. The method for calculating the energy expenditure of experimental mice based on behavior tracking according to claim 3, characterized in that, Step S4 is as follows: S401. Calculate the coordinates of the center point of the target detection bounding box in each frame. : S402. Calculate the Euclidean distance d between the center points of the target detection bounding boxes in adjacent frames. t The calculation formula is as follows: Where W and H are the length and width of the experimental chamber, respectively, and the normalized coordinates are... Converted to actual physical distance; S403, Calculate instantaneous velocity FPS is the video frame rate; S404, Using the formula for calculating kinetic energy The displacement physical work done by the experimental mouse at each moment is calculated, i.e., the macroscopic displacement energy, where m is the mass of the experimental mouse.
5. The method for calculating the energy expenditure of experimental mice based on behavior tracking according to claim 1, characterized in that, Step S5 is as follows: S501. Within the target detection bounding box of each frame, calculate the image mask M. t With M t-1 The total number of pixels that undergo state transitions between states is denoted as S(t); S502, Time-domain signal preprocessing: The S(t) signal is detrended and filtered using a digital bandpass filter, wherein the lower cutoff frequency of the digital bandpass filter is f1 and the upper cutoff frequency is f2. S503. Perform FFT (Fast Fourier Transform) on the filtered S(t) signal and calculate its power spectral density (PSD) to characterize the statistical results of the energy distribution of the S(t) signal at each frequency component. S504. Feature Quantization: Calculate the total energy of the S(t) signal within the frequency ranges f1 and f2, i.e., the energy characteristics of the microscopic movements of the experimental mouse. The calculation formula is as follows: In the formula, f is a dummy integration variable, used only for the mathematical description of the integration process and has no practical meaning; PSD(f) represents the power spectral density value at frequency f. Denotes the differential of f. This represents the integral between the power spectral densities of f1 and f2.
6. The method for calculating the energy expenditure of experimental mice based on behavior tracking according to claim 5, characterized in that: f1 = 1Hz, and f2 = 15Hz.
7. The method for calculating the energy expenditure of experimental mice based on behavior tracking according to claim 1, characterized in that, In step S6, the energy consumption of the experimental mice at each time step is obtained through the XGBoost regression model: For any time t, the eigenvector XGBoost output: in Both are binary classification and regression trees (CART), for each input feature vector x t Classification and regression trees classify x using several layers of rule-based binary classification logic. t Corresponding to a final output value Finally, by summing the output values of all classification and regression trees, the energy consumption y at time t is obtained. t , where K is the number of binary classification regression trees (CARTs) in the XGBoost model.