Livestock and poultry individual health intelligent diagnosis system based on machine vision and deep learning
Patent Information
- Application Number
- CN202611020286.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-09
- Publication Date
- 2026-09-25
AI Technical Summary
[0004]为解决上述背景技术中提出的问题,本发明提供了基于机器视觉与深度学习的畜禽个体健康智能诊断系统,以解决亚临床期渐变趋势的早期识不准确的问题
本发明提供的基于机器视觉与深度学习的畜禽个体健康智能诊断系统,通过连续成长阶段估计模块输出平滑的阶段隶属度向量,将个体发育进程量化为各阶段的连续隶属度值,使健康诊断能够适应个体间的生长速度差异。阶段健康联合渐变模块存储了各成长阶段下健康个体从完全健康状态出发的健康指标典型演化轨迹,健康特征渐变追踪模块计算实际健康渐变轨迹及其变化率和加速度。阶段自适应偏离检测模块将实际轨迹与依据阶段隶属度向量组合得到的期望轨迹进行比较,计算偏离程度,并判断是否超过由各阶段容忍阈值聚合而成的综合容忍阈值。该机制使得系统能够在健康评分尚未跌破常规阈值时,通过检测渐变轨迹与阶段正常模式的偏离而发出预警,有助于提前发现健康风险。同时,由于不同成长阶段具有不同的健康渐变正常模式和容忍阈值,系统能够自动调整诊断灵敏度,减少因阶段差异导致的误报或漏报。健康诊断输出模块进一步提供异常体征在特征维度上的定位信息,增强了诊断结果的可解释性,便于养殖人员采取针对性干预措施。
Smart Images

Figure CN122822342A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of livestock and poultry health diagnosis technology, specifically an intelligent diagnosis system for individual livestock and poultry health based on machine vision and deep learning. Background Technology
[0002] Machine vision-based livestock and poultry health monitoring technology has seen widespread research and application. Existing systems typically acquire images of individual livestock and poultry through cameras, utilizing image processing and deep learning models to extract individual identification features and health-related visual characteristics, such as body shape, coat texture, and posture key points. By analyzing the static values or time-series changes of these features, the system can assess the individual's health status and issue an alarm when health indicators fall below preset thresholds. Some systems have also introduced multimodal data fusion strategies, combining visual information with data such as sound and body temperature for comprehensive judgment. Furthermore, some research focuses on individual identification and tracking of livestock and poultry, achieving contactless identification through facial features or body markings, providing an individual-level data recording foundation for health monitoring.
[0003] Regarding the timeliness of health diagnosis, existing methods mostly rely on comparing absolute values of health indicators with fixed thresholds. In the process of livestock and poultry gradually transitioning from a healthy state to a diseased state, the subtle changes in the subclinical phase may not yet have accumulated to the threshold. Therefore, there is still room for research on how to achieve earlier trend identification. Regarding growth stage adaptability, livestock and poultry exhibit different physiological characteristics and health indicator fluctuation patterns at different growth stages. The correlation between existing health assessment standards and growth stages still requires further exploration. How to integrate information about an individual's growth stage into the dynamic analysis of the gradual health transition process to achieve early trend warning with stage adaptability is a direction of ongoing interest for those skilled in the art. Summary of the Invention
[0004] To address the problems mentioned in the background art, the present invention provides an intelligent diagnostic system for individual livestock and poultry health based on machine vision and deep learning, in order to solve the problem of inaccurate early identification of subclinical gradual trends.
[0005] To achieve the above objectives, the present invention provides the following technical solution: an intelligent diagnostic system for individual livestock and poultry health based on machine vision and deep learning, comprising an individual visual feature extraction module for extracting individual identity feature vectors and health-related visual feature vectors from continuously acquired image sequences, and further comprising: The continuous growth stage estimation module is used to obtain the historical sequence of the same individual based on the individual identity feature vector, extract the current morphological parameters, match the morphological parameters with the typical morphological templates of each growth stage, and output the stage membership vector in combination with the age information. The stage membership vector contains the continuous membership values of each stage. The health feature gradient tracking module is used to calculate the actual health gradient trajectory and its first and second derivatives based on the historical sequence of health-related visual features. A stage-based health transition module is used to store normal health transition patterns at each growth stage, which describe the typical trajectory of a healthy individual's deviation over time. The stage adaptive deviation detection module is used to combine the healthy gradual normalization patterns of each growth stage into the expected gradual trajectory based on the stage membership vector, compare the actual and expected trajectories to calculate the degree of deviation, and determine whether the degree of deviation exceeds the comprehensive tolerance threshold obtained by aggregating the tolerance thresholds of each stage according to the stage membership. The health diagnosis output module is used to output health risk scores, abnormal signs location, and early warning signals based on the degree of deviation.
[0006] Optionally, the continuous growth stage estimation module includes: The first time-series processing unit is used to calculate the instantaneous change in stage membership degree based on the short-term historical sequence of morphological parameters. The second time-series processing unit is used to calculate the baseline value of the stage membership degree based on the long-term historical sequence of morphological parameters. After superimposing the instantaneous change with the baseline value, the result is adjusted to a form where the sum of all membership values is always 1, and the stage membership vector is output.
[0007] Optionally, the membership values in the stage membership vector change continuously over time, and the sum of all membership values is always 1.
[0008] Optionally, the health-gradual-to-normal pattern is a time-series generation model, represented as follows: Where t is a time variable in days, k is a stage index, and τ is the evolution duration from a fully healthy state. The time-series generation model is trained based on historical data of healthy individuals.
[0009] Optionally, the stage-adaptive deviation detection module uses a stage-adaptive weight matrix W to calculate the degree of deviation. The diagonal elements of the weight matrix W are set according to the sensitivity of the growth stage to each health characteristic dimension.
[0010] Optionally, the comprehensive tolerance threshold includes a cumulative deviation tolerance threshold and a deviation change rate tolerance threshold. When the cumulative amount of deviation exceeds the cumulative deviation tolerance threshold or the deviation change rate exceeds the deviation change rate tolerance threshold, an early warning signal is triggered.
[0011] Optionally, the health-related visual feature vector includes body shape contour parameters, coat color and texture features, posture key point coordinates, and periorbital state features.
[0012] Optionally, the health diagnosis output module includes: The abnormal sign localization unit is used to output the health feature dimension with the largest deviation as the abnormal sign localization result based on the component of the deviation degree in each health feature dimension. Each health feature dimension is pre-associated with a corresponding abnormal sign identifier. The risk scoring unit is used to output a health risk score based on the degree of deviation.
[0013] Optionally, the phased health joint gradual change module further includes: The first online update unit is used to update the mean parameter of the health gradient normal mode based on the health gradient data of newly collected healthy individuals when the preset trigger conditions are met. The second online update unit is used to update the covariance parameter of the health gradient normal pattern based on the health gradient data of newly collected healthy individuals when the preset trigger conditions are met.
[0014] Optionally, the stage adaptive deviation detection module is further used to perform a time-domain moving average processing on the stage membership vector to suppress the interference of short-term fluctuations in stage membership on the combination result.
[0015] Compared with the prior art, the beneficial effects of the present invention are as follows: This invention provides an intelligent health diagnosis system for livestock and poultry based on machine vision and deep learning. Through a continuous growth stage estimation module, a smooth stage membership vector is output, quantifying the individual's developmental process into continuous membership values for each stage. This allows health diagnosis to adapt to differences in growth rates between individuals. A stage-based health transition module stores typical evolutionary trajectories of health indicators for healthy individuals at each growth stage, starting from a fully healthy state. A health feature transition tracking module calculates the actual health transition trajectory and its rate of change and acceleration. A stage-adaptive deviation detection module compares the actual trajectory with the expected trajectory obtained by combining stage membership vectors, calculates the degree of deviation, and determines whether it exceeds a comprehensive tolerance threshold aggregated from tolerance thresholds for each stage. This mechanism enables the system to issue warnings by detecting deviations between the transition trajectory and the normal stage pattern before the health score falls below a conventional threshold, helping to detect health risks early. Furthermore, because different growth stages have different normal health transition patterns and tolerance thresholds, the system can automatically adjust its diagnostic sensitivity, reducing false alarms or missed alarms caused by stage differences. The health diagnosis output module further provides location information of abnormal signs in the feature dimension, which enhances the interpretability of the diagnosis results and makes it easier for farmers to take targeted intervention measures. Attached Figure Description
[0016] Figure 1 This is a schematic diagram of the overall system flow of the present invention; Figure 2This is an internal flowchart of the continuous growth stage estimation module in this invention; Figure 3 This is an internal flowchart of the phased health combined gradual change module in this invention; Figure 4 This is an internal flowchart of the health diagnosis output module in this invention. Detailed Implementation
[0017] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0018] like Figures 1 to 4 As shown, this invention provides an intelligent diagnostic system for individual livestock and poultry health based on machine vision and deep learning, including an individual visual feature extraction module 100, used to extract individual identity feature vectors and health-related visual feature vectors from continuously acquired image sequences, and further including: The continuous growth stage estimation module 200 is used to obtain the historical sequence of the same individual based on the individual identity feature vector, extract the current morphological parameters, match the morphological parameters with the typical morphological templates of each growth stage, and output the stage membership vector in combination with the age information. The stage membership vector contains the continuous membership values of each stage. The health feature gradient tracking module 300 is used to calculate the actual health gradient trajectory and its first and second derivatives based on the historical sequence of health-related visual features. The stage health joint gradual change module 400 is used to store the normal health gradual change pattern of each growth stage, which describes the typical trajectory of a healthy individual's deviation over time. The stage adaptive deviation detection module 500 is used to combine the healthy gradual normal pattern of each growth stage into the expected gradual trajectory according to the stage membership vector, compare the actual and expected trajectories to calculate the degree of deviation, and determine whether the degree of deviation exceeds the comprehensive tolerance threshold obtained by aggregating the tolerance thresholds of each stage according to the stage membership. The health diagnosis output module 600 is used to output health risk scores, abnormal signs location and early warning signals based on the degree of deviation.
[0019] Specifically, the individual visual feature extraction module 100 extracts individual identity feature vectors and health-related visual feature vectors from continuously acquired sequences of individual livestock and poultry images. The individual identity feature vectors are used for matching and tracking within the same individual livestock or poultry across time frames, while the health-related visual feature vectors include body shape contour parameters, coat color and texture features, posture key point coordinates, and periorbital features.
[0020] The continuous growth stage estimation module 200 receives a historical sequence of individual identity feature vectors and obtains historical visual feature records of the same livestock individual through matching. This module extracts morphological parameters at the current moment from the historical sequence of health-related visual feature vectors. Morphological parameters include estimated body length, estimated weight, or skeletal dimensions. The continuous growth stage estimation module 200 calculates the similarity between the extracted morphological parameters and preset typical morphological templates for each growth stage, and combines this with the individual's age information to output a stage membership vector. Each component in the stage membership vector represents the continuous membership value of the individual's current growth stage; all components have values between 0 and 1, and their sum is 1.
[0021] The health feature gradual change tracking module 300 calculates the actual health gradual change trajectory based on the historical sequence of health-related visual feature vectors. This trajectory is a function curve of the change of health-related visual features over time. The health feature gradual change tracking module 300 further calculates the first and second derivatives of this trajectory, representing the rate of change of the health feature and the acceleration of the rate of change, respectively.
[0022] The Stage Health Joint Gradual Change Module 400 stores the normal health gradual change pattern for each growth stage. Each normal health gradual change pattern is a time-series generation model, which is trained based on a large amount of historical data from healthy individuals and is used to describe the typical deviation trajectory of various health-related visual features of a healthy individual from a state of complete health over the course of evolution.
[0023] The stage-adaptive deviation detection module 500 combines the health gradual change patterns of each growth stage based on the stage membership vector at the current moment to obtain the expected gradual change trajectory. The combination method is as follows: the health gradual change patterns of each growth stage are weighted and summed according to the membership value corresponding to that stage. The stage-adaptive deviation detection module 500 compares the actual health gradual change trajectory output by the health feature gradual change tracking module 300 with the above-mentioned expected gradual change trajectory to calculate the degree of deviation. Simultaneously, the stage-adaptive deviation detection module 500 performs a weighted summation of preset tolerance thresholds for each growth stage based on the stage membership vector to obtain a comprehensive tolerance threshold. When the calculated deviation degree exceeds the comprehensive tolerance threshold, the stage-adaptive deviation detection module 500 determines that there is a health risk.
[0024] The health diagnosis output module 600 receives the deviation degree output from the adaptive deviation detection module 500 and outputs a health risk score, abnormal sign location information, and a warning signal. The health risk score is obtained by mapping the magnitude of the deviation degree, and the abnormal sign location information is obtained by analyzing the components of the deviation degree across various health characteristic dimensions.
[0025] The continuous growth stage estimation module 200 includes: The first time-series processing unit 210 is used to calculate the instantaneous change in stage membership degree based on the short-term historical sequence of morphological parameters. The second time-series processing unit 220 is used to calculate the baseline value of the stage membership degree based on the long-term historical sequence of morphological parameters. After superimposing the instantaneous change with the baseline value, the result is adjusted to a form where the sum of all membership values is always 1, and the stage membership vector is output.
[0026] Specifically, the continuous growth stage estimation module 200 includes a first time-series processing unit 210 and a second time-series processing unit 220. The first time-series processing unit 210 calculates the instantaneous change in stage membership based on a short-term historical sequence of morphological parameters. The length of the short-term historical sequence is typically set to several time units, such as 5 days. The first time-series processing unit 210 extracts the morphological parameters from the most recent few days, calculates the rate of change of each morphological parameter between adjacent time points, and forms a rate of change vector. This rate of change vector is mapped by a pre-trained linear regression model to output the instantaneous change in stage membership at each growth stage.
[0027] The second time-series processing unit 220 calculates the baseline value of stage membership based on the long-term historical sequence of morphological parameters. The length of the long-term historical sequence is typically set to tens of time units, such as 30 days. The second time-series processing unit 220 smooths the long-term morphological parameters, for example, by using an exponentially weighted moving average to eliminate short-term fluctuations, resulting in smoothed morphological parameters. The smoothed morphological parameters are then matched with typical morphological templates for each growth stage, outputting the baseline value of stage membership, which reflects the stage distribution that an individual should be in under the long-term growth trend.
[0028] The continuous growth stage estimation module 200 superimposes instantaneous changes with baseline values to obtain a preliminary stage membership vector. The sum of the components in the superimposed vector may not equal 1, and some components may be less than 0 or greater than 1. Therefore, the module further adjusts the superimposed vector: first, it sets components with values less than 0 to 0 and those with values greater than 1 to 1, resulting in a trimmed vector; then, it divides each component of the trimmed vector by its sum, ensuring that the sum of all components equals 1. The final output stage membership vector shows continuously changing components with a total sum of 1.
[0029] Taking laying hens as an example, the system predefines three growth stages: brooding period, growing period, and laying period, each corresponding to a stage index. For a specific laying hen, the continuous growth stage estimation module 200 records its morphological parameter sequence, including estimated body weight. and body length estimation ,in The variable is time, measured in days.
[0030] The first timing processing unit 210 receives the morphological parameters from the past 5 days and calculates the rate of change vector of the morphological parameters. .Will Input a linear regression model, output the instantaneous change in membership degree at each stage. ,in Indicates the first The instantaneous change in the membership degree of a stage.
[0031] The second time-series processing unit 220 receives the morphological parameters from the past 30 days and performs smoothing using an exponentially weighted moving average to obtain the smoothed morphological parameters. and The smoothed morphological parameters are matched with typical morphological templates for each growth stage to output baseline values. And satisfy .
[0032] The continuous growth stage estimation module 200 superimposes instantaneous changes with benchmark values to obtain a preliminary stage membership vector. The sum of the components of the superimposed vector may not be equal to 1, and some components may exceed the range of 0 to 1. The module first... In each component, values less than 0 are set to 0, and values greater than 1 are set to 1, resulting in the clipped vector. ,in Then calculate the adjusted stage membership vector using the following formula: ; The final output stage membership vector is Each component changes continuously and the sum is 1.
[0033] For example, the baseline value obtained after smoothing the long-term morphological parameters of a 70-day-old laying hen is... This indicates that, based on long-term growth trends, the chicken should be in the 10th stage of brooding, the 30th stage of growing, and the 60th stage of laying. In the past 5 days, the chicken's weight gain has slowed, and its body length increase has been relatively slow, resulting in a transient change of [missing information]. After superposition, we get Each component is between 0 and 1 and their sum is 1.00, therefore no trimming or adjustment is needed, and the output can be done directly. If another chicken experiences a drastic change in morphological parameters due to a short-term illness, resulting in a superposition of the values... Then first cut it into Then adjust the sum to 1 to get Output the vector.
[0034] In a variation of this embodiment, the continuous growth stage estimation module 200 uses a Bayesian classifier to output stage membership vectors. Taking laying hens as an example, morphological parameter vectors are pre-established for the three growth stages: brooding, rearing, and laying. A multidimensional Gaussian distribution, with morphological parameters including estimated body weight. and body length estimation For each stage Collect a large sample of healthy individuals and calculate the mean vector. Covariance Matrix During runtime, the individual visual feature extraction module 100 outputs the morphological parameter vector of the current laying hen. The calculation according to the formula belongs to the stage. Posterior probability: ; in For the first The multidimensional Gaussian probability density function of the stage is expressed as follows: ; The prior probability is predetermined based on the age distribution of this breed of laying hens in the farm. The posterior probability is... Directly used as the stage membership vector The output automatically satisfies the condition that the sum of each component is 1 and lies between 0 and 1. For example, a day-old... The laying hens of the day have the following morphological parameter vector: After substituting the values into the Gaussian distribution for each stage, the stage membership vector is approximately [value missing]. .
[0035] In another variant, the continuous growth stage estimation module 200 uses a lookup table interpolation method to output stage membership vectors. A two-dimensional lookup table is pre-constructed, with row indices representing age ranges and column indices representing body length estimation ranges. Each cell in the table stores a three-dimensional vector representing the typical stage membership degree within that age and body length range. The table is constructed by selecting records of healthy laying hens from historical data, grouping them by age and body length, and calculating the mean of the stage membership degree within each group as the table entry. During runtime, the stage membership vector is calculated based on the current individual's age. and body length Locate the four adjacent entries. Let the interpolation coefficient for the age direction be... The interpolation coefficients in the body length direction are ,in and Here are the coordinates corresponding to the four table entries. The interpolation formula is: ; For example, a day-old Sky, body length For laying hens, the age interval boundary in the lookup table is... , The body length boundary is , ,but , The values of the four entries are respectively , , , Substituting into the interpolation formula, we obtain... .
[0036] The membership values in the stage membership vector change continuously over time, and the sum of all membership values is always 1.
[0037] Specifically, the membership values in the stage membership vector change continuously over time, and the sum of all membership values is always 1. The stage membership vector output by the continuous growth stage estimation module 200... in, each component , , These correspond to the membership degrees during the brooding, rearing, and laying periods, respectively. Since the growth of livestock and poultry is a continuous physiological process, with no abrupt stage boundaries from birth to maturity, each membership degree value should continuously increase or decrease with smooth changes in age and morphological parameters, without discontinuous jumps. Furthermore, after pruning and summation adjustments, at any given time... The sum of the three components is always equal to 1, that is, it satisfies... .
[0038] Taking a 70-day-old laying hen as an example, this hen... The timing, as determined by the stage membership vector output by the continuous growth stage estimation module 200, is... That is, the membership degree during the brooding period is 0.08, the membership degree during the rearing period is 0.35, and the membership degree during the laying period is 0.57, with a sum of 1.00. When time progresses to... At the right time, the chicken's weight and body length continued to increase, the short-term rate of change and long-term baseline values were updated, and the new stage membership vector became... Compared to the previous day, the membership degree during the brooding period decreased from 0.08 to 0.06, the membership degree during the rearing period decreased from 0.35 to 0.32, and the membership degree during the laying period increased from 0.57 to 0.62. The change in each component was 0.02, showing a smooth transition. On day 72, the vector was updated to... Day 73 is Day 74 is Day 75 is Throughout the 5-day period, the values of each component remained continuously changing, without any abrupt jumps from 0.57 to 0.80 or from 0.08 to 0. Furthermore, the sum of the three components for each day was strictly equal to 1. Even if morphological parameters fluctuated drastically on a particular day due to image acquisition noise or transient abnormal behavior, after cropping and summing adjustments in the continuous growth stage estimation module 200, the sum of the components in the output stage membership vector remained 1, and the membership differences between adjacent days were kept within a reasonable range, preventing abrupt changes. This ensured the continuity and stability of the stage estimation.
[0039] The described gradual transition from health to normal mode is a time-series generation model, represented as follows: Where t is a time variable in days, k is a stage index, and τ is the evolution duration from a fully healthy state. The time-series generation model is trained based on historical data of healthy individuals.
[0040] Specifically, the gradual transition from health to normality is a time-series generation model, represented as follows: In this expression, As a time variable, in days, it represents the coordinate position of the current monitoring moment on the time axis, used to determine the time span from the start of monitoring to the current moment for an individual; This serves as a stage index, used to identify the developmental stage an individual is in; The evolutionary time from a state of perfect health, expressed in days, describes the time from when an individual is identified as being in a state of perfect health (i.e., From the time of ) to the current time The length of time elapsed. This time-series generation model is trained based on historical data of healthy individuals and is used to describe the duration of time elapsed. At each stage of development, from the moment healthy livestock and poultry are confirmed to be in a state of complete health, various health-related visual characteristics evolve over time. Typical trajectory of change. Health-related visual characteristics include crown and wattle color brightness, feeding frequency, lying down time ratio, and coat gloss. The output is the evolution time of each feature. The expected value and its allowable fluctuation range at that time.
[0041] Based on the laying period of laying hens ( Taking as an example, the process of constructing the health-gradual-to-normal pattern at this stage is as follows: First, a large number of image sequences of laying hens confirmed to be completely healthy during the laying period are collected, with each hen starting from a certain point when it is confirmed to be completely healthy ( Starting at ( ), health-related visual characteristics are continuously recorded over several days thereafter. Let the current monitoring time be ( ). (That is, the evolutionary time starting from a fully healthy state is equal to the current monitoring time, and the starting monitoring time is...) For each chicken, record its... Feature vector of the time Data from all healthy chickens were sorted by evolutionary time. After alignment, for each Value, calculate the feature mean vector of all individuals at that time. And the standard deviation or quantile range of the eigenvalues, thereby defining the upper and lower limits of normal fluctuations. The time-series generation model of the egg-laying period can be expressed as: ; in For healthy laying hens during the evolutionary period The characteristic mean vector at time, This is a random deviation term, and its range is determined based on the normal fluctuation range in historical data. For the brooding period (… ) and growth period ( Each of the time-series generative models was trained using the same method. and The typical trajectory at different stages differs in terms of fluctuation range and trend. Generally, the normal fluctuation range is larger during the brooding period and smaller during the laying period.
[0042] Using the aforementioned 70-day age and stage membership vector as Take the laying hen as an example. This hen... The timing was confirmed to be in perfect health, that is... Its crown and beard color brightness characteristics exist The value at time Based on the normal pattern of gradual health change during the egg-laying period stored in the phased health transition module 400, for The normal range of variation in the brightness of the comb and wattle color in healthy laying hens during the 3-day period (i.e., from the point of complete health) is -1% to +1%, meaning the expected value is [value missing]. The allowable decrease is no more than 0.0085. If the chicken is... The right time (i.e.) The comb and wattle color brightness values were 0.85, 0.84, 0.83, and 0.82 respectively over three consecutive days of monitoring, representing a cumulative decrease of 0.03 over three days, a decrease of 3.53%, exceeding the 1% range allowed under the normal egg-laying pattern. At this point, the stage-adaptive deviation detection module 500 will calculate the local deviation value on this feature dimension and include it in the overall deviation calculation. If the chicken has a high membership level during the brooding period (e.g., ...), If a 3.53% decrease occurs, the system will invoke the normal health gradient mode for the brooding period. The permissible fluctuation range during the brooding period is typically -5% to +5%. Therefore, such a decrease might still be considered normal fluctuation and will not trigger an alert. Through this method, the time-series generation model provides personalized health gradient benchmarks for each growth stage, enabling deviation detection to adaptively adjust its sensitivity based on the individual's stage.
[0043] In another variant, the Phased Health Gradual Transition Module 400 employs Gaussian process regression to construct a gradual transition from a healthy state to a normal state. Taking the laying period of laying hens as an example, it transitions from a completely healthy state... Begin collecting. The visual feature vectors related to health of healthy laying hens at multiple time points, including the color and brightness values of the comb and wattles. Feeding frequency Ratio of lying down time Let the current monitoring time be... The evolution time Using the eigenvalues as input variables and the eigenvalues as output variables, a Gaussian process model is established. Mean function Take the characteristic mean and covariance function at each time point. Using the quadratic exponential kernel function: ; in For signal variance, For length scale parameters, For noise variance, Let Kronecker function be the hyperparameter. The hyperparameters are trained by maximizing the marginal log-likelihood. After training, for any... The posterior mean of the Gaussian process output is: ; The posterior variance is: ; in Let covariance be the matrix between training points. Let covariance be the vector between training points and test points. To train the observation vector. Posterior mean. As the expected gradually changing trajectory, the posterior variance Used to determine the normal fluctuation range. For example, for Heaven, if , Then interval This is within the normal fluctuation range. When a laying hen is... The right time (i.e.) The brightness of the crown color of the (day) decreased from 0.85 to 0.80. The actual value of 0.80 is lower than the lower limit of the range of 0.8334, and is judged as a deviation.
[0044] In another variant, the Stage Health Joint Gradual Transition Module 400 employs quantile regression to construct a healthy gradual transition normal pattern. Taking the color and brightness characteristics of the comb and wattles of laying hens during the egg-laying period as an example, data were collected from healthy laying hens at different evolutionary durations. The brightness value at that time. For quantile levels... Fit the quadratic quantile regression model respectively: ; The fitting process employs an asymmetric Laplace loss function, and the coefficients are solved using linear programming. After training, in Median curve at time As the expected trajectory, and The range between these two values is considered the normal fluctuation range. For example, when... When, the fitting yields , , If a laying hen is The right time (i.e.) The brightness value of the sky is 0.80, which is lower than 0.83, and is therefore judged as deviating from the normal mode.
[0045] The stage-adaptive deviation detection module 500 uses a stage-adaptive weight matrix W to calculate the degree of deviation. The diagonal elements of the weight matrix W are set according to the sensitivity of the growth stage to each health characteristic dimension.
[0046] Specifically, the stage-adaptive deviation detection module 500 uses a stage-adaptive weight matrix when calculating the degree of deviation. The weight matrix For a diagonal matrix, its diagonal elements Indicates the first The importance of each health trait dimension in the deviation calculation. The values of the diagonal elements are set according to the sensitivity of each health trait dimension based on the individual's current growth stage. Specifically, the sensitivity of the same health trait dimension may differ for different growth stages. For example, during the egg-laying period, the brightness of the comb and wattles color is highly correlated with egg-laying performance, so this dimension has a higher weight value; while during the brooding period, the comb and wattles color is not yet fully developed, and its changes have less reference value for health diagnosis, so this dimension has a lower weight value.
[0047] Let the dimension of the health-related visual feature vector be... Then the weight matrix It can be represented as: ; in For the first The weights of each feature dimension are determined. The stage adaptive deviation detection module 500 is based on the stage membership vector at the current time. To determine the weight value for each feature dimension. Let the first feature be... The first stage of growth The basic sensitivity coefficients for each feature dimension are: Then the overall weight Calculate using the following formula: ; The baseline sensitivity coefficients for each growth stage are pre-defined using domain knowledge or statistical methods. For example, for the crest and wattle color brightness characteristic (the first dimension), the baseline sensitivity coefficients for the brooding, rearing, and egg-laying periods are respectively set to... , , For the feeding frequency characteristic (the second dimension), respectively set as follows: , , For the lying-down time ratio feature (the third dimension), it is set as follows: , , .
[0048] Using 70-day age and stage membership vector as Taking laying hens as an example, calculate the weights of the color brightness features of the comb and wattles. : ; Similarly, the weight of the feeding frequency feature Weights of the lying-down time ratio feature .
[0049] The difference vector between the actual health gradual trajectory and the expected gradual trajectory is denoted as . ,in For the first Each feature dimension at time... The local deviation value (actual value minus expected value). The stage adaptive deviation detection module 500 calculates the total deviation. as follows: ; By employing the weighted Euclidean distance method described above, the feature dimensions with higher sensitivity account for a larger proportion of the total deviation. For example, continuing the previous example, suppose that... The timing was such that the chicken's comb and wattles exhibited a localized deviation in color brightness. (Actual decline exceeded expectations), feeding frequency deviated locally. The ratio of lying down time deviates locally. The total deviation is calculated as follows: ; ; If the chicken is in the dominant brooding stage (stage membership vector is...), then... If the weight of the crown and beard color brightness is significantly reduced, for example... Similarly, local deviation The contribution to the overall deviation will decrease, reflecting the sensitivity adjustment of stage adaptation.
[0050] In a variation of this embodiment, the stage-adaptive deviation detection module 500 uses Mahalanobis distance to calculate the total deviation. Taking laying hens as an example, let the covariance matrix of health-related visual feature vectors in a healthy state be... This matrix is estimated based on healthy individual data stored in the Phased Health Joint Gradualization Module 400. The Mahalanobis distance calculation formula is: ; in This is the difference vector between the actual eigenvector and the expected eigenvector. For example, for a stage with a membership degree of... The laying hens have areas where the color and brightness of their combs and wattles deviate. Feeding frequency deviates locally The ratio of lying down time deviates locally. If the covariance matrix The diagonal elements are If the off-diagonal elements reflect the correlation between features, then the Mahalanobis distance calculation will automatically decorrelate the correlated features.
[0051] In another variant, the stage-adaptive deviation detection module 500 uses Chebyshev distance to calculate the total deviation, as shown in the formula: ; in For stage-adaptive feature dimension weights, For the first The local deviation value of each feature dimension. For example, for the laying hen mentioned above, the absolute value of the local deviation is... The weight is After weighting, it becomes The maximum value is The corresponding feature dimensions are crown and beard color and brightness, and Chebyshev distance output. .
[0052] The comprehensive tolerance threshold includes a cumulative deviation tolerance threshold and a deviation change rate tolerance threshold. When the cumulative amount of deviation exceeds the cumulative deviation tolerance threshold or the deviation change rate exceeds the deviation change rate tolerance threshold, an early warning signal is triggered.
[0053] Specifically, the comprehensive tolerance threshold includes a cumulative deviation tolerance threshold and a deviation change rate tolerance threshold. When the cumulative amount of deviation exceeds the cumulative deviation tolerance threshold, or the rate of change of deviation exceeds the deviation change rate tolerance threshold, an early warning signal is triggered.
[0054] The cumulative deviation tolerance threshold is used to measure the severity of a long-term gradual trend. Let's assume the threshold is set from the start of monitoring. up to the current moment The deviation sequence is Cumulative deviation Defined as the integral or discrete sum of the deviation over time: ; in This represents the time interval between adjacent monitoring moments. Cumulative deviation from the tolerance threshold. The calculation method is consistent with the comprehensive tolerance threshold, which is adaptively determined based on the growth stage: each growth stage has a pre-set basic cumulative tolerance threshold. The current comprehensive cumulative tolerance threshold is .
[0055] The deviation rate tolerance threshold is used to capture rapid deterioration of health status. The rate of change of the deviation. Defined as the first derivative of the deviation with respect to time, it can be calculated using the difference approximation: ; Deviation from the rate of change tolerance threshold Similarly, by aggregating the membership vectors by stage, we obtain: ,in For the first The tolerance threshold for the rate of change of the basic growth stage.
[0056] The stage adaptive deviation detection module 500 triggers an early warning signal when either of the following two conditions is met: Condition one: Condition two: Furthermore, this rate of change remains positive (i.e., the degree of deviation increases rapidly). Taking the laying hens in the example as an example, let the monitoring time interval be... Days. The degree of deviation for the first 3 days were respectively , , (Calculated value from day 73 in the example). Then the cumulative deviation... Let the membership degree of the chicken at the current stage be... The basic cumulative tolerance thresholds for each stage are as follows: (Relaxed brooding period) (Medium breeding period), (Strict egg-laying period). Therefore, the overall cumulative tolerance threshold is: ; because If the cumulative deviation does not exceed the threshold, condition one will not be triggered.
[0057] Calculate the rate of change of the degree of deviation: Every day. Let the tolerance thresholds for the basic rate of change at each stage be respectively... , , The overall rate of change tolerance threshold is: ; because And the degree of deviation increased for two consecutive days ( , If condition two is met, a warning signal is triggered. If the rate of change of the subsequent deviation falls below the threshold or becomes negative, the warning signal can be lifted or downgraded.
[0058] The settings for the cumulative deviation tolerance threshold and the deviation rate of change tolerance threshold for different growth stages reflect the stage-specific risk tolerance. The laying period is more sensitive to rapid deterioration, so its basic rate of change tolerance threshold is lower (0.008), while the brooding period allows for larger short-term fluctuations, and its basic rate of change tolerance threshold is higher (0.015). The comprehensive threshold obtained by aggregating the stage membership vector makes individuals with higher membership during the laying period more likely to trigger warnings due to accelerated deviation, thus achieving stage-adaptive adjustment of warning sensitivity.
[0059] In a variation of this embodiment, the stage-adaptive deviation detection module 500 calculates the comprehensive tolerance threshold using maximum value aggregation. Taking laying hens as an example, let the basic cumulative tolerance thresholds for the three growth stages be as follows: , , The tolerance thresholds for the basic rate of change are respectively , , The membership vector at the current stage is... The overall cumulative tolerance threshold is: The overall rate of change tolerance threshold is: ; In another variant, the stage-adaptive deviation detection module 500 uses product aggregation to calculate the comprehensive tolerance threshold, as shown in the formula: ; ; The membership degree of the aforementioned laying hens was calculated. , .
[0060] The health-related visual feature vectors include body shape contour parameters, coat color and texture features, posture key point coordinates, and periorbital state features.
[0061] Specifically, health-related visual feature vectors include body contour parameters, coat color and texture features, pose key point coordinates, and periorbital features. The individual visual feature extraction module 100 extracts these features from a continuously acquired image sequence as the basis for subsequent health diagnosis.
[0062] Body shape contour parameters reflect the physical development of individual livestock and poultry. The individual visual feature extraction module 100 first segments the foreground region of the individual livestock and poultry from the image, extracts the contour boundaries, and then calculates multiple geometric parameters. Let the set of pixels for the contour be... , of which The coordinates of the pixels are , This represents the total number of contour points. Body contour parameters include estimated body length. Estimated body height Chest circumference estimation and estimated body surface area The estimated body length is obtained by calculating the maximum horizontal span of the profile: The estimated height is obtained by calculating the maximum span of the profile in the vertical direction: The chest circumference estimate is calculated by extracting the perimeter of the torso region. The body surface area estimate is obtained by converting the pixel area within the contour to a calibrated scale.
[0063] Coat color and texture features are used to assess the nutritional status and skin health of livestock and poultry. The individual visual feature extraction module 100 extracts color histograms and texture statistics within the segmented regions of individual livestock and poultry. Let the RGB three-channel values of the pixels within the region be... First, convert to the HSV color space to obtain the hue. saturation and brightness Coat texture characteristics include: the hue value and average saturation value of the dominant color. Mean brightness and the standard deviation of lightness Texture features are calculated using a gray-level co-occurrence matrix, including contrast, correlation, and energy. Taking the color brightness of the crest and mane as an example, the average brightness of the pixels in the crest region is calculated as the color brightness value of the crest and mane. .
[0064] Posture keypoint coordinates are used to determine the standing posture and movement ability of livestock and poultry. The individual visual feature extraction module 100 uses a keypoint detection algorithm to locate key points on multiple body parts. For laying hens, key points include: the center point of the head, the tip of the beak, the highest point of the comb and wattles, the midpoint of the neck, the midpoint of the back, the base of the tail, and the joints of both legs. Let the first... The coordinates of the key points are The coordinate vector of the attitude key points is denoted as Gait parameters can be derived from these coordinates, such as the horizontal distance between the joints of the two legs (standing width) and the vertical height difference (leg weight-bearing symmetry), as well as the pitch angle of the head relative to the back, which reflects mental state.
[0065] Periocular features are used to assess alertness and fatigue levels in livestock and poultry. The individual visual feature extraction module 100 extracts the eye region near key points on the head, analyzing the eye's opening and closing state and periocular tissue features. Let the mean grayscale value of the eye region image be... The maximum vertical distance between the upper and lower eyelids is This is called the palpebral fissure width. Periocular features include: palpebral fissure width. Blinking frequency, which is the number of times the eye fissure width falls below a threshold per unit time; the roughness of the texture in the periorbital area reflects secretions or inflammation; and the reflective brightness of the visible area of the iris reflects mental state.
[0066] Taking the aforementioned 70-day-old laying hen as an example, this hen... Based on the given conditions, the individual visual feature extraction module 100 extracted the following features: estimated body length. Meters, estimated height Meters, estimated chest circumference Meter; In coat color characteristics, the brightness value of the crown and wattles color. The coat color is uniform; the horizontal distance between the joints of the two legs was extracted from the coordinates of the key points of the posture. meters, head tilt angle is Within the normal range; palpebral fissure width Meters, blinking frequency is The frequency is [times per minute]. When the chicken exhibits health problems, such as in the early stages of egg drop syndrome, the brightness value of the comb and wattles color may [increase / decrease]. Descending to At the same time, the width of the palpebral fissure may increase, meaning that fatigue may prevent the eyes from opening fully; the roughness of the skin around the eyes may increase; and the head tilt angle at key postural points may change. This indicates lethargy. Changes in these characteristics are recorded by the health characteristic gradient tracking module 300 and used for subsequent deviation detection.
[0067] The health diagnosis output module 600 includes: The abnormal sign localization unit 610 is used to output the health feature dimension with the largest deviation as the abnormal sign localization result based on the component of the deviation degree in each health feature dimension. Each health feature dimension is pre-associated with a corresponding abnormal sign identifier. Risk scoring unit 620 is used to output a health risk score based on the degree of deviation.
[0068] The health diagnosis output module 600 includes an abnormal sign localization unit 610 and a risk scoring unit 620.
[0069] The risk scoring unit 620 outputs a health risk score based on the magnitude of the deviation vector. The deviation vector is calculated by the stage adaptive deviation detection module 500 and denoted as... ,in The total number of dimensions of health-related visual features. For the first The features at the current moment The local deviation value. Risk scoring unit 620 first calculates the magnitude of the deviation degree vector: ; Then, the modulus is mapped to the 0-1 range to obtain a health risk score. The mapping function takes an inverse proportional form: ; in The sensitivity adjustment coefficient is preset based on the livestock breed and farming scenario. When the deviation modulus is 0, This indicates perfect health; as the degree of deviation increases, A monotonically decreasing trend approaching zero indicates a gradually increasing health risk.
[0070] Taking laying hens as an example, the chickens in Local deviations in various dimensions of the weather: Crown and beard color brightness feeding frequency Lying down time ratio Deviations in other feature dimensions are negligible. The magnitude of the deviation is calculated as follows: ; set up The health risk score is: ; The abnormal sign localization unit 610 outputs the health feature dimension with the largest deviation as the abnormal sign localization result based on the component of the deviation degree in each health feature dimension. Each health feature dimension is pre-associated with a corresponding abnormal sign identifier. The association relationship is pre-stored in the system in tabular form. For example: the crown and wattle color brightness dimension is associated with an abnormal egg production performance identifier, the feeding frequency dimension is associated with a digestive tract disease identifier, the lying down duration ratio dimension is associated with a leg disease identifier, the eye opening dimension is associated with a respiratory disease identifier, and the coat color and texture uniformity is associated with a nutritional metabolism abnormality identifier.
[0071] The abnormal sign localization unit 610 first calculates the absolute value of the local deviation in each dimension. Then find the dimension index with the largest absolute value. : ; The location result can be obtained by querying the abnormal sign identifier associated with this dimension. If the absolute values of local deviations in multiple dimensions are very close and all exceed the threshold, multiple location results can be output, sorted from largest to smallest by absolute deviation value.
[0072] Continuing with the example above, the absolute values of the local deviations in each dimension are as follows: , , The dimension with the largest absolute value is This corresponds to the brightness dimension of the comb and wattle color. Abnormal signs associated with this dimension are identified as abnormal egg production performance. Therefore, the abnormal sign localization unit 610 outputs the abnormal sign localization result as abnormal egg production performance, and suggests checking the trend of comb and wattle color changes.
[0073] By combining the health risk score of 0.73 output by the risk scoring unit 620 and the abnormal egg production performance indicator output by the abnormal sign location unit 610, farmers can conduct targeted examinations on the laying hen, such as observing its egg production, checking changes in comb and wattle color, measuring body temperature, and isolating or treating it if necessary. Since the warning signal is triggered in the subclinical stage, farmers can take intervention measures before a significant decline in egg production, thereby reducing economic losses.
[0074] In actual system operation, if the dimension with the greatest deviation changes, the abnormal sign localization results will also be updated accordingly. For example, if the chicken's feeding frequency gradually deviates more significantly in the following days, when... Exceed At this time, the abnormal signs localization results will switch to a digestive tract disease indicator, suggesting that the disease type may have changed or that a secondary infection may exist.
[0075] The phased health joint gradual change module 400 also includes: The first online update unit 410 is used to update the mean parameter of the health gradient normal mode based on the health gradient data of newly collected healthy individuals when the preset trigger conditions are met. The second online update unit 420 is used to update the covariance parameter of the health gradient normal mode based on the health gradient data of newly collected healthy individuals when the preset trigger conditions are met.
[0076] Specifically, the phased health transition module 400 includes a first online update unit 410 and a second online update unit 420. The first online update unit 410 updates the mean parameter of the health transition normal pattern based on newly collected health transition data of healthy individuals when a preset trigger condition is met. The second online update unit 420 updates the covariance parameter of the health transition normal pattern based on newly collected health transition data of healthy individuals when a preset trigger condition is met.
[0077] Preset trigger conditions can be time-cycle conditions, data accumulation conditions, or manual trigger conditions. Time-cycle conditions include triggering an update every 7 days; data accumulation conditions include triggering an update when complete gradient data of 50 new healthy individuals are added; and manual trigger conditions include the zookeeper manually initiating the update process through the user interface.
[0078] The first online update unit 410 receives the health gradient data of newly collected healthy individuals. For the... Each stage of growth, assuming existing Historical data from healthy individuals are used to construct the current mean parameter. Newly collected Gradual data of healthy individuals, with each individual's evolutionary time. The eigenvectors of time are denoted as The first online update unit 410 updates the mean parameter using the exponentially weighted moving average method: ; in To update the learning rate, a value between 0 and 1 is used, for example... This formula allows the contribution of new data to the mean parameter to be controlled by the learning rate, which can reflect the latest changes in the health status of the aquaculture population without causing drastic fluctuations in the model due to individual outliers.
[0079] The second online update unit 420 updates the covariance parameters. Let the covariance matrix of the current healthy-to-normal mode be... Newly collected The sample covariance of the feature vectors of each individual is... The second online update unit 420 updates the covariance parameter using the following formula: ; in The learning rate is updated to reflect the covariance, and is typically set to a value smaller than the mean learning rate, for example... This is to ensure the stability of the covariance estimation.
[0080] Taking the egg-laying period of laying hens as an example, the mean parameters of the gradual transition from a healthy to a normal pattern during this stage. Covariance parameter The system was initially trained based on historical data from 200 healthy laying hens. After 6 months of operation, the system collected health evolution data from an additional 60 healthy laying hens. The preset trigger condition is set to trigger an online update every 30 newly added healthy individuals; therefore, the first update is triggered when 30 hens are collected, and the second update is triggered when 60 hens are collected.
[0081] During the first update, , , The first online update unit 410 calculates the number of 30 new chickens in... Average brightness of the crown and beard color at the right time The old mean was The updated mean is: ; The second online update unit 420 calculates the number of 30 new chickens in... The covariance components of the crown color and brightness at the right time. The old covariance components are The updated covariance is: ; The updated mean and covariance parameters are stored in the Phase 400 health joint gradual change module for subsequent health gradual change normal pattern queries. Through online updates, the model can adapt to the impact of different seasons, different feed batches, and changes in the farming environment on the normal fluctuation range of healthy individuals, maintaining the timeliness and accuracy of the diagnostic model.
[0082] In a variation of this embodiment, the stage health joint gradual change module 400 employs a sliding window update mechanism. Taking the egg-laying period of laying hens as an example, the window size is set to... Only the gradual change data of healthy individuals. When the newly collected data of healthy laying hens reaches a preset trigger condition, such as each newly added... For each individual data point, new data is added to the sliding window while discarding the 30 oldest data points in the window. The mean parameter is then recalculated based on the 200 data points within the window. Covariance parameter Let the window contain the first... The evolutionary time of a chicken The feature vector at time is The updated mean is: ; The formula for updating the covariance matrix is: ; In another variant, the Phase Health Joint Gradual Change Module 400 employs a change detection-triggered update based on model consistency. It continuously monitors the consistency between newly acquired data and the current model, updating the update for each newly acquired data point. Calculate the log-likelihood of the eigenvectors of healthy laying hens under the current health-gradual-to-normal pattern. Let the mean parameter of the current model be... The covariance parameter is Then the formula for calculating the log-likelihood is: ; When continuous Only the log-likelihood mean of an individual is lower than a preset threshold The model is updated periodically. During the update, Bayesian online learning is used to adjust the mean parameters of the current model. Covariance parameter The data from the 10 newly collected individuals are considered as the prior distribution. The posterior distribution is calculated using Bayes' theorem to obtain the updated parameters.
[0083] The stage adaptive deviation detection module 500 is also used to perform a time-domain moving average processing on the stage membership vector to suppress the interference of short-term fluctuations in stage membership on the combination result.
[0084] Specifically, the stage adaptive deviation detection module 500 is also used to perform a time-domain moving average on the stage membership vector to suppress the interference of short-term fluctuations in stage membership on the combination result.
[0085] The moving average processing uses a fixed-length sliding window, with the window length set to... A unit of time. Let the current time be 1 / 2. Record the past The sequence of stage membership vectors at each time step The stage membership vector after moving average processing. Calculate using the following formula: ; Window length The value is set according to the livestock species and sampling frequency. For laying hens, when collecting images once a day, the window length can be set to... The window length is calculated as the arithmetic mean of the membership vectors of the past 5 days. A window that is too short cannot effectively filter out short-term noise, while a window that is too long will lag behind the actual changes in the stage. An integer between 3 and 7 is usually chosen.
[0086] Taking a 70-day-old laying hen as an example, the stage membership vector of this hen over 5 consecutive days is recorded as follows: Day 70: ; Day 71: ; Day 72: ; Day 73: ; Day 74: ; Set window length Calculate the stage membership vector after moving average: Average brooding period: ; Average growth period: ; Average egg production period: ; Output after moving average .
[0087] If on day 72, image noise or temporary occlusion causes an abnormal jump in the stage membership vector, The original data will then show a significant spike on day 72. After a 5-day moving average, the abnormal jump is averaged into the nearest normal value, and the fluctuation of the final output vector is significantly reduced. For example, without smoothing, the membership degree of the laying period on day 72 is 0.30. With smoothing, the moving average on day 72 will include data from the days before and after, making the output value closer to 0.55, thus avoiding misdiagnosis caused by a single abnormality.
[0088] Stage membership vector after moving average processing Replace the original The input is fed into the combined calculation of the stage adaptive deviation detection module 500. This processing method effectively suppresses short-term fluctuations in stage membership caused by image acquisition noise, transient abnormal behavior of individuals, or occasional errors in the detection algorithm, thereby improving the stability of the desired gradual trajectory and the robustness of health diagnosis.
[0089] In a variation of this embodiment, the stage adaptive deviation detection module 500 uses an exponentially weighted moving average to smooth the stage membership vector over time. Taking laying hens as an example, the recursive formula is: ; in The original stage membership vector is directly output by the continuous growth stage estimation module 200. This is a smoothing coefficient, with a value between 0.1 and 0.5. Initial time. For example, a laying hen in the first... The original stage membership vector of the day is ,Pick After smoothing . No. The original vector of the day is After smoothing, it becomes: ; In another variant, the stage adaptive deviation detection module 500 uses Kalman filtering to smooth the stage membership vector over time. State equations and observation equations are established. State variables... Take the stage membership vector State transition matrix Take the identity matrix Process noise covariance Set as a diagonal matrix, and take the diagonal elements. Observed variables Take the original stage membership vector Observation matrix Take the identity matrix Observation noise covariance Set as a diagonal matrix, and take the diagonal elements. The Kalman filter recursion consists of two steps: prediction and update. The prediction step calculates a prior estimate and its covariance: ; ; The update step uses actual observations to correct the prior estimate to obtain the posterior estimate. First, the Kalman gain is calculated: ; Then update the state estimate and covariance: ; ; Smoothed stage membership vector Replace the original The input is fed into the combined calculation of the stage adaptive deviation detection module 500. For example, on day 72, the original stage membership vector of a laying hen abnormally jumps to a certain value due to image noise. Kalman filtering, based on the previous time-instance estimate and noise statistics, corrects the output to a value closer to the normal trend of change. For example... This avoids interference with diagnostic results from a single jump.
[0090] Furthermore, to more clearly demonstrate the complete workflow of this system from image acquisition to early warning output, the following uses a laying hen as an example to describe in detail its health diagnosis process over six consecutive days. This laying hen, number H0123, is 70 days old and of Hy-Line Brown breed.
[0091] Day 1, or day 70. The individual visual feature extraction module 100 captures side and top views of the chicken from a camera mounted on the top of the coop. Individual identification feature vectors are extracted from the images and matched against historical records in the database to confirm it is the same chicken. Simultaneously, health-related visual feature vectors are extracted: estimated body length. Meters, estimated height Meters, estimated chest circumference Meter, crown and beard color brightness value The horizontal distance between the joints of the two legs is meters, head tilt angle is Horizontal slit width Meters, blinking frequency of 15 times per minute. These feature values are input into the health feature gradient tracking module 300 as the starting point of the health gradient trajectory.
[0092] The continuous growth stage estimation module 200 calculates long-term baseline values based on the chicken's morphological parameter history sequence over the past 30 days. The smoothed weight and body length curves show that the chicken is developing rapidly, and the baseline values are [data missing]. The first time-series processing unit 210 analyzed the morphological change rate over the past 5 days. The daily weight gain rate decreased from an average of 1.2% to 0.8%, and the daily body length gain rate decreased from 0.5% to 0.3%, yielding the instantaneous changes. After superposition, we get Each component is between 0 and 1 and sums to 1, requiring no adjustment; the stage membership vector is directly output. .
[0093] The stage-adaptive deviation detection module 500 retrieves the normal health gradient patterns for each stage from the stage-based health joint gradient module 400 based on this vector. For the brightness of the crest and wattle color, the normal pattern is a daily variation of no more than ±1% during the egg-laying period, ±3% during the rearing period, and ±5% during the brooding period. The expected daily variation range obtained by weighting by membership degree is... Since the actual characteristics of day 70 were basically consistent with the expected value, the degree of deviation was... A health risk score close to 0 No warning was given.
[0094] Day 2, Day 71. The individual visual feature extraction module 100 collects images again and extracts features. The crown and beard color brightness value changes from 0.85 to 0.84, a decrease of 1.2%; the feeding frequency decreases from the normal level by 1%; other features show minimal changes. The health feature gradual change tracking module 300 calculates the first derivative of the actual health gradual change trajectory: the crown and beard color brightness change rate is -1.2% per day. The stage membership vector is updated to... Recalculate the expected daily range of variation: The actual decrease in crown and beard color brightness of 1.2% is still within the expected range (1.2% < 1.88%), and the degree of deviation is... Health risk score No warning was triggered.
[0095] Day 3, Day 72. The crest and wattle color brightness value decreased to 0.82, a daily decrease of 2.4%, and a cumulative decrease of 3.5% over 3 days. Feeding frequency decreased by 2%, and lying down time increased by 3%. Stage membership vector. Expected daily variation range: The actual daily decrease in comb and wattle color brightness was 2.4%, exceeding the expected range by 0.6 percentage points, and other characteristics also showed slight deviations. The stage-adaptive deviation detection module 500 used a weight matrix to calculate the total deviation. Since the membership degree during the egg-laying period had reached 0.65, the weight of the comb and wattle color brightness dimension was... Local deviation (In absolute value), other characteristics deviate less, and the total deviation is relatively small. Total cumulative deviation It remains below the cumulative tolerance threshold of 0.1255. (Deviation rate of change) The value is below the tolerance threshold of 0.00996 for the rate of change. No warning was triggered.
[0096] Day 4, Day 73. The crest and wattle color brightness value decreased to 0.80, a daily decrease of 2.5%, and a cumulative decrease of 5.9%. Feeding frequency decreased by 3%, and lying down time increased by 5%. Stage membership vector. Expected daily variation range: The actual daily decrease in crown and beard color brightness was 2.5%, exceeding the expected decrease by 0.84 percentage points. (Weight) Total deviation Cumulative deviation It remains below 0.1255. (Deviation rate of change) The value is below the threshold. No warning has been triggered yet.
[0097] Day 5, Day 74. The crest and wattle color brightness value decreased to 0.78, a daily decrease of 2.5%, and a cumulative decrease of 8.2%. Feeding frequency decreased by 4%, and lying down time increased by 7%. Stage membership vector. Expected daily variation range: The actual daily decrease in crown and beard color brightness was 2.5%, exceeding the expected decrease by 0.96 percentage points. (Weight) Total deviation Cumulative deviation It remains below 0.1255. (Deviation rate of change) The value is below the threshold. No warning has been triggered yet.
[0098] Day 6, Day 75. The crest and wattle color brightness value decreased to 0.75, a daily decrease of 3.8%, and a cumulative decrease of 11.8%. Feeding frequency decreased by 6%, and lying down time increased by 10%. Stage membership vector. Expected daily variation range: The actual daily decrease in crown and beard color brightness was 3.8%, exceeding the expected decrease by 2.36 percentage points. (Weight) Total deviation Cumulative deviation It remains below 0.1255. However, the deviation from the rate of change... The deviation exceeded the tolerance threshold of 0.00996 and the degree of deviation increased for several consecutive days, triggering a warning under condition two.
[0099] At this time, the health diagnosis output module 600 outputs: Health Risk Score The abnormal physical sign localization unit 610 analyzed the absolute values of local deviations in each dimension: the brightness of the comb and wattle color was the largest at 0.038, followed by feeding frequency at 0.06 (6% deviation). However, due to the low weight of feeding frequency (0.749), the overall deviation contribution was still mainly from the color of the comb and wattle. Therefore, the output abnormal physical sign localization result was "risk of abnormal egg production performance, comb and wattle color continues to darken." The warning signal was a yellow warning, and it was recommended that the poultry farmer immediately check the chicken's feeding status and mental state, and measure its body temperature.
[0100] After receiving the early warning, the poultry farmers isolated and observed the chicken. Two days later, the chicken showed symptoms of decreased egg production and was diagnosed by a veterinarian as having early-stage egg drop syndrome. Thanks to the early warning, the farmers were able to administer medication and adjust the feed in time, preventing the disease from spreading to the entire flock. This example fully demonstrates the entire process of the system's early warning from the healthy state on day 70 to the subclinical stage on day 75, validating the effectiveness of the phased adaptive gradual deviation detection.
[0101] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Any modifications, equivalent substitutions, and improvements made by those skilled in the art within the spirit and principles of the present invention should be included within the protection scope of the present invention.
[0102] In the description of this application, it should be noted that the terms "first", "second", and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0103] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0104] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Additionally, the shown or discussed mutual couplings, direct couplings, or communication connections may be through some communication interfaces; indirect couplings or communication connections between devices or units may be electrical, mechanical, or other forms.
[0105] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0106] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0107] Finally, it should be noted that the above-described embodiments are merely specific implementations of this application, used to illustrate the technical solutions of this application, and not to limit them. The protection scope of this application is not limited thereto. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some of the technical features, within the technical scope disclosed in this application. Such modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be covered within the protection scope of this application. Therefore, the protection scope of this application should be determined by the protection scope of the claims.
[0108] Furthermore, although the operations of the method of this application are described in a specific order in the accompanying drawings, this does not require or imply that these operations must be performed in that specific order, or that all the operations shown must be performed to achieve the desired result. Additionally or alternatively, certain steps may be omitted, multiple steps may be combined into one step, and / or one step may be broken down into multiple steps.
Claims
1. A smart diagnostic system for individual livestock and poultry health based on machine vision and deep learning, comprising an individual visual feature extraction module for extracting individual identity feature vectors and health-related visual feature vectors from continuously acquired image sequences, characterized in that, Also includes: The continuous growth stage estimation module is used to obtain the historical sequence of the same individual based on the individual identity feature vector, extract the current morphological parameters, match the morphological parameters with the typical morphological templates of each growth stage, and output the stage membership vector in combination with the age information. The stage membership vector contains the continuous membership values of each stage. The health feature gradient tracking module is used to calculate the actual health gradient trajectory and its first and second derivatives based on the historical sequence of health-related visual features. A stage-based health transition module is used to store normal health transition patterns at each growth stage, which describe the typical trajectory of a healthy individual's deviation over time. The stage adaptive deviation detection module is used to combine the healthy gradual normalization patterns of each growth stage into the expected gradual trajectory based on the stage membership vector, compare the actual and expected trajectories to calculate the degree of deviation, and determine whether the degree of deviation exceeds the comprehensive tolerance threshold obtained by aggregating the tolerance thresholds of each stage according to the stage membership. The health diagnosis output module is used to output health risk scores, abnormal signs location, and early warning signals based on the degree of deviation.
2. The intelligent diagnostic system for individual livestock and poultry health based on machine vision and deep learning according to claim 1, characterized in that, The continuous growth stage estimation module includes: The first time-series processing unit is used to calculate the instantaneous change in stage membership degree based on the short-term historical sequence of morphological parameters. The second time-series processing unit is used to calculate the baseline value of the stage membership degree based on the long-term historical sequence of morphological parameters. After superimposing the instantaneous change with the baseline value, the result is adjusted to a form where the sum of all membership values is always 1, and the stage membership vector is output.
3. The intelligent diagnostic system for individual livestock and poultry health based on machine vision and deep learning according to claim 1, characterized in that, The membership values in the stage membership vector change continuously over time, and the sum of all membership values is always 1.
4. The intelligent diagnostic system for individual livestock and poultry health based on machine vision and deep learning according to claim 1, characterized in that, The described gradual transition from health to normal mode is a time-series generation model, represented as follows: Where t is a time variable in days, k is a stage index, and τ is the evolution duration from a fully healthy state. The time-series generation model is trained based on historical data of healthy individuals.
5. The intelligent diagnostic system for individual livestock and poultry health based on machine vision and deep learning according to claim 1, characterized in that, The stage-adaptive deviation detection module uses a stage-adaptive weight matrix W to calculate the degree of deviation. The diagonal elements of the weight matrix W are set according to the sensitivity of the growth stage to each health characteristic dimension.
6. The intelligent diagnostic system for individual livestock and poultry health based on machine vision and deep learning according to claim 1, characterized in that, The comprehensive tolerance threshold includes a cumulative deviation tolerance threshold and a deviation change rate tolerance threshold. When the cumulative amount of deviation exceeds the cumulative deviation tolerance threshold or the deviation change rate exceeds the deviation change rate tolerance threshold, an early warning signal is triggered.
7. The intelligent diagnostic system for individual livestock and poultry health based on machine vision and deep learning according to claim 1, characterized in that, The health-related visual feature vectors include body shape contour parameters, coat color and texture features, posture key point coordinates, and periorbital state features.
8. The intelligent diagnostic system for individual livestock and poultry health based on machine vision and deep learning according to claim 1, characterized in that, The health diagnosis output module includes: The abnormal sign localization unit is used to output the health feature dimension with the largest deviation as the abnormal sign localization result based on the component of the deviation degree in each health feature dimension. Each health feature dimension is pre-associated with a corresponding abnormal sign identifier. The risk scoring unit is used to output a health risk score based on the degree of deviation.
9. The intelligent diagnostic system for individual livestock and poultry health based on machine vision and deep learning according to claim 1, characterized in that, The phased health joint gradual change module also includes: The first online update unit is used to update the mean parameter of the health gradient normal mode based on the health gradient data of newly collected healthy individuals when the preset trigger conditions are met. The second online update unit is used to update the covariance parameter of the health gradient normal pattern based on the health gradient data of newly collected healthy individuals when the preset trigger conditions are met.
10. The intelligent diagnostic system for individual livestock and poultry health based on machine vision and deep learning according to claim 1, characterized in that, The stage adaptive deviation detection module is also used to perform a time-domain moving average on the stage membership vector to suppress the interference of short-term fluctuations in stage membership on the combination result.