Method for predicting disease of live pig, live pig monitoring device and computer readable storage medium
By recording the location and type of confinement devices, combined with the temperature and feed intake of pregnant sows, as well as the trajectory and temperature of the herd, the problem of inaccurate prediction of swine diseases under different confinement methods was solved, achieving efficient and low-cost swine disease monitoring.
Patent Information
- Application Number
- CN202310514063.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-08
- Publication Date
- 2026-02-06
- Estimated Expiration
- 2043-05-08
AI Technical Summary
Existing technologies cannot distinguish between pregnant sows and herds of pigs based on different rearing methods when predicting swine diseases, leading to inaccurate predictions. Furthermore, mobile monitors require frequent charging, resulting in significant labor and equipment costs.
By recording the location and type of confinement devices, and employing different disease prediction methods, the temperature and feed intake of pregnant sows, as well as the trajectory and temperature of the herd of pigs, are obtained. Data is acquired using a camera module, reducing labor and equipment costs.
It has improved the accuracy of swine disease prediction, reduced the workload of staff and equipment costs, and achieved more efficient swine disease monitoring.
Smart Images

Figure CN116530465B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of pig disease prediction, and in particular to a pig disease prediction method, a pig monitoring device and a computer readable storage medium. BACKGROUND
[0002] There are many types of pigs in a pig farm, including pregnant sows, fattening pigs, boars, and replacement gilts, etc. Among them, the pregnant sows are kept in a limited area after mating, and the fattening pigs, boars, and replacement gilts are kept in groups in a pigsty. Since different types of pigs are kept in different ways, the same method cannot be used to determine whether all pigs are abnormal when predicting whether the pigs have diseases. For example, if the trajectory information of the pigs is used to determine whether the pigs are abnormal, the pregnant sows will be judged as abnormal because they are kept separately in a limited area with a very small area, and the pregnant sows usually do not move a large range, so the pig disease prediction is not accurate.
[0003] A current ecological pig raising method for preventing and treating diseases is to carry a mobile monitor on the pig, the mobile monitor is provided with a two-dimensional code picture on the upper surface, the mobile monitor collects the body temperature of the pig and the location of the pig, and sends the collected information to a remote monitoring terminal; the feeding trough of the pig is divided into several feeding spaces, and a miniature camera and a two-dimensional code identifier are fixed in each feeding space, and by identifying the two-dimensional code on the pig and the location of the pig, the feeding of each pig can be monitored. Since the mobile monitor needs to be charged frequently, and the number of pigs in the pig farm is relatively large, when the mobile monitor needs to be charged, the feeder needs to take it off the pig, so as to charge it, and after charging is completed, it is worn on the pig again. Whether it is taken off or worn again, the pig often cannot cooperate, resulting in a large amount of time and effort of the feeder being consumed in the whole process. SUMMARY
[0004] The first object of the present application is to provide a pig disease prediction method which takes different disease prediction methods for pigs according to the keeping mode and reduces labor costs.
[0005] The second object of the present application is to provide a pig monitoring device which implements the above method.
[0006] The third object of the present application is to provide a computer readable storage medium which applies the above method.
[0007] In order to achieve the above-mentioned first purpose, the pig disease prediction method provided by the present application comprises the following steps: recording the position information of each enclosure device and the type of each enclosure device, the type of the enclosure device comprising a limiting fence and a pigsty; determining whether the type of the target enclosure device is a limiting fence or a pigsty; if the type of the target enclosure device is a limiting fence, obtaining the first video information of the target enclosure device and the feed intake of the pregnant sow, obtaining the first temperature information of the first pig ear of the pregnant sow from the first video information; determining whether the first temperature information is greater than a first preset value, if yes, further determining whether the feed intake is less than a second preset value, if yes, recording the abnormality of the pregnant sow; if the type of the target enclosure device is a pigsty, obtaining the second video information of the target enclosure device, obtaining the trajectory information of the group of pigs and the second temperature information of the second pig ear of the group of pigs from the second video information; calculating the moving distance of the group of pigs according to the trajectory information, recording a third preset time when the moving distance is less than a fourth preset value; determining whether the second temperature information is greater than a third preset value, if yes, further determining whether the third preset time is greater than a fourth preset time, if yes, recording the abnormality of the group of pigs.
[0008] As can be seen from the above scheme, the position information of the enclosure device and the type of the enclosure device are obtained, the position information of each enclosure device corresponds to a type of enclosure device, and different pig disease prediction methods are selected according to the type of the target enclosure device, thereby improving the accuracy of pig disease prediction. In addition, whether it is a pregnant sow or a group of pigs, the pig disease prediction method of the present application comprehensively analyzes whether the pig is sick through two dimensions, and the pig disease prediction is more accurate. In addition, the present application only obtains the data of the pig through the camera module, thereby reducing the work burden of the staff, and saving the cost of the equipment.
[0009] In a further scheme, determining whether the type of the target enclosure device is a limiting fence or a pigsty comprises: obtaining the target position information of the target enclosure device, and determining whether the type of the target enclosure device is a limiting fence or a pigsty according to the target position information of the target enclosure device.
[0010] As can be seen, since the position information of each enclosure device corresponds to a type of enclosure device, the target position information of the target enclosure device can be obtained to determine whether the type of the target enclosure device is a limiting fence or a pigsty.
[0011] In a further scheme, before obtaining the first video information of the target enclosure device, the following step is further performed: determining the first camera module to be used according to the target position information, and obtaining the first video information through the first camera module.
[0012] As can be seen, since each limiting fence has its corresponding camera module, when the target enclosure device is a limiting fence, the first camera module to be used can be determined according to the target position information.
[0013] In a further aspect, before acquiring the first video information of the target enclosure device, the method further comprises: sending a first instruction to the second camera module, the first instruction comprising information of moving to a target position.
[0014] Therefore, the second camera module is a movable camera module. When the target enclosure device is a limiting fence, the computer device can send a first instruction to the movable camera module to drive the second camera module to move to a target position, and then acquire second video information through the second camera module, which can reduce the number of camera modules and save costs.
[0015] In a further aspect, before acquiring the second video information of the target enclosure device, the method further comprises: determining a third camera module to be used according to the target position information, and acquiring the second video information through the third camera module.
[0016] Therefore, when the target enclosure device is a pigsty, each pigsty has a corresponding camera module because the trajectory information of a group of pigs needs to be acquired and the second video information has a long time span. Therefore, when the target enclosure device is a pigsty, the third camera module to be used can be determined according to the target position information.
[0017] In a further aspect, acquiring the first temperature information of the first pig ear of the pregnant sow from the first video information comprises: intercepting a plurality of frames of first video picture data from the first video information, adjacent two frames of first video picture data being separated by a first preset time, identifying the first pig ear from the first video picture data to obtain first position information of the first pig ear, and acquiring the first temperature information of the first pig ear from the first position information.
[0018] Therefore, because the pig ear has less hair and there is a significant correlation between the pig ear and the rectal temperature of the pig, the probability of false detection can be reduced by detecting the temperature of the pig ear.
[0019] In a further aspect, acquiring the trajectory information of the group of pigs from the second video information comprises: intercepting a plurality of frames of second video picture data from the second video information, adjacent two frames of second video picture data being separated by a second preset time, identifying the group of pigs from the second video picture data to obtain third position information of the group of pigs in the second video picture data, tracking a plurality of group pigs in the detected group of pigs based on a multi-target tracking algorithm to obtain the trajectory information of the group of pigs.
[0020] Therefore, the group of pigs is located by obtaining the third position information of the group of pigs, and then the trajectory information of the group of pigs is obtained by tracking a plurality of group pigs in the group of pigs.
[0021] In a further scheme, the second temperature information of the second ear of the group pig is obtained from the second video information, including: identifying the pig head of the group pig from the second video picture data according to the third position information, obtaining the fourth position information of the pig head of the group pig; identifying the second ear of the group pig from the second video picture data according to the fourth position information, obtaining the second position information of the second ear, and obtaining the second temperature information of the second ear from the second position information.
[0022] Therefore, since the pig ear has less body hair and there is a significant correlation between the pig ear and the rectal temperature of the live pig, the probability of false detection can be reduced by detecting the temperature of the pig ear.
[0023] In order to achieve the second purpose, the live pig monitoring device provided by the present application comprises a computer device and a plurality of camera modules, the computer device obtains video information from the plurality of camera modules, the computer device comprises a processor and a memory, the memory stores a computer program, and the computer program is executed by the processor to realize the live pig disease prediction method.
[0024] In order to achieve the third purpose, the computer readable storage medium provided by the present application stores a computer program, and the computer program is executed to realize the live pig disease prediction method. BRIEF DESCRIPTION OF DRAWINGS
[0025] Figure 1 is a structural system block diagram of an embodiment of the live pig monitoring device of the present application.
[0026] Figure 2 is a flowchart of an embodiment of the live pig disease prediction method of the present application.
[0027] The present application will be further described below in combination with the drawings and embodiments. DETAILED DESCRIPTION
[0028] Embodiment of live pig monitoring device:
[0029] Referring to Figure 1 , Figure 1 is a structural system block diagram of an embodiment of the live pig monitoring device of the present application. The live pig monitoring device comprises a computer device 1 and a camera module 2. The computer device 1 can obtain the video shot by the camera module 2. The computer device comprises a processor and a memory, the memory stores a computer program, and the computer program is executed by the processor to realize the content of the embodiment of the live pig disease prediction method.
[0030] The camera module 2 includes a visible light camera and an infrared thermal imaging camera. The camera module 2 can fuse a visible light image captured by the visible light camera and an infrared thermal imaging image captured by the infrared thermal imaging camera to form a fused image. The video captured by the camera module 2 is a video formed by the fused image. The camera module 2 can be a camera fixed above a pigsty or a limiting fence or a movable camera module. The movable camera module can be a track camera or a camera robot. When the camera module is a movable camera module, an instruction including information of moving to a target position can be sent to the camera module 2.
[0031] The pig disease prediction method embodiment is as shown in the flowchart of FIG. 1.
[0032] Referring to FIG. 1, Figure 2 , Figure 2 The pig disease prediction method embodiment is as shown in the flowchart of FIG. 1. The computer device 1 first performs step S11 to record position information of each confinement device and a type of each confinement device. The type of the confinement device is a limiting fence and a pigsty. Among them, pregnant sows are individually raised in the limiting fence, and fattening pigs, boars, and replacement gilts are collectively raised in the pigsty. The position information of each confinement device corresponds to the type of one confinement device, and the type of the confinement device can be determined by the position information of the confinement device.
[0033] After recording the position information of each confinement device and the type of each confinement device, step S12 is performed to determine whether the type of the target confinement device is a limiting fence. The type of the target confinement device can be a limiting fence or a pigsty. When the type of the target confinement device is not a limiting fence, it is a pigsty. Since the position information of each confinement device corresponds to the type of one confinement device, the computer device 1 can obtain target position information of the target confinement device, and determine whether the type of the target confinement device is a limiting fence or a pigsty according to the target position information of the target confinement device.
[0034] If the target confinement device is a limiting fence, step S13 is performed to obtain first video information of the target confinement device and a feed intake of the pregnant sow, and first temperature information of a first pig ear of the pregnant sow is obtained from the first video information. The first video information is obtained by the camera module 2, and the feed intake of the pregnant sow is obtained by a feeder with a metering function.
[0035] In another embodiment, since the target confinement device is a limiting fence, the camera module 2 is a camera fixed above the limiting fence, and one limiting fence can correspond to one camera module 2. Therefore, the computer device 1 determines a first camera module used according to the target position information, and obtains the first video information through the first camera module.
[0036] In another embodiment, the target enclosure device is a limiting fence, and the camera module 2 is a movable camera module. The computer device 1 sends a first instruction to the second camera module, and the first instruction includes information for moving to a target position. This embodiment can save camera modules and save costs.
[0037] The first temperature information of the first pig ear of the pregnant sow is obtained from the first video information. A plurality of frames of first video picture data are intercepted from the first video information, and adjacent two frames of first video picture data are separated by a first preset time. The first pig ear is identified from the first video picture data to obtain first position information of the first pig ear. The first temperature information of the first pig ear is obtained from the first position information.
[0038] The first position information of the first pig ear is obtained by inputting the first video picture data into a pig identification model to obtain the position information of the pregnant sow, inputting the position information of the pregnant sow and the first video picture data into a pig head identification model to obtain the position information of the pig head of the pregnant sow, and inputting the position information of the pig head of the pregnant sow and the first video picture data into a pig ear identification model to obtain the first position information of the first pig ear. The pig identification model, the pig head identification model, and the pig ear identification model are established based on a YOLO image recognition algorithm.
[0039] The feed intake of the pregnant sow is obtained by a feeder, and the feeding amount of the feeder is obtained by a feeding curve. The feeding curve is stored in the computer device 1, and the feeding curve is a relationship curve between the feeding amount and the pregnancy date. The feeding curve is calculated by obtaining the daily feed intake, the parity, the per-farrowing data, the stillbirth rate of piglets, the birth weight of piglets, the ideal birth litter weight, the weaning weight of piglets, and the weaning litter weight of a plurality of pregnant sows in a pregnancy cycle. The feeding curve includes the feeding curve of each parity, and the computer device 1 can obtain the corresponding feeding amount according to the pregnancy date and the parity of the pregnant sow, and then send the feeding amount to the feeder. The feeder feeds the feed according to the feeding amount.
[0040] After the computer device 1 obtains the first temperature information and the feed intake of the pregnant sow, step S14 is performed to determine whether the first temperature information is greater than a first preset value. For example, the first preset value is 39.5°C.
[0041] If the first temperature information is greater than the first preset value, step S15 is further performed to determine whether the feed intake is less than a second preset value. The feed threshold of the pregnant sow is set to 0.5 kg, and the second preset value is the feeding amount of the feeder minus the feed threshold. If the feed intake is less than the second preset value, step S16 is performed to record that the pregnant sow is abnormal, predict that the pregnant sow is ill, and notify the staff to further check the pregnant sow. If the feed intake is greater than the second preset value, step S17 is performed to record that the pregnant sow is normal, and the staff does not need to be notified to further check the pregnant sow.
[0042] In step S14, if the first temperature information is less than the first preset value, step S17 is performed to record that the pregnant sow is normal. In this embodiment, whether the pregnant sow is sick is analyzed by obtaining the temperature and the feed intake of the pregnant sow, so that the prediction of the disease of the pregnant sow is more accurate, and the labor cost of the staff is reduced.
[0043] In step S12, if the target enclosure device is a pigsty, step S18 is performed to obtain second video information of the target enclosure device, and track information of the group pigs and second temperature information of the second ear of the group pig are obtained from the second video information. Since the group pigs are raised in the pigsty, the pigsty is generally provided with only one feeding trough, and the feeding conditions of each group pig cannot be determined, so when determining whether the group pigs in the pigsty are sick, the temperature information and the track information are used to comprehensively analyze whether the group pigs are sick.
[0044] Since the track information of the group pigs needs to be obtained from the second video information, the time of the second video is relatively long, and the camera module 2 above the pigsty is fixed, so the computer device 1 determines the third camera module used according to the target position information, and obtains the second video information through the third camera module.
[0045] The track information of the group pigs is obtained by extracting multiple frames of second video picture data from the second video information, the interval between adjacent two frames of second video picture data is a second preset time, the pig group is recognized from the second video picture data, and third position information of the pig group in the second video picture data is obtained. The third position information of the pig group is obtained by inputting the second video picture data into a piglet recognition model. After obtaining the third position information of the pig group, multiple group pigs in the detected pig group are tracked based on a multi-target tracking algorithm to obtain the track information of the group pigs. The multi-target tracking algorithm can be a DeepSort multi-target tracking algorithm.
[0046] The temperature information of the second ear is obtained by recognizing the pig head of the group pig from the second video picture data according to the third position information, obtaining fourth position information of the group pig, recognizing the second ear of the group pig from the second video picture data according to the fourth position information, obtaining second position information of the second ear, and obtaining second temperature information of the second ear from the second position information. The pig head of the group pig is recognized by a pig head recognition model, and the second ear of the group pig is recognized by a pig ear model.
[0047] After the computer device 1 obtains the track information and the second temperature information of the group pigs, step S19 is performed to calculate the moving distance of the group pigs according to the track information, and a third preset time when the moving distance is less than or equal to a fourth preset value is recorded. Since the pigsty has a certain activity space, the group pigs can move in the pigsty, and the moving distance of the group pigs is a factor for determining whether the group pigs are sick. The fourth preset value can be set to 0.2 meters, or even 0, so that the time when the group pigs do not move is recorded.
[0048] In another embodiment, the third preset time of recording the moving distance less than the fourth preset value is single recording, and the third preset time is the time of single moving of the group of pigs.
[0049] In another embodiment, the third preset time of recording the moving distance less than the fourth preset value is cumulative recording, and the third preset time is the cumulative time of recording the immobility of the group of pigs within 24 hours.
[0050] After calculating the moving distance of the group of pigs according to the trajectory information, step S20 is performed to determine whether the second temperature information is greater than a third preset value. For example, the third preset value is 39.5°C. If the second temperature information is greater than the third preset value, step S21 is further performed to determine whether the third preset time is greater than a fourth preset time.
[0051] In another embodiment, the fourth preset time is set to 12 hours, and the third preset time is the time of single immobility of the group of pigs. When the group of pigs almost does not move within 12 hours, the group of pigs is recorded as abnormal.
[0052] In another embodiment, the fourth preset time is set to 20 hours, and the third preset time is the cumulative time of recording the immobility of the group of pigs within 24 hours. When the cumulative time of recording the immobility of the group of pigs within 24 hours is greater than 20 hours, the group of pigs is recorded as abnormal.
[0053] If the third preset time is greater than the fourth preset time, step S22 is performed to record the group of pigs as abnormal, predict that the group of pigs is ill, and notify the staff to further check the group of pigs. If the third preset time is less than the fourth preset time, the group of pigs is recorded as normal, and the staff does not need to be notified to further check the group of pigs.
[0054] In step S20, if the second temperature information is less than the third preset value, step S23 is performed to record the group of pigs as normal. In this embodiment, the temperature and trajectory information of the group of pigs are obtained to comprehensively analyze whether the group of pigs is ill, and the prediction of the disease of the group of pigs is more accurate, thereby reducing the labor cost of the staff.
[0055] In this embodiment, the position information of the enclosure device and the type of the enclosure device are obtained, the position information of each enclosure device corresponds to a type of enclosure device, different pig disease prediction methods are selected according to the type of the target enclosure device, and the accuracy of the pig disease prediction is improved. In addition, whether it is a pregnant sow or a group of pigs, the pig disease prediction method of this embodiment comprehensively analyzes whether the pig is ill in two dimensions, and the prediction of the disease of the pig is more accurate. In addition, this embodiment only obtains the data of the pig through the camera module, thereby saving the labor cost and the cost of the equipment.
[0056] Computer readable storage medium embodiment:
[0057] The computer device pig disease prediction method described in the above embodiments can be stored in a computer readable storage medium in the form of a computer program, which can complete the steps of the above computer device pig disease prediction method embodiments when executed by a processor. The computer readable medium can be a computer readable signal medium or a computer readable storage medium. The computer readable storage medium may, for example, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or component, or any combination thereof. More specific examples (non-exhaustive list) of the computer readable storage medium include an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0058] The above is only the preferred embodiment of the present application, but the inventive design concept is not limited thereto, and more other equivalent embodiments can be included without departing from the inventive concept, and various obvious changes, re-adjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present application.
Claims
1. A pig monitoring method, comprising: recording position information of each enclosure device and a type of each enclosure device, the type of the enclosure device including a limiting fence and a pigsty; individually raising a pregnant sow in the limiting fence and raising a group of pigs in the pigsty; determining whether a type of a target enclosure device is the limiting fence or the pigsty; if the type of the target enclosure device is the limiting fence, only acquiring first video information of the target enclosure device and a feed intake of the pregnant sow, and acquiring first temperature information of a first pig ear of the pregnant sow from the first video information; determining whether the first temperature information is greater than a first preset value, and if so, further determining whether the feed intake is less than a second preset value, and if so, recording an abnormality of the pregnant sow; if the type of the target enclosure device is the pigsty, acquiring second video information of the target enclosure device, and acquiring trajectory information of the group of pigs and second temperature information of a second pig ear of the group of pigs from the second video information; calculating a moving distance of the group of pigs according to the trajectory information, and recording a third preset time when the moving distance is less than a fourth preset value; determining whether the second temperature information is greater than a third preset value, and if so, further determining whether the third preset time is greater than a fourth preset time, and if so, recording an abnormality of the group of pigs. 2.The pig monitoring method of claim 1, wherein the determining whether the type of the target enclosure device is the limiting fence or the pigsty comprises: acquiring target position information of the target enclosure device, and determining the type of the target enclosure device according to the target position information. 3.The pig monitoring method of claim 2, wherein before the acquiring the first video information of the target enclosure device, the method further comprises: determining a first camera module to be used according to the target position information, and acquiring the first video information by using the first camera module. 4.The pig monitoring method of claim 2, wherein before the acquiring the first video information of the target enclosure device, the method further comprises: sending a first instruction to a second camera module, the first instruction comprising information of moving to the target position. 5.The pig monitoring method of claim 2, wherein before the acquiring the second video information of the target enclosure device, the method further comprises: determining a third camera module to be used according to the target position information, and acquiring the second video information by using the third camera module. 6.The pig monitoring method of claim 1, wherein the acquiring the first temperature information of the first pig ear of the pregnant sow from the first video information comprises: extracting a plurality of frames of first video picture data from the first video information, the adjacent two frames of first video picture data being separated by a first preset time, identifying the first pig ear from the first video picture data to obtain first position information of the first pig ear, and acquiring the first temperature information of the first pig ear from the first position information. 7.The pig monitoring method of claim 1, wherein the acquiring the second temperature information of the second pig ear of the group of pigs from the second video information comprises: extracting a plurality of frames of second video picture data from the second video information, the adjacent two frames of second video picture data being separated by a second preset time, identifying the second pig ear from the second video picture data to obtain second position information of the second pig ear, and acquiring the second temperature information of the second pig ear from the second position information. The trajectory information of the group of pigs is obtained from the second video information, and the trajectory information of the group of pigs comprises: a plurality of second video picture data is captured from the second video information, adjacent two frames of second video picture data are separated by a second preset time, a pig group is identified from the second video picture data, and third position information of the pig group in the second video picture data is obtained; a multi-target tracking algorithm is used to track a plurality of group pigs in the detected pig group, and trajectory information of the group of pigs is obtained.
8. The pig monitoring method of claim 7, wherein: the second temperature information of the second ear of the group of pigs is obtained from the second video information, and the second temperature information of the second ear of the group of pigs comprises: a pig head of the group of pigs is identified from the second video picture data according to the third position information, and fourth position information of the pig head of the group of pigs is obtained; a second ear of the group of pigs is identified from the second video picture data according to the fourth position information, and second position information of the second ear of the group of pigs is obtained; second temperature information of the second ear of the group of pigs is obtained from the second position information.
9. A live pig monitoring apparatus comprising a computer device and a plurality of camera modules, characterised in that: The computer device obtains video information from a plurality of camera modules, and the computer device comprises a processor and a memory, the memory stores a computer program, and the computer program is executed by the processor to implement the pig monitoring method of any one of claims 1 to 8.
10. A computer readable storage medium, which stores a computer program, and the computer program is executed to implement the pig monitoring method of any one of claims 1 to 8.
Citation Information
Patent Citations
Identification method and identification system for sick live pigs
CN115968810A