Sick pig behavior monitoring method based on image recognition
The behavior monitoring of pigs through image recognition technology solves the blind spots and misjudgment problems of traditional manual inspections, realizes real-time monitoring and intelligent early warning of pig behavior, and improves the efficiency and accuracy of breeding management.
Patent Information
- Application Number
- CN202410742904.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-11
- Publication Date
- 2024-08-30
- Estimated Expiration
- 2044-06-11
AI Technical Summary
The traditional breeding management method relies on manual inspections, which involves high manpower consumption, blind spots and risks of misjudgment. It is unable to comprehensively monitor the behavior and health status of pigs, resulting in delayed treatment of diseases.
Using an image recognition-based behavior monitoring method for sick pigs, the pigs wear positioning devices for numbering and image collection, and analysis of interaction, activity, eating and excretion is carried out. Primary and secondary analysis mechanisms are set up to generate early warning signals and detect abnormalities in a timely manner. Condition.
It achieves real-time monitoring and dynamic management of pig behavior, reduces disease incidence and mortality, improves monitoring efficiency and accuracy, reduces labor costs, and improves the intelligence of breeding management.
Smart Images

Figure CN118318792B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of animal husbandry and breeding management, and more specifically, to a method for monitoring the behavior of sick pigs based on image recognition. Background Art
[0002] In modern breeding industry, behavior monitoring and health management of pigs are of great significance. Traditional breeding management methods mainly rely on manual inspections and experience judgments, which have the following problems: Traditional manual inspections require a lot of manpower and material resources, which is not only time-consuming and labor-intensive, but also prone to blind spots and omissions. It is impossible to comprehensively monitor every pig in the farm. In addition, due to human factors and lack of experience, the judgment of the behavior and health status of pigs is subjective, which can easily lead to misjudgment or delay in treatment. Therefore, a sick pig behavior monitoring method based on image recognition is proposed to solve the above problems. Summary of the invention
[0003] To achieve the above object, the present invention provides the following technical solutions:
[0004] The sick pig behavior monitoring method based on image recognition includes the following steps:
[0005] Step 1: Each pig is equipped with a positioning device and numbered, and the numbering results are transmitted to the monitoring platform;
[0006] Step 2: The monitoring platform collects images of each pig to obtain a subset of image information collected of the target pig, and aggregates all subsets of image information collected to obtain a total set of monitoring information collected;
[0007] Step 3: Based on the total set of monitoring information collected, interaction analysis, activity analysis, eating analysis, and excretion analysis are performed on the target pigs to obtain an analysis set of the target pigs;
[0008] Step 4: Perform primary analysis on the target pigs according to the analysis set of the target pigs, obtain the primary analysis results, and determine whether to trigger the secondary analysis mechanism according to the primary analysis results. If triggered, a first-class demand signal is generated; if not, a second-class demand signal is generated;
[0009] Step 5: When a first-class demand signal is generated, a secondary analysis is performed on the target pig to generate a secondary analysis result; when a second-class demand signal is generated, no secondary analysis is performed on the target pig;
[0010] Step six: Perform a joint analysis operation based on the primary analysis results and the secondary analysis results of the target pig to obtain a joint analysis value, and issue different levels of early warning signals based on the joint analysis value.
[0011] In a preferred embodiment, in step 1, when numbering is performed, the target pig has the same number as the positioning device worn by the target pig.
[0012] In a preferred embodiment, performing interactive analysis on target pigs refers to:
[0013] Draw a graph of the maximum activity range of the target pig, divide the graph according to the preset standard, and obtain m sub-graphs. According to the preset standard, classify the m sub-graphs into low-level interactive sub-graphs, medium-level interactive sub-graphs, and high-level interactive sub-graphs, obtain the total residence time of the target pig in the low-level interactive sub-graphs, the total residence time in the medium-level interactive sub-graphs, and the total residence time in the high-level interactive sub-graphs, and mark the total residence time of the target pig in the low-level interactive sub-graphs as t1, the total residence time in the medium-level interactive sub-graphs as t2, and the total residence time in the high-level interactive sub-graphs as t3, and then calculate the interaction analysis value of the target pig: ; JHi is the interaction analysis value of the target pig, f1, f2, and f3 are all preset interaction coefficients and are not zero, T1 is the preset total standard stay time in the low-level interaction sub-graph, T2 is the preset total standard stay time in the medium-level interaction sub-graph, and T3 is the preset total standard stay time in the high-level interaction sub-graph.
[0014] In a preferred embodiment, classifying the m sub-graphs into low-level interactive sub-graphs, medium-level interactive sub-graphs, and high-level interactive sub-graphs according to a preset standard means:
[0015] Sub-graphs in which the number of pigs existing simultaneously in the same sub-graph is greater than n2 are classified as high-level interactive sub-graphs, sub-graphs in which the number of pigs existing simultaneously in the same sub-graph is less than n1 are classified as low-level interactive sub-graphs, and sub-graphs in which the number of pigs existing simultaneously in the same sub-graph is not less than n1 and not greater than n2 are classified as medium-level interactive sub-graphs.
[0016] In a preferred embodiment, the logic of activity analysis of target pigs is:
[0017] The walking trajectories of the target pigs are collected, the total distance of the walking trajectories is marked as L1, the number of walking trajectories of the target pigs in the m sub-graphs is marked as L2, and the activity value of the target pigs is obtained by calculation: ; k1 and k2 are both preset proportional coefficients, HDi is the activity value of the target pig, the activity values of multiple adjacent preset time windows of the target pig are obtained, and then the average value of the multiple adjacent preset time windows is calculated and marked as PJ, and the current target pig activity value HDi is calculated as follows: ; DDi is the activity analysis value of the target pig.
[0018] In a preferred embodiment, performing feeding analysis on target pigs refers to:
[0019] Obtain the target pig’s feeding amount and remaining amount at the trough each time in the preset time window, mark each feeding amount at the trough as TWi, and mark each remaining amount at the trough as SYi, and obtain the target pig’s feeding analysis value by calculation: ; JSi is the feeding analysis value of the target pig, and si is the preset proportional coefficient corresponding to the feeding time section.
[0020] In a preferred embodiment, performing excretion analysis on target pigs refers to:
[0021] The monitoring range is divided into activity area, eating area, and excretion area. The number of times the target pig enters the excretion area within the preset time window is recorded and marked as JRi. The excretion analysis value of the target pig is obtained by calculation: ; PXi is the excretion analysis value of the target pig, and XZ is the standard number of entering the excretion area within the preset time window.
[0022] In a preferred embodiment, in step 4, performing a primary analysis on the target pig according to the analysis set of the target pig, obtaining the primary analysis result and judging whether to trigger the secondary analysis mechanism according to the primary analysis result refers to:
[0023] Obtain the excretion analysis value PXi, feeding analysis value JSi, activity analysis value DDi, and interaction analysis value JHi in the target pig's analysis set, and then obtain the primary analysis value through the following calculation: ; y1, y2, y3, y4 are preset comparison thresholds respectively, j1, j2, j3, j4 are preset proportional coefficients, YJi is the primary analysis value, the primary analysis value YJi is compared with the preset trigger threshold, if the primary analysis value YJi is greater than or equal to the preset trigger threshold, the secondary analysis mechanism is triggered, if the primary analysis value YJi is less than the preset trigger threshold, the secondary analysis mechanism is not triggered.
[0024] In a preferred embodiment, in step 5, performing secondary analysis on the target pig refers to:
[0025] When the second type demand signal is generated, the target pig is not subjected to secondary analysis, and the secondary analysis value of the target pig is assigned to 0;
[0026] When a demand signal is generated, the following operations are performed on the target pig:
[0027] The target pig's panting frequency and total duration of abnormal posture were counted in the preset time window, and the target pig's blinking frequency was recorded under multiple preset lighting brightnesses. The target pig's panting frequency was marked as YC1i, and the total duration of abnormal posture was marked as YC2i. The target pig's blinking frequency recorded under multiple preset lighting brightnesses was marked as ZYi, and then the secondary analysis value was obtained by calculation: ; BZi is the preset standard value corresponding to the blinking frequency ZYi of the target pig under multiple lighting brightnesses, R is the number of different lighting brightnesses, e1, e2, and e3 are all preset abnormal coefficients, and EJi is the secondary analysis value.
[0028] In a preferred embodiment, in step 6, the joint analysis value is obtained by the following logic:
[0029] Obtain the primary analysis value YJi and the secondary analysis value EJi, and then perform the following calculations: ; h1 and h2 are preset joint coefficients, and LHi is the joint analysis value.
[0030] Technical effects and advantages of the present invention:
[0031] Through image collection and analysis, the present invention can monitor various behavioral activities of pigs in real time, including activity range, activity intensity, eating conditions, and excretion frequency, thereby providing comprehensive dynamic monitoring for farms; by analyzing the behavioral patterns and activity patterns of pigs, abnormal conditions in the pig herd can be discovered in time, such as abnormal activities, abnormal eating, abnormal excretion, etc., and signs of maladaptation or disease in the pig herd can be discovered in time, which is helpful to take intervention measures early; by analyzing the behavioral data of pigs, a primary and secondary analysis mechanism is established, and an intelligent early warning system can be established. When an abnormal situation is discovered, an early warning signal can be triggered in time to remind the breeders to manage and intervene in the pig herd, which is helpful to reduce the incidence and mortality of diseases.
[0032] Compared with traditional manual monitoring methods, the present invention can realize automated monitoring and data analysis, reduce labor costs, and improve monitoring efficiency and accuracy. Based on image recognition technology and intelligent algorithms, it can provide data support and decision-making references for farms, help breeders make scientific and reasonable management decisions, help improve the intelligence level of pig herd management, promote the sustainable development of the breeding industry, and at the same time improve the work efficiency and management level of breeders. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] In order to facilitate understanding by those skilled in the art, the present invention is further described below in conjunction with the accompanying drawings;
[0034] Figure 1 This is a schematic diagram of the sick pig behavior monitoring method based on image recognition. DETAILED DESCRIPTION
[0035] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0036] Embodiment 1: A method for monitoring sick pig behavior based on image recognition comprises the following steps:
[0037] Step 1: Each pig is equipped with a positioning device, and the numbering process is carried out, and the numbering results are transmitted to the monitoring platform; the individual identification and positioning of each pig in the herd are realized, thus laying the foundation for subsequent image acquisition and behavior monitoring. The importance of this step is to ensure that each pig can be accurately identified and tracked by the system, so as to carry out effective behavior analysis and anomaly detection; the positioning device is a device worn on the pig, such as a collar or tag with a positioning chip, through which the monitoring platform can determine the location of each pig; each pig is assigned a unique number, usually a combination of numbers or letters, and the uniqueness of the number ensures that the system can accurately identify each pig; the numbering results need to be transmitted to the monitoring platform so that the collected data can be matched with the corresponding pig according to the number; for example: a pig farm wears an ear tag with an RFID chip on each pig, and binds each ear tag to the pig's number. When the pig enters the monitoring area, its ear tag number can be automatically identified, and the pig's activity and behavior data can be recorded, so that the pig farm manager can check the behavior status of each pig at any time through the monitoring platform, detect abnormal situations in time and take corresponding measures.
[0038] Step 2: The monitoring platform collects images of each pig to obtain an image information collection subset of the target pig, and summarizes all the image information collection subsets to obtain a total monitoring information collection set; The monitoring platform collects real-time images of each pig through a camera or other image acquisition equipment. These images may include various behaviors of the pig, such as activities and eating. The image data collected for each pig is sorted and classified to form an image information collection subset of the pig. These subsets may contain image data of multiple time points or time periods of a single pig. The image information collection subsets of all target pigs are summarized to obtain a total monitoring information collection set. Such a total set contains image data of the entire pig herd, providing a data source for subsequent analysis; For example: a livestock farm installs multiple cameras in a pig house, each camera can cover the pig herd activity area within a certain range, the monitoring platform regularly collects images from the camera, obtains real-time image data of the pig herd, and can automatically identify the position and behavior of each pig through image recognition technology to form an image information collection subset for each pig, and the image information collection subsets of all pig herds are summarized into a total monitoring information collection set.
[0039] Step 3: Based on the total set of monitoring information collected, interaction analysis, activity analysis, eating analysis, and excretion analysis are performed on the target pigs to obtain an analysis set of the target pigs;
[0040] Interaction analysis: By drawing a graph of the target pig’s activity range and dividing it into different levels of interaction sub-graphs according to preset standards, we can understand the time the pig stays in different areas and thus infer the intensity of its interaction behavior. The interaction analysis value reflects the pig’s stay in each level of interaction sub-graphs, helping to evaluate its degree of social activity.
[0041] Activity analysis: Collect the walking trajectory data of the target pigs, calculate their total walking distance, and combine the target pigs' stay in different areas to obtain their activity values. The calculated activity analysis value can reflect the pigs' activity level and help evaluate their health and physiological status.
[0042] Feeding analysis: monitors the target pigs’ eating behavior within a preset time window, including the amount fed and the remaining amount in the trough each time. The feeding analysis value reflects the pigs’ eating situation and can be used to evaluate their appetite and digestive function.
[0043] Excretion analysis: The monitoring area is divided into activity area, feeding area and excretion area, and the number of times the target pig enters the excretion area within the preset time window is recorded. The excretion analysis value (PXi) is used to evaluate the excretion frequency and excretion health status of the pig.
[0044] For example: A pig farm processes the image data collected by the camera in the pig house to extract the pig's walking trajectory, eating, excretion and other behavioral information. After interactive analysis, it is found that the target pig numbered BH123 has frequent interactive activities in a specific area and has strong social behavior. Activity analysis shows that the target pig numbered BH123 is more active. Eating analysis shows that the target pig numbered BH123 eats a lot, and excretion analysis shows that the target pig numbered BH123 has a high excretion frequency. Through these analysis results, pig farm managers can control the health level of the target pig numbered BH123.
[0045] Step 4: Perform a primary analysis on the target pig according to the analysis set of the target pig, obtain the primary analysis result and determine whether to trigger the secondary analysis mechanism according to the primary analysis result. If triggered, a type-one demand signal is generated; if not triggered, a type-two demand signal is generated; obtain the various behavioral analysis indicators of the target pig, namely, the excretion analysis value, the eating analysis value, the activity analysis value, and the interaction analysis value, and comprehensively calculate to obtain the primary analysis value YJi, which reflects the overall behavioral state of the target pig, which is equivalent to a comprehensive evaluation of its behavior; compare the primary analysis value with the preset trigger threshold. If the primary analysis value is greater than or equal to the preset trigger threshold, the secondary analysis mechanism is triggered; otherwise, it is not triggered. The purpose of this design is to judge whether further in-depth analysis is needed based on the comprehensive results of the primary analysis to deal with possible abnormal situations. For example, after a period of monitoring and analysis, a pig farm found that the primary analysis value of a pig was 0.8, while the preset trigger threshold was 0.7. According to the comparison results, the current behavior of the pig was judged to be abnormal, so the secondary analysis mechanism was triggered and a type of demand signal was generated, prompting the farmer to conduct further observation and analysis. For another pig, the primary analysis value was 0.6, which did not reach the trigger threshold, and a type of demand signal was generated, prompting the farmer to continue routine monitoring without additional attention or processing.
[0046] Step 5: When a type 1 demand signal is generated, a secondary analysis is performed on the target pig to generate a secondary analysis result; when a type 2 demand signal is generated, no secondary analysis is performed on the target pig.
[0047] Class I demand signal processing: When a class I demand signal is generated, a secondary analysis is performed on the target pig, which means that when an abnormal behavior of the pig is detected, its behavior pattern is further analyzed in detail to determine if there are potential health issues or abnormalities.
[0048] Class II demand signal processing: When a class II demand signal is generated, the system does not perform secondary analysis on the target pig, but directly assigns its secondary analysis value to 0, which means that when the system believes that the pig's behavior is normal, no further in-depth analysis is required to avoid unnecessary waste of resources.
[0049] The first type of demand signal indicates that abnormal behavior of the target pig has been detected, and a secondary analysis of the pig is required based on comprehensive considerations. The panting frequency, duration of abnormal posture, and blinking frequency behavioral characteristics are counted, and the secondary analysis value is calculated based on the preset standard value and abnormal coefficient. This process helps to further confirm the health status of the pig and the degree of behavioral abnormality. The second type of demand signal indicates that the system believes that the pig's behavior is normal and no in-depth analysis is required. In this case, the secondary analysis value of the pig is directly assigned to 0 to save resources and avoid unnecessary intervention.
[0050] Step 6: Perform a joint analysis operation based on the primary and secondary analysis results of the target pigs to obtain a joint analysis value, and issue different levels of warning signals based on the joint analysis value; the calculation of the joint analysis value uses the primary and secondary analysis values, and performs a weighted summation through a certain weighting coefficient to comprehensively consider the pig's behavior, which can more accurately assess the pig's overall health status and the degree of behavioral abnormality, h1, h2 It is a preset joint coefficient, which is used to adjust the weight of the primary analysis value and the secondary analysis value in the joint analysis. By adjusting these coefficients, the importance of the primary and secondary analysis results can be flexibly controlled to adapt to the actual needs in different situations. Different thresholds can be set according to the size of the joint analysis value. When the joint analysis value exceeds or reaches the preset threshold, different levels of warning signals will be issued accordingly. The joint analysis interval-warning level form can also be preset. According to the warning level corresponding to the interval in which the joint analysis value falls, the corresponding warning signal will be issued to prompt the breeder to take relevant management and intervention measures; for example: assuming that the primary analysis value represents the deviation between the actual activity level of the pig and the normal activity level, and the secondary analysis value represents the abnormality of the pig, in the joint analysis, the joint analysis value falls into the preset joint analysis interval corresponding to the fifth warning level, and the fifth level warning signal is issued to remind the breeder to observe and deal with it.
[0051] In step one, when numbering, the target pig has the same number as the positioning device it wears. The information obtained is considered valid only when the position of the target pig in the monitoring is consistent with the position of the positioning device it wears. Otherwise, an invalid signal needs to be sent to the relevant management personnel to re-wear the positioning device.
[0052] Interaction analysis of target pigs refers to:
[0053] Draw a graph of the maximum activity range of the target pig, and divide the graph according to the preset standard to obtain m sub-graphs, such as dividing a rectangular area into m sub-graphs, and classifying the m sub-graphs into low-level interactive sub-graphs, medium-level interactive sub-graphs, and high-level interactive sub-graphs according to the preset standard. Obtain the total residence time of the target pig in the low-level interactive sub-graphs, the total residence time in the medium-level interactive sub-graphs, and the total residence time in the high-level interactive sub-graphs, and mark the total residence time of the target pig in the low-level interactive sub-graphs as t1, the total residence time in the medium-level interactive sub-graphs as t2, and the total residence time in the high-level interactive sub-graphs as t3. The total residence time of the target pig in each classified sub-graph can reflect the pig's residence preference in different activity areas. Then calculate the target pig's interaction analysis value: ; JHi is the interaction analysis value of the target pig, which is a comprehensive indicator calculated based on the target pig's residence time in different levels of interaction sub-graphs and the interaction coefficient, and is used to evaluate the pig's interaction level. f1, f2, and f3 are all preset interaction coefficients and are not zero. These coefficients are used to adjust the degree of influence of the residence time of each level of interaction sub-graphs on the interaction analysis value, and represent the importance weights of activity areas of different levels. T1 is the preset total standard residence time in low-level interaction sub-graphs, T2 is the preset total standard residence time in medium-level interaction sub-graphs, and T3 is the preset total standard residence time in high-level interaction sub-graphs. The preset total standard residence time T1, T2, and T3 in low / medium / high-level interaction sub-graphs are set in advance to represent the standard of residence time in each level of interaction sub-graphs.
[0054] Classifying m sub-graphs into low-level interactive sub-graphs, medium-level interactive sub-graphs, and high-level interactive sub-graphs according to preset standards means:
[0055] Sub-graphs in which the number of pigs existing simultaneously in the same sub-graph is greater than n2 are classified as high-level interactive sub-graphs, sub-graphs in which the number of pigs existing simultaneously in the same sub-graph is less than n1 are classified as low-level interactive sub-graphs, and sub-graphs in which the number of pigs existing simultaneously in the same sub-graph is not less than n1 and not greater than n2 are classified as medium-level interactive sub-graphs.
[0056] The logic of activity analysis for target pigs is:
[0057] The walking trajectory of the target pig is collected, which is the moving trajectory data of the target pig within a certain period of time collected by positioning equipment or other sensors. The total distance of the walking trajectory is marked as L1, which means the total distance walked by the target pig within the collected time period. The number of walking trajectories of the target pig in the m sub-graphs is marked as L2. The activity value of the target pig is obtained by calculation: ; k1 and k2 are both preset proportional coefficients, HDi is the activity value of the target pig, which is an indicator calculated based on the walking trajectory data of the target pig, used to indicate the activity degree or activity level of the pig, obtain the activity values of multiple adjacent preset time windows of the target pig, and then calculate the average value of the multiple adjacent preset time windows and mark it as PJ, and calculate the current activity value HDi of the target pig as follows: ; DDi is the activity analysis value of the target pig, which is used to evaluate the deviation of the overall activity level of the pig relative to historical data.
[0058] Feeding analysis for target pigs refers to:
[0059] Obtain the target pig’s feeding amount and remaining amount at the trough each time in the preset time window, mark each feeding amount at the trough as TWi, and mark each remaining amount at the trough as SYi, and obtain the target pig’s feeding analysis value by calculation: ; JSi is the feeding analysis value of the target pig, which is an indicator calculated based on the feeding situation of the target pig within the preset time window and is used to evaluate the feeding level of the pig. Si is the preset proportional coefficient corresponding to the feeding time segment, which is used to adjust the influence of the feeding amount and residual amount at different feeding times on the feeding analysis value, such as feeding in the morning, noon and evening;
[0060] Excretion analysis of target pigs refers to:
[0061] The monitoring range is divided into activity area, eating area, and excretion area. The number of times the target pig enters the excretion area within the preset time window is recorded and marked as JRi. The excretion analysis value of the target pig is obtained by calculation: ; PXi is the excretion analysis value of the target pig, which is an indicator calculated based on the excretion situation of the target pig within the preset time window. It is used to evaluate the excretion activity level of the pig. XZ is the standard number of entering the excretion area within the preset time window.
[0062] In step 4, the target pig is subjected to primary analysis according to the analysis set of the target pig, the primary analysis result is obtained, and the secondary analysis mechanism is determined according to the primary analysis result. This means:
[0063] Obtain the excretion analysis value PXi, feeding analysis value JSi, activity analysis value DDi, and interaction analysis value JHi in the target pig's analysis set, and then obtain the primary analysis value through the following calculation: ; y1, y2, y3, and y4 are preset comparison thresholds respectively; j1, j2, j3, and j4 are preset proportional coefficients used to adjust the weights of various analysis values; YJi is the primary analysis value, which is a comprehensive indicator calculated based on multiple analysis values such as excretion, eating, activity, and interaction. The primary analysis value YJi is compared with the preset trigger threshold. If the primary analysis value YJi is greater than or equal to the preset trigger threshold, the secondary analysis mechanism is triggered; if the primary analysis value YJi is less than the preset trigger threshold, the secondary analysis mechanism is not triggered.
[0064] In step 5, the secondary analysis of the target pig refers to:
[0065] When the second type demand signal is generated, the target pig is not subjected to secondary analysis, and the secondary analysis value of the target pig is assigned to 0;
[0066] When a demand signal is generated, the following operations are performed on the target pig:
[0067] The target pig's panting frequency and total duration of abnormal posture were counted in the preset time window, and the target pig's blinking frequency was recorded under multiple preset lighting brightnesses. The target pig's panting frequency was marked as YC1i, and the total duration of abnormal posture was marked as YC2i. The target pig's blinking frequency recorded under multiple preset lighting brightnesses was marked as ZYi, and then the secondary analysis value was obtained by calculation: ; BZi is the preset standard value corresponding to the blinking frequency ZYi of the target pig under multiple lighting brightnesses, R is the number of different lighting brightnesses, the preset number of different lighting brightnesses is used to record the blinking frequency of the target pig under different ambient lighting, e1, e2, and e3 are all preset abnormal coefficients, which are used to adjust the influence weights of panting frequency, abnormal posture, and blinking frequency on the secondary analysis value, EJi is the secondary analysis value, which evaluates the degree of abnormal behavior of the target pig. The larger the value, the higher the degree of abnormal behavior of the target pig.
[0068] In step 6, the conjoint analysis value is obtained through the following logic:
[0069] Obtain the primary analysis value YJi and the secondary analysis value EJi, and then perform the following calculations: ; h1 and h2 are both preset joint coefficients, and LHi is the joint analysis value. The larger the value, the greater the probability of the target pig being sick, and the more it needs to be observed, and intervention measures such as isolation feeding and treatment may need to be implemented.
[0070] The above formulas are all dimensionless and numerical calculations. The formula is a formula for the most recent real situation obtained by collecting a large amount of data and performing software simulation. The preset parameters in the formula are set by technicians in this field according to actual conditions.
[0071] It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0072] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A method for monitoring sick pig behavior based on image recognition, characterized in that: The following steps are involved: Step 1: Each pig is equipped with a positioning device and numbered, and the numbering results are transmitted to the monitoring platform; Step 2: The monitoring platform collects images of each pig to obtain a subset of image information collected of the target pig, and aggregates all subsets of image information collected to obtain a total set of monitoring information collected; Step 3: Based on the total set of monitoring information collected, interaction analysis, activity analysis, eating analysis, and excretion analysis are performed on the target pigs to obtain an analysis set of the target pigs; Step 4: Perform primary analysis on the target pigs according to the analysis set of the target pigs, obtain the primary analysis results, and determine whether to trigger the secondary analysis mechanism according to the primary analysis results. If triggered, a first-class demand signal is generated; if not, a second-class demand signal is generated; Step 5: When a first-class demand signal is generated, a secondary analysis is performed on the target pig to generate a secondary analysis result; when a second-class demand signal is generated, no secondary analysis is performed on the target pig; Step 6: Perform a joint analysis operation based on the primary analysis results and the secondary analysis results of the target pig to obtain a joint analysis value, and issue different levels of early warning signals based on the joint analysis value; In step 1, when numbering, the target pig has the same number as the positioning device it wears; Interaction analysis of target pigs refers to: Draw a graph of the maximum activity range of the target pig, divide the graph according to the preset standard, and obtain m sub-graphs. According to the preset standard, classify the m sub-graphs into low-level interactive sub-graphs, medium-level interactive sub-graphs, and high-level interactive sub-graphs, obtain the total residence time of the target pig in the low-level interactive sub-graphs, the total residence time in the medium-level interactive sub-graphs, and the total residence time in the high-level interactive sub-graphs, and mark the total residence time of the target pig in the low-level interactive sub-graphs as t1, the total residence time in the medium-level interactive sub-graphs as t2, and the total residence time in the high-level interactive sub-graphs as t3, and then calculate the interaction analysis value of the target pig: ; JHi is the interaction analysis value of the target pig, f1, f2, and f3 are all preset interaction coefficients and are not zero, T1 is the preset total standard stay time in the low-level interaction sub-graph, T2 is the preset total standard stay time in the middle-level interaction sub-graph, and T3 is the preset total standard stay time in the high-level interaction sub-graph; Classifying m sub-graphs into low-level interactive sub-graphs, medium-level interactive sub-graphs, and high-level interactive sub-graphs according to preset standards means: Sub-graphs in which the number of pigs existing simultaneously in the same sub-graph is greater than n2 are classified as high-level interactive sub-graphs, sub-graphs in which the number of pigs existing simultaneously in the same sub-graph is less than n1 are classified as low-level interactive sub-graphs, and sub-graphs in which the number of pigs existing simultaneously in the same sub-graph is not less than n1 and not greater than n2 are classified as medium-level interactive sub-graphs.
2. The method for monitoring sick pig behavior based on image recognition according to claim 1, characterized in that: The logic of activity analysis for target pigs is: The walking trajectories of the target pigs are collected, the total distance of the walking trajectories is marked as L1, the number of walking trajectories of the target pigs in the m sub-graphs is marked as L2, and the activity value of the target pigs is obtained by calculation: ; k1 and k2 are both preset proportional coefficients, HDi is the activity value of the target pig, the activity values of multiple adjacent preset time windows of the target pig are obtained, and then the average value of the multiple adjacent preset time windows is calculated and marked as PJ, and the current activity value HDi of the target pig is calculated as follows: ; DDi is the activity analysis value of the target pig.
3. The method for monitoring sick pig behavior based on image recognition according to claim 2, characterized in that: Feeding analysis for target pigs refers to: Obtain the target pig’s feeding amount and remaining amount at the trough each time in the preset time window, mark each feeding amount at the trough as TWi, and mark each remaining amount at the trough as SYi, and obtain the target pig’s feeding analysis value by calculation: ; JSi is the feeding analysis value of the target pig, and si is the preset proportional coefficient corresponding to the feeding time segment; Excretion analysis of target pigs refers to: The monitoring range is divided into activity area, eating area, and excretion area. The number of times the target pig enters the excretion area within the preset time window is recorded and marked as JRi. The excretion analysis value of the target pig is obtained by calculation: ; PXi is the excretion analysis value of the target pig, and XZ is the standard number of entering the excretion area within the preset time window.
4. The method for monitoring sick pig behavior based on image recognition according to claim 3 is characterized in that: In step 4, the target pig is subjected to primary analysis according to the analysis set of the target pig, the primary analysis result is obtained, and the secondary analysis mechanism is determined according to the primary analysis result. This means: Obtain the excretion analysis value PXi, feeding analysis value JSi, activity analysis value DDi, and interaction analysis value JHi in the target pig's analysis set, and then obtain the primary analysis value through the following calculation: ; y1, y2, y3, y4 are preset comparison thresholds respectively, j1, j2, j3, j4 are preset proportional coefficients, YJi is the primary analysis value, the primary analysis value YJi is compared with the preset trigger threshold, if the primary analysis value YJi is greater than or equal to the preset trigger threshold, the secondary analysis mechanism is triggered, if the primary analysis value YJi is less than the preset trigger threshold, the secondary analysis mechanism is not triggered.
5. The method for monitoring sick pig behavior based on image recognition according to claim 4, characterized in that: In step 5, the secondary analysis of the target pig refers to: When the second type demand signal is generated, the target pig is not subjected to secondary analysis, and the secondary analysis value of the target pig is assigned to 0; When a demand signal is generated, the following operations are performed on the target pig: The target pig's panting frequency and total duration of abnormal posture were counted in the preset time window, and the target pig's blinking frequency was recorded under multiple preset lighting brightnesses. The target pig's panting frequency was marked as YC1i, and the total duration of abnormal posture was marked as YC2i. The target pig's blinking frequency recorded under multiple preset lighting brightnesses was marked as ZYi, and then the secondary analysis value was obtained by calculation: ; BZi is the preset standard value corresponding to the blinking frequency ZYi of the target pig under multiple lighting brightnesses, R is the number of different lighting brightnesses, e1, e2, and e3 are all preset abnormal coefficients, and EJi is the secondary analysis value.
6. The method for monitoring sick pig behavior based on image recognition according to claim 5, characterized in that: In step 6, the conjoint analysis value is obtained through the following logic: Obtain the primary analysis value YJi and the secondary analysis value EJi, and then perform the following calculations: ; h1 and h2 are preset joint coefficients, and LHi is the joint analysis value.
Citation Information
Patent Citations
Binocular vision intelligent detection method and system
CN113869130A
