Pig state identification method and device based on image acquisition and medium

By using OpenPose pose recognition algorithm and big data training, the pig image recognition model is output, which solves the problem of low pig state recognition accuracy in the prior art, and realizes high accuracy and adaptability of pig health monitoring and early warning.

CN119580301APending Publication Date: 2025-03-07厦门农芯数字科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411558760.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-04
Publication Date
2025-03-07

AI Technical Summary

Technical Problem

The existing image recognition methods have low recognition accuracy and poor adaptability in pig state recognition, and cannot accurately identify key states such as shortness of breath, cough, asthma, and abdominal breathing in pigs.

Method used

By obtaining multiple video data of pigs, using the OpenPose pose recognition algorithm to obtain the node information of pig bones, conduct big data training, and output a pig-based image recognition model to realize real-time recognition and early warning of pig states in different columns.

Benefits of technology

It improves the accuracy and adaptability of pig status recognition, realizes real-time monitoring and early warning of pig health status, improves breeding efficiency, and provides farmers with a scientific decision-making basis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119580301A_ABST
    Figure CN119580301A_ABST
Patent Text Reader

Abstract

The invention provides a pig state identification method and device based on image acquisition and a storage medium. The recognition method comprises the steps that multiple pieces of first video data of a pig are obtained, and the first video data comprise video data in at least one of the four states of tachypnea, cough, asthma and abdominal respiration; using an OpenPose attitude recognition algorithm to obtain all frames in the first video data segment, and outputting at least six articulation points, including a lower jaw, an upper jaw, a head, shoulders, a back and a hip, of pig bones of all the frames; first relative positions and first change information of at least six joint points of pig bones of all frames are obtained, big data training is carried out after corresponding labeling is carried out, and labeling refers to labeling according to four states of tachypnea, cough, asthma and abdominal respiration; outputting a pig-based image recognition model; and according to the image identification model, carrying out state identification on the pigs in different fences.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a method, a device and a storage medium for identifying the state of a pig based on image acquisition. Background Art

[0002] In animal husbandry, the health status of pigs is directly related to breeding benefits and food safety. Traditional methods of monitoring pig health mainly rely on manual observation, which is not only time-consuming and labor-intensive, but also prone to missing subtle health problems. With the development of computer vision technology, image recognition technology has gradually been applied to the field of animal health monitoring. However, existing image recognition methods still have problems such as low recognition accuracy and poor adaptability in pig status recognition, and cannot accurately identify key states of pigs such as shortness of breath, coughing, panting, and abdominal breathing. Summary of the invention

[0003] The present invention provides a method, device and storage medium for identifying the state of a pig based on image acquisition, which can effectively solve the above-mentioned problem.

[0004] The present invention is achieved in that: The present invention provides a method for identifying the state of a pig based on image acquisition, comprising the following steps: S11, obtaining a plurality of first video data of the pig, wherein the first video data includes video data of at least one of the four states of shortness of breath, coughing, panting, and abdominal breathing; S12, using the OpenPose posture recognition algorithm, obtaining all frames in the first video data segment, and outputting at least 6 joint points of the pig skeleton in all frames, including: mandible, upper jaw, head, shoulder, back, and buttocks; S13, obtaining the first relative positions and first change information of at least six joints of the pig skeleton in all frames, and performing big data training after corresponding annotation, wherein the annotation refers to: annotating according to four states: shortness of breath, coughing, wheezing, and abdominal breathing; S14, outputting a pig-based image recognition model; S15, identifying the status of pigs in different pens according to the image recognition model and issuing an early warning.

[0005] The present invention also provides a pig status recognition device based on image acquisition, comprising: processor; A memory for storing processor executable instructions; wherein the processor is configured to call the instructions stored in the memory to execute the above method.

[0006] The present invention also provides a computer-readable storage medium storing a computer program, wherein the computer program can be executed by a processor of a device where the computer-readable storage medium is located to implement the above method.

[0007] The beneficial effects of the present invention are: 1. By collecting multiple video data of pigs and using the OpenPose posture recognition algorithm to obtain the joint point information of pig bones, the accuracy and adaptability of recognition are improved; 2. Through big data training, an image recognition model based on pigs was output, which realized real-time recognition and early warning of the status of pigs in different pens, and improved the efficiency of health monitoring; 3. The corresponding treatment suggestions can be output according to the identified pig status, providing farmers with a scientific decision-making basis. BRIEF DESCRIPTION OF THE DRAWINGS

[0008] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0009] Figure 1 It is a flow chart of a method for identifying pig status based on image acquisition provided in an embodiment of the present invention.

[0010] Figure 2 It is a pig skeleton joint point diagram in the pig state recognition method based on image acquisition provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0011] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the invention claimed for protection, but merely represents the selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0012] In the description of the present invention, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.

[0013] Reference Figure 1 and 2 As shown, an embodiment of the present invention provides a method for identifying the state of a pig based on image acquisition, comprising the following steps: S11, obtaining a plurality of first video data of the pig, wherein the first video data includes video data of four states: shortness of breath, coughing, panting, and abdominal breathing; S12, using the OpenPose posture recognition algorithm, obtaining all frames in the first video data segment, and outputting at least 6 joint points of the pig skeleton in all frames, including: mandible, upper jaw, head, shoulder, back, and buttocks; S13, obtaining the first relative positions and first change information of at least six joints of the pig skeleton in all frames, and performing big data training after corresponding annotation, wherein the annotation refers to: annotating according to four states: shortness of breath, coughing, wheezing, and abdominal breathing; S14, outputting a pig-based image recognition model; S15, identifying the status of pigs in different pens according to the image recognition model and issuing an early warning.

[0014] In step S12, the five joints of the mandible, upper mandible, head, shoulder, and hip can all be acquired through the OpenPose posture recognition algorithm. However, the present invention goes a step further and customizes the back joint through the two joints of the shoulder and hip, wherein the back joint can be the midpoint between the two joints of the shoulder and hip. The back joint is customized in the present invention to solve the problem of how to identify the abdominal breathing of pigs. When pigs breathe abdominally, their abdomens obviously rise and fall, causing the back joints to rise and fall rapidly, and through the definition of the back joints, they can be quickly identified.

[0015] In other embodiments, in step S11, the first video data also includes video data of the pigs eating. Therefore, correspondingly, in S13, the relative positions and change information of at least 6 joints of the pig skeleton in all frames are obtained, and the eating is marked and then the big data training is performed. As a further improvement, after step S15, it further includes: S161: Count the feeding time and frequency of the pigs in a unit time, and issue an alarm when the feeding time and frequency in a unit time are lower than the set value.

[0016] In other embodiments, in step S11, the first video data also includes video data of the pig drinking water. Therefore, correspondingly, in S13, the relative positions and change information of at least 6 joints of the pig skeleton in all frames are obtained, and the drinking water is annotated and then the big data training is performed. As a further improvement, after step S15, it further includes: S162: Count the duration and frequency of drinking water of the pigs in a unit time, and issue an alarm when the duration and frequency of drinking water in a unit time are lower than the set value. The unit can be half a day or a day. By counting the frequency and duration of drinking water and eating of the pigs, a basis for scientific breeding can be provided. Specifically, it can further include: Obtain the trends of the frequency and duration of drinking and eating of pigs during their growth, and carry out scientific breeding according to the trends, for example, add feed and water according to the trends. In addition, the feeding time, frequency, and amount of different pigs, especially sows, can also be obtained, so as to carry out targeted peak quantitative feeding for different sows, so as to improve breeding efficiency, reduce food waste, and reduce costs.

[0017] In other embodiments, in step S11, the first video data also includes video data of pigs in a static state of estrus. Therefore, correspondingly, in S13, the relative positions and change information of at least 6 joints of the pig skeleton in all frames are obtained, and the estrus static state is marked and then the big data training is performed. As a further improvement, after step S15, it further includes: S163: Count the duration and number of estrus standing still of the pigs in a unit time, and when the duration and number of estrus standing still in a unit time exceed the set value, an early warning is issued, and artificial breeding is performed. In other embodiments, it is also possible to judge whether the estrus state is in the early, middle or late stage according to the trend of the standing still duration, and breeding is performed according to different periods.

[0018] In other embodiments, in step S11, the first video data also includes video data of a pig in an anxious state. Therefore, correspondingly, in S13, the relative positions and change information of at least 6 joints of the pig skeleton in all frames are obtained, and the anxiety is annotated and then the big data training is performed. As a further improvement, after step S15, it further includes: S164: Count the duration and frequency of the pigs' anxiety within a unit time, and issue an early warning when the duration and frequency of the pigs' anxiety within a unit time exceed the set value.

[0019] In step S15, specifically, S151, obtaining second video data of pigs in different pens in a certain period of time; S152, using the OpenPose posture recognition algorithm, obtaining all frames in the second video data segment, and outputting at least 6 joint points of the pig skeleton in all frames, including: mandible, upper jaw, head, shoulder, back, and buttocks; S153, obtaining second relative positions and second change information of at least six joint points of the pig skeleton in all frames in the second video data segment; S154, matching the second relative position and the second change information with the first relative position and the first change information in the image recognition model to obtain the status of the pig, and issuing an early warning when the pig has potential symptoms.

[0020] It can be understood that the method of the present invention is based on the changes in the various joints of the pigs in different states, thereby generating image recognition models of the pigs in different states, which is conducive to the automated and high-accuracy monitoring of the status of the pigs during the automated breeding process.

[0021] The embodiment of the present invention further provides a device for identifying the state of a pig based on image acquisition, comprising: processor; A memory for storing processor-executable instructions; wherein the processor is configured to call the instructions stored in the memory to execute the data lake-based recommendation system data processing method.

[0022] An embodiment of the present invention further provides a computer-readable storage medium storing a computer program, wherein the computer program can be executed by a processor of a device where the computer-readable storage medium is located to implement the data lake-based recommendation system data processing method.

[0023] It should be understood by those skilled in the art that embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0024] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0025] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0026] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0027] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for identifying pig status based on image acquisition, characterized in that: The following steps are involved: S11, obtaining a plurality of first video data of the pig, wherein the first video data includes video data of at least one of the four states of shortness of breath, coughing, panting, and abdominal breathing; S12, using the OpenPose posture recognition algorithm, obtaining all frames in the first video data segment, and outputting at least 6 joint points of the pig skeleton in all frames, including: mandible, upper jaw, head, shoulder, back, and buttocks; S13, obtaining the first relative positions and first change information of at least six joints of the pig skeleton in all frames, and performing big data training after corresponding annotation, wherein the annotation refers to: annotating according to four states: shortness of breath, coughing, wheezing, and abdominal breathing; S14, outputting a pig-based image recognition model; S15, identifying the status of pigs in different pens according to the image recognition model.

2. The method for identifying pig status based on image acquisition according to claim 1, characterized in that: In step S11, the first video data also includes video data of the pigs in an eating state, a drinking state, a standing state in estrus, and an anxious state.

3. The method for identifying the state of a pig based on image acquisition according to claim 2, characterized in that: In step S11, the first video data also includes video data of pigs eating, and in S13, the relative positions and change information of at least 6 joints of the pig skeleton in all frames are obtained, and big data training is performed after eating annotation.

4. The method for identifying the state of a pig based on image acquisition according to claim 3, characterized in that: After step S15, the method further includes: S161: Count the feeding time and frequency of the pigs in a unit time, and issue an alarm when the feeding time and frequency in a unit time are lower than the set value.

5. The method for identifying pig status based on image acquisition according to claim 2, characterized in that: In step S11, the first video data also includes video data of the pig drinking water, and in S13, the relative positions and change information of at least 6 joints of the pig skeleton in all frames are obtained, and big data training is performed after the drinking water is marked.

6. The method for identifying the state of a pig based on image acquisition according to claim 3, characterized in that: After step S15, the method further includes: S162: Count the duration and frequency of drinking water of the pigs in a unit time, and issue an alarm when the duration and frequency of drinking water in a unit time are lower than the set value.

7. The method for identifying pig status based on image acquisition according to claim 2, characterized in that: In step S11, the first video data also includes video data of pigs in a standing state in estrus, and in S13, the relative positions and change information of at least 6 joints of the pig skeleton in all frames are obtained, and big data training is performed after estrus and standing state are marked.

8. The method for identifying the state of a pig based on image acquisition according to claim 7, characterized in that: After step S15, the method further includes: S162: Count the duration and frequency of estrus standing still of pigs in a unit time, and issue an early warning when the duration and frequency of estrus standing still in a unit time are higher than the set value, and carry out artificial breeding.

9. A pig status recognition device based on image acquisition, characterized in that: include: processor; A memory for storing processor-executable instructions; wherein the processor is configured to call the instructions stored in the memory to execute the method according to any one of claims 1 to 8.

10. A computer-readable storage medium, characterized in that: A computer program is stored, and the computer program can be executed by a processor of the device where the computer-readable storage medium is located to implement the method according to any one of claims 1 to 8.