Pig health assessment analysis method and system based on image recognition
By using an image recognition-based method for assessing pig health, the physiological rhythm characteristics of pigs are automatically extracted and a comprehensive health score is calculated. This solves the problems of low efficiency in traditional manual monitoring and lack of comprehensive analysis in existing technologies, and realizes intelligent assessment and early warning of pig health status.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-03-05
- Publication Date
- 2026-04-03
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional pig health monitoring relies on manual inspections, which is inefficient and difficult to achieve 24/7 monitoring. Existing image recognition-based methods lack comprehensive analysis of the physiological rhythm characteristics of pigs, making it difficult to achieve accurate early warning of health abnormalities.
By capturing image sequences of pigs using a top-down camera, the system automatically determines their movement status, extracts physiological rhythm features, and calculates a comprehensive health score based on a deviation fusion strategy, thereby enabling intelligent assessment and early warning of pig health status.
It enables non-contact monitoring of pig health, timely detection of health risks and tiered early warning, supporting precise management of large-scale farms.
Smart Images

Figure CN121789293A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of smart animal husbandry technology, specifically relating to a method and system for assessing and analyzing the health of pigs based on image recognition. Background Technology
[0002] Traditional swine health monitoring mainly relies on manual inspections, with farmers making judgments by observing the pigs' mental state, feeding behavior, and physical characteristics. However, manual monitoring has limitations such as strong subjectivity, low efficiency, and difficulty in achieving 24 / 7 monitoring. Especially in large-scale farms, it is difficult to conduct timely and effective health assessments for each pig.
[0003] With the development of computer vision and artificial intelligence technologies, image recognition-based pig monitoring technology has gradually become a research hotspot. Existing technologies mainly focus on pig weight estimation, behavior recognition, and individual identification. For example, deep learning models are used to analyze pig behaviors such as standing, lying down, and eating, or 3D imaging technology is used to estimate weight. However, these methods often require complex hardware equipment or a large amount of labeled data, and they tend to focus on single indicators, lacking a comprehensive analysis of the physiological rhythm characteristics of pigs, making it difficult to achieve accurate early warning of health abnormalities. The physiological rhythm characteristics of pigs, such as respiratory rate, respiratory regularity, tail wagging frequency, and head movement frequency, are important indicators reflecting their health status. Healthy pigs breathe steadily and regularly, their tails wag naturally, and their head movements are normal. When pigs show signs of disease, they often exhibit abnormalities such as rapid or irregular breathing, drooping or stiff tails, and reduced head movement.
[0004] Therefore, there is an urgent need for a non-contact monitoring method that can automatically extract the physiological rhythm characteristics of pigs and comprehensively assess their health status in order to achieve intelligent health management in large-scale farms. Summary of the Invention
[0005] To address the aforementioned problems in existing technologies, this invention provides a method and system for assessing and analyzing the health of pigs based on image recognition. By acquiring a sequence of images of pigs using a top-down camera, the system automatically determines the pigs' movement status, extracts corresponding physiological rhythm features for different statuses, and calculates a comprehensive health score based on a deviation fusion strategy, thereby achieving intelligent assessment and early warning of the pigs' health status.
[0006] The specific technical solution is as follows: In a first aspect, the present invention provides a method for assessing and analyzing the health of pigs based on image recognition, the method comprising the following steps: S1. An overhead camera is installed above the pigsty to capture a continuous sequence of images of the pigs. The images are then preprocessed to grayscale. The motion state of the continuous image sequence is analyzed to determine whether the pigs are currently sleeping or standing based on the intensity of the motion.
[0007] S2, extract physiological rhythm features. When the pig is sleeping, locate the abdominal region and extract respiratory frequency and respiratory regularity indicators based on the temporal grayscale changes of the abdominal region. When the pig is standing, determine the tail region and head region based on the head and tail direction, and extract the tail swing frequency and head movement frequency respectively.
[0008] S3 compares the extracted physiological rhythm features with the preset health benchmark, calculates the deviation of each feature, selects the corresponding deviation fusion strategy according to the current state, calculates the comprehensive health score, and determines the health status of the pig.
[0009] Furthermore, motion state analysis of the continuous image sequence includes: The background subtraction method was used to detect individual pigs and obtain the area where the pigs were located. ; Calculate the average motion intensity of the pig region between adjacent frames. : ;in, This represents the number of pixels in the pig area. For the first Frame grayscale image pixel coordinates The grayscale value at that location; Calculate the average motion intensity of the entire image sequence ,according to Exercise intensity threshold during sleep and standing motion intensity threshold The comparison determines the state; when When it is determined to be a sleep state, When it is determined to be a standing state; when The pigs are considered to be in a transitional state and no health assessment is conducted.
[0010] Furthermore, when pigs are in a sleep state, the extraction of respiratory rate and respiratory regularity indicators specifically includes: Localize individual pigs in a sleeping state to obtain bounding boxes. ,in, This represents the coordinates of the top-left corner of the bounding box, located at the top-left corner of the image. The X-axis is positive to the right, and the Y-axis is positive downwards. and The bounding box width and height are given in the sleep state, and the abdominal region is divided based on the top-view anatomical proportions. : ; Extract the average grayscale value of each frame in the abdominal region to construct the respiratory signal. : ; After the respiratory signal is subjected to mean removal and bandpass filtering, the dominant frequency is extracted as the respiratory rate using fast Fourier transform. Detect the peak points of respiratory signals and calculate the coefficient of variation of the time interval between adjacent peaks as an indicator of respiratory regularity. : ;in, The mean of the peak intervals. The standard deviation of the peak interval. The smaller the value, the more regular the breathing.
[0011] Furthermore, determining the tail region and head region based on the head-to-tail direction includes: The standing pigs are located to obtain their standing bounding boxes. ,in, The coordinates of the top left corner of the bounding box in the standing state. and These represent the width and height of the bounding box in the standing state, respectively. Divide the bounding box into a front and a back region along the major axis, and calculate the average width of the front and back regions respectively. and ;like If the front end is in the head direction, then the back end is in the head direction; otherwise, the back end is in the head direction. The head and tail direction markers are determined based on the judgment results. ,in It indicates that the head is facing the correct direction. It indicates that the head is facing the opposite direction.
[0012] Furthermore, based on the head-to-tail direction marker θ, the tail region is divided according to the top-view anatomical proportions. and head area ; when hour: ; ; when hour: ; ; Calculate the motion intensity between adjacent frames in the tail region and head region respectively to construct the tail motion signal. and head movement signals : ; ; After removing the mean from the motion signal, the main frequencies are extracted as tail swing frequencies using Fast Fourier Transform. and head movement frequency .
[0013] Furthermore, the preset health benchmark uses a sample of multiple healthy pigs, extracting various physiological rhythm features in both sleep and standing states, and calculating the health benchmark mean and standard deviation for each feature. The sample of healthy pigs is no less than 200. The baseline health values and standard deviations for each characteristic include: the baseline health value for respiratory rate during sleep. and standard deviation Health baseline mean of respiratory regularity indicators and standard deviation The healthy baseline mean of tail wagging frequency while standing. and standard deviation The health baseline mean of head movement frequency and standard deviation .
[0014] Furthermore, during sleep, the deviation of respiratory rate... Deviation in breathing regularity ; Deviation in tail wagging frequency while standing Deviation in head movement frequency .
[0015] Furthermore, the comprehensive health score calculation specifically includes: Comprehensive health score during sleep The calculation formula is: ; in, As a weight for respiratory rate, it is set to 0.4. As a weight for the regularity of breathing, it is set to 0.6; Overall health score while standing The calculation formula is: ; in, As the weight of tail wagging, Weighting of head activity. ; Overall Health Score The range of values is , A higher value indicates better health.
[0016] Furthermore, based on the comprehensive health score The health status of individual pigs is qualitatively assessed, and corresponding health signals are sent. when When the pig is in a normal health condition, a health signal is sent to the farm management terminal; when When this occurs, it indicates that the individual pig's health condition is at risk, and a risk signal is sent to the breeding management end, requiring close monitoring by the breeding personnel; when At that time, a disease warning signal is sent to the breeding management terminal.
[0017] Secondly, the present invention provides a pig health assessment and analysis system based on image recognition to implement the method of the first aspect. The system includes: an image acquisition module, a status determination module, a feature extraction module, a deviation calculation module, and a health assessment module.
[0018] The image acquisition module includes a top-down camera installed directly above the pigsty, used to acquire continuous image sequences of pigs and perform grayscale preprocessing.
[0019] The state determination module is used to determine whether the pig is currently sleeping or standing based on the intensity of its exercise.
[0020] Furthermore, the feature extraction module includes: a sleep state feature extraction unit, used to locate the abdominal region and extract respiratory rate and respiratory regularity indicators; and a standing state feature extraction unit, used to determine the head and tail direction, locate the tail region and head region, and extract the tail wagging frequency and head movement frequency.
[0021] The deviation calculation module is used to compare the extracted physiological rhythm features with a health benchmark and calculate the deviation of each feature.
[0022] The health assessment module is used to integrate various deviations to calculate a comprehensive health score, determine the health status, and output the assessment results.
[0023] Compared with the prior art, the beneficial effects of this invention are: This invention automatically extracts the physiological rhythm characteristics of pigs in sleep and standing states from top-down images, achieving non-contact health monitoring and avoiding the stress caused by traditional contact sensors. The invention employs a one-way deviation calculation strategy: deviations in respiratory regularity are penalized only for outliers exceeding the baseline, while deviations in tail wagging and head movement are penalized only for outliers below the baseline, consistent with the physiological pattern that disease exacerbates respiratory disturbances and reduces activity. The comprehensive scoring model based on the Gaussian decay function has good discrimination and sensitivity, enabling timely detection of health risks and tiered early warnings, providing technical support for precision management in large-scale farms. Attached Figure Description
[0024] Figure 1 This is a flowchart of the image recognition-based pig health assessment and analysis method of the present invention; Figure 2This is a schematic diagram of the components of the image recognition-based pig health assessment and analysis system of the present invention. Detailed Implementation
[0025] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention are described clearly and completely below. Obviously, the described embodiments are only a part of the embodiments of this invention, not all of them. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.
[0026] The technical solution of the present invention will be described in detail below with reference to specific embodiments.
[0027] Example 1: As Figure 1 The diagram shown is a flowchart of the image recognition-based pig health assessment and analysis method of the present invention, characterized in that the method includes the following steps: S1. An overhead camera is installed above the pigsty to capture a continuous sequence of images of the pigs. The images are then preprocessed to grayscale. The motion state of the continuous image sequence is analyzed to determine whether the pigs are currently sleeping or standing based on the intensity of the motion.
[0028] Motion state analysis of the continuous image sequence includes: detecting individual pigs using background subtraction to obtain the region where the pigs are located. ; Calculate the average motion intensity of the pig region between adjacent frames. : ;in, This represents the number of pixels in the pig area. For the first Frame grayscale image pixel coordinates The grayscale value at that location.
[0029] Calculate the average motion intensity of the entire image sequence ,according to Exercise intensity threshold during sleep and standing motion intensity threshold The comparison determines the state; when When it is determined to be a sleep state, When it is determined to be a standing state; when The pigs are considered to be in a transitional state and no health assessment is conducted.
[0030] In this embodiment, the exercise intensity threshold during sleep is... and standing motion intensity threshold The determination is based on the following principles: According to a large number of experimental observations, the inter-frame grayscale changes of healthy pigs in the sleep state mainly come from the abdominal undulation caused by breathing, and the average movement intensity is usually less than 5 gray levels; while in the standing state, due to limb movement and position changes, the average movement intensity is usually higher than 15 gray levels.
[0031] Therefore, in this embodiment The value is 5. The value is 15; the exercise intensity between the two values corresponds to the pigs in transitional actions such as getting up and lying down. At this time, the physiological rhythm characteristics are unstable, so no health assessment is performed; this threshold setting can be adjusted according to the actual camera parameters and ambient lighting conditions.
[0032] S2, extract physiological rhythm features. When the pig is sleeping, locate the abdominal region and extract respiratory frequency and respiratory regularity indicators based on the temporal grayscale changes of the abdominal region. When the pig is standing, determine the tail region and head region based on the head and tail direction, and extract the tail swing frequency and head movement frequency respectively.
[0033] When pigs are in a sleep state, the extraction of respiratory rate and respiratory regularity indicators specifically includes: Localize individual pigs in a sleeping state to obtain bounding boxes. ,in, This represents the coordinates of the top-left corner of the bounding box, located at the top-left corner of the image. The X-axis is positive to the right, and the Y-axis is positive downwards. and The bounding box width and height are given in the sleep state, and the abdominal region is divided based on the top-view anatomical proportions. : .
[0034] Extract the average grayscale value of each frame in the abdominal region to construct the respiratory signal. : .
[0035] After the respiratory signal is subjected to mean removal and bandpass filtering, the dominant frequency is extracted as the respiratory rate using fast Fourier transform. Detect the peak points of respiratory signals and calculate the coefficient of variation of the time interval between adjacent peaks as an indicator of respiratory regularity. : ;in, The mean of the peak intervals. The standard deviation of the peak interval. The smaller the value, the more regular the breathing.
[0036] Viewed from above, a pig's body is oval-shaped when lying down, with the abdomen located slightly behind the middle of the body. According to swine anatomy studies, the abdomen accounts for approximately 40% of the body length, falling within the 30%-70% range; and approximately 30% of the body width, falling within the 35%-65% range. This area effectively captures the abdominal undulations caused by diaphragmatic movement, while avoiding interference from the head, limbs, and other congested areas.
[0037] When bandpass filtering the respiratory signal, the passband frequency range of the filter is set to 0.1Hz-1.0Hz, because the normal respiratory rate of a healthy adult pig is 10-30 breaths per minute, or 0.17Hz-0.5Hz. Considering that breathing may be faster or slower in disease states, the passband range is appropriately extended to 0.1Hz-1.0Hz to cover a respiratory rate range of 6-60 breaths per minute. Bandpass filtering can effectively filter out DC components, high-frequency noise, and low-frequency drift introduced by factors such as changes in light intensity, extracting pure respiratory signal components.
[0038] The head and tail regions are determined based on their orientation. Along the major axis of the bounding box, the average width at the head end is significantly greater than that at the tail end. By comparing the average widths of the front and rear ends, the head and tail orientation can be accurately determined.
[0039] The standing pigs are located to obtain their standing bounding boxes. ,in, The coordinates of the top left corner of the bounding box in the standing state. and These represent the width and height of the bounding box in the standing state, respectively. Divide the bounding box into a front and a back region along the major axis, and calculate the average width of the front and back regions respectively. and ;like If the front end is in the head direction, then the back end is in the head direction; otherwise, the back end is in the head direction. The head and tail direction markers are determined based on the judgment results. ,in It indicates that the head is facing the correct direction. It indicates that the head is facing the opposite direction.
[0040] According to the head and tail direction markings The tail region is divided based on the top-view anatomical proportions. and head area ; when hour: ; ; when hour: ; ; Calculate the motion intensity between adjacent frames in the tail region and head region respectively to construct the tail motion signal. and head movement signals : ; ; After removing the mean from the motion signal, the main frequencies are extracted as tail swing frequencies using Fast Fourier Transform. and head movement frequency .
[0041] The tail region accounts for the front 18% or rear 18% of the body length and is located in the 35%-65% range of body width. This region covers the main range of motion from the tail root to the tail tip. The head region accounts for the front 25% or rear 25% of the body length and is located in the 20%-80% range of body width. This region covers the main range of motion of the head.
[0042] S3 compares the extracted physiological rhythm features with the preset health benchmark, calculates the deviation of each feature, selects the corresponding deviation fusion strategy according to the current state, calculates the comprehensive health score, and determines the health status of the pig.
[0043] The preset health benchmark uses a sample of multiple healthy pigs. Various physiological rhythm features are extracted in both sleep and standing states. The mean and standard deviation of each feature are calculated. The number of healthy pigs in the sample is no less than 200. The baseline health values and standard deviations for each characteristic include: the baseline health value for respiratory rate during sleep. and standard deviation Health baseline mean of respiratory regularity indicators and standard deviation The healthy baseline mean of tail wagging frequency while standing. and standard deviation The health baseline mean of head movement frequency and standard deviation .
[0044] Deviation of respiratory rate during sleep Deviation in breathing regularity ; Deviation in tail wagging frequency while standing Deviation in head movement frequency .
[0045] This invention employs a one-way deviation calculation strategy. This one-way deviation design aligns with the general physiological pattern that diseases exacerbate respiratory disturbances and reduce activity levels. The physiological basis for this is as follows: For respiratory regularity indicators A higher value indicates more irregular breathing. Healthy pigs have a stable respiratory rhythm. The value is low; when pigs exhibit respiratory diseases or abnormalities such as fever, their respiratory rhythm becomes disordered. The value increased.
[0046] Therefore, deviation from respiratory regularity Only outliers above the baseline are penalized, i.e., when... A level below the healthy baseline is not considered abnormal.
[0047] Tail wagging frequency and head movement frequency Healthy pigs exhibit normal spontaneous activity at a certain frequency; when pigs are sick or unwell, their activity level decreases and the frequency drops.
[0048] Therefore, the deviation between tail wagging and head movement and Only outliers below the baseline are penalized; that is, when the measured frequency is higher than the healthy baseline, it is not considered an anomaly.
[0049] The comprehensive health score calculation specifically includes: the comprehensive health score during sleep. The calculation formula is: ;in, As a weight for respiratory rate, it is set to 0.4. The weight for respiratory regularity is set to 0.6.
[0050] Overall health score while standing The calculation formula is: ;in, As the weight of tail wagging, For head activity weights, satisfy Comprehensive health score The range of values is , A higher value indicates better health.
[0051] Based on comprehensive health score The health status of individual pigs is qualitatively assessed, and corresponding health signals are sent. When the weighted deviation is approximately 0.67 standard deviations, the score is approximately 80 points; when the weighted deviation is approximately 1.0 standard deviation, the score is approximately 60 points. This means... Corresponding physiological rhythm characteristics at the health benchmark Within the range, this is considered normal fluctuation. Corresponding feature deviation at Within this range, there is a slight risk of abnormality; Corresponding feature deviation exceeds This requires close attention or intervention.
[0052] when When the pig is in a normal health condition, a health signal is sent to the farm management terminal; when When this occurs, it indicates that the individual pig's health condition is at risk, and a risk signal is sent to the breeding management end, requiring close monitoring by the breeding personnel; when At that time, a disease warning signal is sent to the breeding management terminal.
[0053] Example 2: As Figure 2 The diagram shows the composition of a pig health assessment and analysis system based on image recognition. The system includes an image acquisition module, a state determination module, a feature extraction module, a deviation calculation module, and a health assessment module. These modules are connected in sequence. The feature extraction module includes a sleep state feature extraction unit and a standing state feature extraction unit.
[0054] The system in this embodiment adopts a modular architecture design, with each module communicating through standardized data interfaces, exhibiting good scalability and maintainability. The system can be deployed on edge computing nodes in a livestock farm or on a cloud server, supporting parallel processing of multiple video streams.
[0055] The image acquisition module includes a top-down camera installed directly above the pigsty, used to acquire continuous image sequences of pigs and perform grayscale preprocessing.
[0056] The overhead camera of the image acquisition module should be installed at a height of 2.5-3.5 meters, and its field of view should cover the entire pen area; the camera resolution should be no less than 1920×1080 pixels, and the frame rate should be set to 15-30fps to ensure that it can capture the subtle physiological movements of the pigs.
[0057] The state determination module is used to determine whether the pig is currently sleeping or standing based on the intensity of its exercise.
[0058] The feature extraction module includes: a sleep state feature extraction unit, used to locate the abdominal region and extract respiratory rate and respiratory regularity indicators; and a standing state feature extraction unit, used to determine the head and tail direction, locate the tail region and head region, and extract the tail wagging frequency and head movement frequency.
[0059] The deviation calculation module is used to compare the extracted physiological rhythm features with a health benchmark and calculate the deviation of each feature.
[0060] The health assessment module is used to integrate various deviations to calculate a comprehensive health score, determine the health status, and output the assessment results.
[0061] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for assessing and analyzing the health of pigs based on image recognition, characterized in that, The method includes the following steps: S1. An overhead camera is installed above the pigsty to capture a continuous sequence of images of the pigs. The images are then preprocessed to grayscale. The motion state of the continuous image sequence is analyzed, and the pigs are determined to be either sleeping or standing based on the intensity of the motion. S2, extract physiological rhythm features. When the pig is sleeping, locate the abdominal region and extract respiratory frequency and respiratory regularity indicators based on the temporal grayscale changes of the abdominal region. When the pig is standing, determine the tail region and head region based on the head and tail direction, and extract the tail swing frequency and head movement frequency respectively. S3 compares the extracted physiological rhythm features with the preset health benchmark, calculates the deviation of each feature, selects the corresponding deviation fusion strategy according to the current state, calculates the comprehensive health score, and determines the health status of the pig.
2. The method according to claim 1, characterized in that, Motion state analysis of the continuous image sequence includes: The background subtraction method was used to detect individual pigs and obtain the area where the pigs were located. ; Calculate the average motion intensity of the pig region between adjacent frames. : ;in, This represents the number of pixels in the pig area. For the first Frame grayscale image pixel coordinates The grayscale value at that location; Calculate the average motion intensity of the entire image sequence ,according to Exercise intensity threshold during sleep and standing motion intensity threshold The comparison determines the state; when When it is determined to be a sleep state, When it is determined to be a standing state; when The pigs are considered to be in a transitional state and no health assessment is conducted.
3. The method according to claim 2, characterized in that, When pigs are in a sleep state, the extraction of respiratory rate and respiratory regularity indicators specifically includes: Localize individual pigs in a sleeping state to obtain bounding boxes. ,in, This represents the coordinates of the top-left corner of the bounding box, located at the top-left corner of the image. The X-axis is positive to the right, and the Y-axis is positive downwards. and The bounding box width and height are given in the sleep state, and the abdominal region is divided based on the top-view anatomical proportions. : ; Extract the average grayscale value of each frame in the abdominal region to construct the respiratory signal. : ; After the respiratory signal is subjected to mean removal and bandpass filtering, the dominant frequency is extracted as the respiratory rate using fast Fourier transform. Detect the peak points of respiratory signals and calculate the coefficient of variation of the time interval between adjacent peaks as an indicator of respiratory regularity. : ;in, The mean of the peak intervals. The standard deviation of the peak interval. The smaller the value, the more regular the breathing.
4. The method according to claim 3, characterized in that, The determination of the tail region and head region based on the head-to-tail direction includes: The standing pigs are located to obtain their standing bounding boxes. ,in, The coordinates of the top left corner of the bounding box in the standing state. and These represent the width and height of the bounding box in the standing state, respectively. Divide the bounding box into a front and a back region along the major axis, and calculate the average width of the front and back regions respectively. and ;like If the front end is in the head direction, then the back end is in the head direction; otherwise, the back end is in the head direction. The head and tail direction markers are determined based on the judgment results. ,in It indicates that the head is facing the correct direction. It indicates that the head is facing the opposite direction.
5. The method according to claim 4, characterized in that, The tail region is divided based on the head-to-tail orientation marker θ and the top-view anatomical proportions. and head area ; when hour: ; ; when hour: ; ; Calculate the motion intensity between adjacent frames in the tail region and head region respectively to construct the tail motion signal. and head movement signals : ; ; After removing the mean from the motion signal, the main frequencies are extracted as tail swing frequencies using Fast Fourier Transform. and head movement frequency .
6. The method according to claim 5, characterized in that, The preset health benchmark uses a sample of multiple healthy pigs. Various physiological rhythm features are extracted in both sleep and standing states. The mean and standard deviation of each feature are calculated. The number of healthy pigs in the sample is no less than 200. The baseline health values and standard deviations for each characteristic include: the baseline health value for respiratory rate during sleep. and standard deviation Health baseline mean of respiratory regularity indicators and standard deviation The healthy baseline mean of tail wagging frequency while standing. and standard deviation The health baseline mean of head movement frequency and standard deviation .
7. The method according to claim 5, characterized in that, Deviation of respiratory rate during sleep Deviation in breathing regularity ; Deviation in tail wagging frequency while standing Deviation in head movement frequency .
8. The method according to claim 7, characterized in that, The comprehensive health score calculation specifically includes: Comprehensive health score during sleep The calculation formula is: ; in, As a weight for respiratory rate, it is set to 0.
4. As a weight for the regularity of breathing, it is set to 0.6; Overall health score while standing The calculation formula is: ; in, As the weight of tail wagging, Weighting of head activity. ; Overall Health Score The range of values is , A higher value indicates better health.
9. The method according to claim 8, characterized in that, Based on comprehensive health score The health status of individual pigs is qualitatively assessed, and corresponding health signals are sent. when When the pig is in a normal health condition, a health signal is sent to the farm management terminal; when When this occurs, it indicates that the individual pig's health condition is at risk, and a risk signal is sent to the breeding management end, requiring close monitoring by the breeding personnel; when At that time, a disease warning signal is sent to the breeding management terminal.
10. A pig health assessment and analysis system based on image recognition, used to perform the method according to any one of claims 1-9, characterized in that, The system includes: an image acquisition module, a status determination module, a feature extraction module, a deviation calculation module, and a health assessment module; The image acquisition module includes a top-down camera installed directly above the pigsty, used to acquire continuous image sequences of pigs and perform grayscale preprocessing. The state determination module is used to determine whether the pig is currently sleeping or standing based on the intensity of its movement. The feature extraction module includes: a sleep state feature extraction unit, used to locate the abdominal region and extract respiratory rate and respiratory regularity indicators; and a standing state feature extraction unit, used to determine the head and tail direction, locate the tail region and head region, and extract the tail wagging frequency and head movement frequency. The deviation calculation module is used to compare the extracted physiological rhythm features with a health benchmark and calculate the deviation of each feature. The health assessment module is used to integrate various deviations to calculate a comprehensive health score, determine the health status, and output the assessment results.