Pig physical sign information acquisition method and system

Through deep image segmentation and computer vision technology, combined with deep learning models, pig vital signs information is automatically collected, which solves the problems of time-consuming, labor-intensive and low-accuracy in existing technologies, realizes efficient and accurate pig information acquisition, reduces stress response and labor, and saves costs.

CN113947734BActive Publication Date: 2025-10-21INTELLIGENT EQUIPMENT RESEARCH CENTER BEIJING ACADEMY OF AGRICULTURE AND FORESTRY SCIENCES
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202111032758.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-03
Publication Date
2025-10-21
Estimated Expiration
2041-09-03

AI Technical Summary

Technical Problem

Existing methods of obtaining pig information are time-consuming and labor-intensive, have low accuracy, and are prone to causing stress reactions in pigs, making it difficult to achieve efficient and accurate information collection and management.

Method used

Using deep image segmentation and computer vision technology based on target detection algorithms, we acquire deep images of the pigs' backs through a depth-sensing camera, identify key points on the backs, and automatically collect the pigs' vital signs and identification information by combining image recognition and deep learning models.

Benefits of technology

It realizes the fully automated collection of pig vital signs information, avoids stress response, reduces labor, improves collection accuracy and efficiency, and saves breeding costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113947734B_ABST
    Figure CN113947734B_ABST
Patent Text Reader

Abstract

The application provides a pig physical information acquisition method and system, comprising: performing image segmentation on a pig group back depth image based on a target detection algorithm to obtain a back depth sub-image of any pig; obtaining back key point information of the pig according to the back depth sub-image, to determine an identity of the pig; performing image recognition on the back depth sub-image to obtain physical information of the pig; and binding and outputting the identity and the physical information. The pig physical information acquisition method and system provided by the application can automatically obtain the identity of each pig by performing target tracking and recognition on a pig group back depth image obtained by a depth camera; and can obtain physical information of each pig by performing image processing on a back depth sub-image of each pig; the whole information acquisition process does not contact the pig, so that stress reaction caused by environmental changes during pig detection is avoided, and labor is effectively reduced, and breeding cost is saved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of agricultural information technology, and in particular to a method and system for collecting pig vital sign information. Background Art

[0002] The pig farming production chain is very long. Generally speaking, it takes more than half a year for a pig to be born and sold. During this period, pigs often encounter various problems. Severe problems may even lead to the death of the pig group. Therefore, it is very important to obtain pig information in a timely and accurate manner.

[0003] Traditional methods of obtaining pig information rely primarily on visual inspection, sometimes supplemented by hand pressure for scoring and judgment. For smaller farms, this traditional method of obtaining pig information requires a lot of manpower, and for large-scale farms, it is simply not enough.

[0004] In existing pig farms, there are inaccuracies in the acquisition of pig information. During the measurement process, the pigs may be frightened and have a stress reaction, which is not conducive to group pig farming. It also easily leads to farmers being unable to accurately obtain correct pig information, resulting in the inability to provide timely management measures.

[0005] Therefore, finding an efficient and accurate method to obtain pig information, realize comprehensive monitoring and early warning of pig production, management, epidemic prevention and other aspects, and provide operational guidance to provide a good breeding environment and improve the production efficiency of pig farms is an urgent problem that the current pig farming industry needs to solve. Summary of the Invention

[0006] The present invention provides a method and system for collecting pig vital sign information, which are used to solve the defects of manual collection of pig information in the prior art, such as time-consuming, labor-intensive and low-precision, and realize fully automated collection of pig vital sign information.

[0007] In a first aspect, the present invention provides a method for collecting pig vital sign information, comprising:

[0008] Perform image segmentation on the pig herd's back depth image based on the target detection algorithm to obtain the back depth sub-image of any target pig;

[0009] Acquiring back key point information of the target pig according to the back depth sub-image to determine the identity of the target pig;

[0010] Performing image recognition on the back depth sub-image to obtain the physical sign information of the target pig;

[0011] The identity identifier is bound to the vital sign information and outputted.

[0012] According to a method for collecting pig physical sign information provided by the present invention, the physical sign information includes body length information, body height information, body width information and back fat information;

[0013] The performing image recognition on the back depth sub-image to obtain the physical sign information of the target pig includes:

[0014] Determine the two ear root position points, the tail root position point, and the top of the chinchilla of the target pig according to the back depth sub-image, and determine the center of mass of the target pig;

[0015] The length of the line between the midpoint of the line connecting the two ear roots and the tail root is used as the body length information;

[0016] The vertical distance from the top of the chignon to the ground is used as the body height information;

[0017] Determine the projection of the center of mass to each ear root position point, and use the sum of the lengths of the two projections as the body width information;

[0018] After rotational normalization of the back depth sub-image, a three-dimensional image of the buttocks shape of the target pig is obtained; the three-dimensional image of the buttocks shape is matched with a pre-constructed mapping table of buttocks shape and backfat thickness to obtain the backfat information.

[0019] According to a method for collecting pig physical sign information provided by the present invention, the physical sign information further includes: weight information;

[0020] The performing image recognition on the back depth sub-image to obtain the physical sign information of the target pig includes:

[0021] Inputting the back depth sub-image into a weight prediction model, and acquiring the weight information corresponding to the back depth sub-image according to an output result of the weight prediction model;

[0022] The weight prediction model is obtained by training based on back depth image samples with weight information labels.

[0023] A method for collecting pig vital sign information provided by the present invention further includes:

[0024] Obtain thermal infrared images of pig herds;

[0025] Mapping the thermal infrared image of the pig group to the depth image of the pig group's back;

[0026] Acquire a pig thermal infrared sub-image corresponding to the target pig's back depth sub-image;

[0027] The maximum temperature of all pixels in the pig thermal infrared sub-image is used as the temperature information of the target pig;

[0028] The temperature information, the identity identifier and the vital sign information are bound and output.

[0029] A method for collecting pig vital sign information provided by the present invention further includes:

[0030] Collect pig sound signals;

[0031] Inputting the pig group sound signal into an emotion classification model to obtain emotion information corresponding to the pig group sound signal;

[0032] The emotion classification model is obtained by optimizing the parameters of the Gaussian mixture model based on the weight coefficient combination of the feature parameters and the influence of the number of Gaussian mixtures on the recognition rate;

[0033] The characteristic parameters include zero-crossing rate, formant and Mel-frequency cepstral coefficient.

[0034] A method for collecting pig vital sign information provided by the present invention further includes:

[0035] Obtain near-infrared video of pigs;

[0036] Extracting a near-infrared image sequence containing the target pig from the near-infrared video of the pig herd;

[0037] Performing feature point detection on each frame of the near-infrared image sequence to obtain a sequence of regions of interest for pigs;

[0038] Calculating the pixel mean of each pig region of interest in the pig region of interest sequence to obtain a single-channel pixel mean time series;

[0039] Performing time delay processing on the single-channel pixel mean time series to obtain a dynamic embedding matrix;

[0040] Based on a blind source separation method, independent component analysis is performed on the dynamic embedding matrix to obtain multiple independent components;

[0041] Performing power spectrum analysis on each of the independent components to obtain target independent components containing heart rate information;

[0042] The heart rate information of the target pig is determined according to the frequency corresponding to the maximum amplitude of the target independent component.

[0043] According to a pig vital sign information collection method provided by the present invention, obtaining back key point information of the target pig based on the back depth sub-image to determine the identity of the target pig includes:

[0044] Combined with the target pig's physical sign change curve, the back key point information is optimized by feature fusion using the isometric feature mapping manifold learning algorithm; the physical sign change curve is constructed based on the Markov chain model;

[0045] The shape feature information generated after feature fusion optimization is input into a hybrid kernel function support vector machine to generate the identity of the target pig.

[0046] In a second aspect, the present invention further provides a pig vital sign information collection system, comprising: an image segmentation unit, configured to perform image segmentation on a pig herd back depth image based on a target detection algorithm to obtain a back depth sub-image of any target pig;

[0047] an identity recognition unit, configured to obtain key point information of the back of the target pig based on the back depth sub-image, so as to determine the identity of the target pig;

[0048] An information analysis unit, configured to perform image recognition on the back depth sub-image to obtain the physical sign information of the target pig;

[0049] An information output unit is used to bind the identity identifier and the vital sign information and output them.

[0050] In a third aspect, the present invention provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of any of the above-described methods for collecting pig vital signs information are implemented.

[0051] In a fourth aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the above-described methods for collecting pig vital signs information.

[0052] The method and system for collecting pig vital signs information provided by the present invention can automatically obtain the identity of each pig by performing target tracking and identification on the depth image of the pig herd's back obtained by the depth-sensing camera; and can obtain the vital signs information of each pig by performing image processing on the depth sub-image of the back of each pig; during the entire information collection process, no contact is made with the pigs, thereby avoiding stress reactions caused by environmental changes during pig detection, and at the same time effectively reducing labor and saving breeding costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] In order to more clearly illustrate the technical solutions in the present invention or the prior art, a brief introduction is given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0054] Figure 1 It is a schematic flow chart of the method for collecting pig vital sign information provided by the present invention;

[0055] Figure 2 This is a structural diagram of a pig vital sign information collection device provided by the present invention;

[0056] Figure 3 This is a schematic diagram of the working process of a pig vital sign information collection device provided by the present invention;

[0057] Figure 4 This is a schematic diagram of the distribution of key points on the back of a target pig provided by the present invention;

[0058] Figure 5 It is a structural diagram of the pig vital sign information collection system provided by the present invention;

[0059] Figure 6 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0060] To make the objectives, technical solutions, and advantages of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the embodiments described are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.

[0061] It should be noted that in the description of the embodiments of the present invention, the terms "comprise," "include," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, article, or device. Without further limitation, an element defined by the phrase "comprises a..." does not preclude the presence of additional identical elements in the process, method, article, or device comprising the element. The terms "upper," "lower," and the like, used to indicate orientations or positional relationships based on those shown in the accompanying drawings, are intended solely to facilitate the description of the present invention and simplify the description. They are not intended to indicate or imply that the system or element referred to must have a specific orientation, be constructed, or operate in a specific orientation, and are therefore not to be construed as limiting the present invention. Unless otherwise expressly specified or limited, the terms "mounted," "connected," and "connected" should be broadly construed, for example, to mean a fixed connection, a detachable connection, or an integral connection; a mechanical connection or an electrical connection; a direct connection or an indirect connection through an intermediate medium; or internal communication between two elements. For those skilled in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0062] The terms "first," "second," and the like in the specification and claims of this application are used to distinguish similar objects, and are not used to describe a specific order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate, so that the embodiments of this application can be implemented in an order other than that illustrated or described herein, and that the objects distinguished by "first," "second," and the like are generally of the same type, and do not limit the number of objects; for example, the first object can be one or more. In addition, the term "and / or" in the specification and claims refers to at least one of the connected objects, and the character " / " generally indicates that the objects connected are in an "or" relationship.

[0063] At present, many pig farms generally use traditional visual inspection methods to collect pig vital signs information. This method relies on the experience and responsibility of the inspectors, is highly subjective and inefficient. The judgment results will produce different measurement results due to different inspectors, and are easily affected by the natural environment, resulting in erroneous measurement results and misleading breeding management. It is also very time-consuming and labor-intensive.

[0064] To overcome the many drawbacks of visually inspecting pig vital signs, some farms use ultrasound to measure pig vital signs. However, ultrasound can affect the results due to the pigs' different postures, making them inaccurate.

[0065] Considering that the existing large-scale pig farm configuration pig vital signs information collection method and system cannot fully and accurately collect pig vital signs information, and the actual operation is complicated, the following is combined with Figures 1-6 The present invention introduces the method and system for collecting pig vital sign information.

[0066] Figure 1 Schematic diagram of the process of collecting pig vital signs information provided by the present invention, such as Figure 1 As shown, including but not limited to the following steps:

[0067] Step 101: performing image segmentation on the pig herd back depth image based on a target detection algorithm to obtain a back depth sub-image of any target pig.

[0068] Figure 2 This is a schematic diagram of the structure of a pig vital sign information collection device provided by the present invention. Figure 2 As shown, it mainly includes: collection unit and lifting unit.

[0069] Multiple parallel rails are installed above the pig farm. The hoisting unit primarily consists of a motor and an electric pulley. Driven by the motor, the electric pulley moves along the rails. The electric pulley is connected to the collection unit, so as the electric pulley moves along the rails, it drives the collection unit in a reciprocating motion above the pig farm.

[0070] Among them, the acquisition unit mainly includes a depth-sensing camera and an edge computing unit. When the acquisition unit runs above the pig farm, it can continuously collect and obtain depth images of the pigs' backs; the edge computing unit can use the target detection algorithm to identify the collected depth images of the pigs' backs and divide them into depth sub-images of the back of each pig.

[0071] Alternatively, the target detection algorithm employed can be one that utilizes a Region-CNN network model. Specifically, any frame of a pig herd's back depth image can be fed into a pre-trained Region-CNN network model to obtain the position coordinates of the detected target within the color image. The depth-sensing camera provides a program for aligning color and depth images, so these position coordinates can be mapped to the depth image, resulting in a depth sub-image of the back of each pig contained in the herd's back depth image.

[0072] It should be noted that the target pig refers to any one of all the pigs included in the back depth image of the pig group, and has no specific meaning in the present invention.

[0073] The pig vital sign information collection device may also include a battery and a charging station mounted on the rails to recharge the battery. The battery primarily powers the motor and edge computer. The depth-sensing camera is connected to a USB port on the edge computer to enable data exchange between the two.

[0074] Figure 3 This is a schematic diagram of the working process of a pig vital sign information collection device provided by the present invention. Figure 3 As shown in the figure, after the pig vital signs information collection device is put into use, it first reads the relevant configuration parameters, including the speed of the reciprocating motion, the frequency of collecting the deep image of the pig's back, the power threshold, the location of the inspection point (mainly refers to the location where the deep image of the pig's back is collected), the location of the charging station, etc.; then it performs a power self-check, and after determining that the current power reaches the preset power threshold, it continues to perform the reciprocating inspection task until it reaches the inspection point.

[0075] After arriving at the inspection point, the depth camera takes a depth image of the pigs' backs and transmits the collected depth image to the edge computer to analyze the physical signs information of each pig included in the depth image of the pigs' backs.

[0076] When multiple inspection points are set up in the entire pig farm, after collecting the vital signs information of the pigs corresponding to the previous inspection point, the battery self-check is performed again, and the operation continues to the next inspection point, and the above-mentioned vital signs information collection work is continued until all sampling points are traversed or the work is stopped after receiving the stop signal.

[0077] Additionally, during the entire round-trip inspection, if the self-checked battery level is insufficient (i.e., less than the battery threshold), the system determines whether the vehicle is currently located at a charging station. If so, the system charges the battery at the charging station. If not, the system controls the electric pulley to return to the charging station.

[0078] Step 102: Acquire key point information of the back of the target pig based on the back depth sub-image to determine the identity of the target pig.

[0079] To collect vital signs information of individual pigs, existing solutions are mostly single-pen, single-pig, and use Radio Frequency Identification (RFID) or WiFi site signals to identify the pig's identity document (ID).

[0080] Using a single pen for a single pig does not meet the actual needs of farming. Using RFID or WiFi station signals to identify the ID will affect the pig's identity due to the shedding of the markers set on the pig's body. In view of these shortcomings, the present invention directly uses computer vision technology to identify the back depth sub-image, analyze the pig's back feature information, and obtain the key points of the back. In this way, each pig is associated with a specific ID, achieving individual pig identification.

[0081] The present invention provides a method for determining the identity of a target pig based on key point information on the back of the target pig:

[0082] In the early stage, the ID of each pig was distinguished by painting a barcode on the back of each individual pig with a marker, or painting a combination of simple graphics (such as a combination of triangles, circles, and squares, similar to Morse code) on the pig's body.

[0083] Considering that the marks made by the marker will fall off quickly, the ID can be detected in the early stage through image binarization and barcode recognition technology in computer vision, and the depth image information of the ID can be recorded at the same time. The ID of each pig is then bound to its depth image.

[0084] Because individual depth information features cannot mutate in a time series, for example, the body size of pig No. 001 will not change significantly within a preset time period (e.g., two consecutive days), but there will still be differences in body size between pig No. 001 and pig No. 002. Therefore, the subsequent fading of the marker mark will not significantly affect the identification of the pig ID. Therefore, based on computer vision methods, the present invention performs image recognition on the back depth sub-image of each pig, extracting the back key point information that can distinguish different individuals from the back depth sub-image, and achieving the purpose of identifying the target pig ID based on the differences in the back key point information between the target pig and other pigs.

[0085] Figure 4 This is a schematic diagram of the distribution of key points on the back of a target pig provided by the present invention, such as Figure 4 As shown, points B, m, n, F, L1, L2, R1, R2, E1, E2, etc. are set as back key points, and the distance between point L1 and point R1, the distance between point L2 and point R2, the distance between point B and point F, the distance between point m and point n, the distance between point E1 and point F, the distance between point E2 and point F, etc. are collected as the back key point information of the target pig.

[0086] Step 103: performing image recognition on the back depth sub-image to obtain the physical sign information of the target pig.

[0087] The present invention performs image segmentation on the back depth image of the pig group taken by the depth-sensing camera, thereby segmenting the back depth sub-image of each target pig, and then collects the physical sign information of the target pig based on the image analysis results of each frame of the back depth sub-image.

[0088] Among them, physical sign information is mainly used to obtain relevant information by analyzing the body shape and size of the target pigs, such as: body length information, body width information, body height information, weight information, back fat, etc.

[0089] Step 104: Bind the identity identifier and the vital sign information and output them.

[0090] By analyzing the collected depth images of the pig herd's backs, the present invention can obtain the ID of each pig involved in the image, and can also obtain the vital signs information of each pig at the same time. By collecting the depth images of the pig herd's backs at different positions in the pig farm, the corresponding vital signs information can eventually be output according to the ID of each pig in the pig farm and output to the pig farm manager.

[0091] The method for collecting pig vital signs information provided by the present invention can automatically obtain the identity of each pig by performing target tracking and identification on the depth image of the pig herd's back obtained by the depth-sensing camera; and can obtain the vital signs information of each pig by performing image processing on the depth sub-image of the back of each pig; during the entire information collection process, no contact is made with the pigs, thereby avoiding stress reactions caused by environmental changes during pig detection, and at the same time effectively reducing labor and saving breeding costs.

[0092] Based on the content of the above embodiment, as an optional embodiment, the physical sign information includes body length information, body height information, body width information and back fat information;

[0093] The performing image recognition on the back depth sub-image to obtain the physical sign information of the target pig includes:

[0094] Determine the two ear root position points, the tail root position point, and the top of the chinchilla of the target pig according to the back depth sub-image, and determine the center of mass of the target pig;

[0095] The length of the line between the midpoint of the line connecting the two ear roots and the tail root is used as the body length information;

[0096] The vertical distance from the top of the chignon to the ground is used as the body height information;

[0097] Determine the projection of the center of mass to each ear root position point, and use the sum of the lengths of the two projections as the body width information;

[0098] After rotational normalization of the back depth sub-image, a three-dimensional image of the buttocks shape of the target pig is obtained; the three-dimensional image of the buttocks shape is matched with a pre-constructed mapping table of buttocks shape and backfat thickness to obtain the backfat information.

[0099] In the pig vital sign information collection method provided by the present invention, for any target pig, by identifying the back depth sub-image of the target pig segmented from the back depth image of the pig group, its relevant vital sign information can be obtained, specifically including body length information, body width information, body height information, weight information, and back fat information.

[0100] The acquisition of the pig's body length, width and height information mainly depends on the back depth sub-image obtained by the depth-sensing camera.

[0101] The back depth sub-image can be used to obtain a three-dimensional image of the target pig's back. By performing graphic processing on the three-dimensional image of the target pig, for example, adjusting the target pig to a horizontal position; then, from a bird's-eye view, the two ear root position points and the tail root position points of the target pig are obtained, wherein the midpoint of the two ear root position points (such as Figure 4 F in the figure) and the tail root position point (such as Figure 4 The length of the line connecting point B in the figure (i.e., line BF) is the body length information of the target pig.

[0102] Furthermore, from a horizontal perspective, the target pig's topknot vertex (such as Figure 4 The vertical distance from the n point in the figure to the ground is used as the height information of the target pig.

[0103] Furthermore, a back depth sub-image of the target pig is obtained, and the position of the center of mass of the image is determined. The sum of the lengths of the projections from the center of mass to the position points of each ear root is obtained as the body width information of the target pig.

[0104] Furthermore, when obtaining the back fat information of the target pig, since the collected back depth sub-image of the target pig includes both the back depth data of the target pig and the back color image of the target pig, the back depth sub-image is rotated and normalized so that the individual direction of the target pig in the image is in a horizontal state, so as to facilitate body shape comparison at a uniform angle.

[0105] After rotational normalization, a back depth sub-image is obtained, and a three-dimensional image of the buttocks shape is cut out. Then, the obtained three-dimensional image of the buttocks shape of the target pig is matched with a pre-built buttocks shape backfat thickness mapping table to obtain backfat information.

[0106] Among them, the hip shape and back fat thickness mapping table is constructed in advance based on the relationship between the body characteristics (mainly hip shape) and back fat thickness of pigs of different body sizes. The corresponding back fat thickness can be queried from the hip shape data corresponding to the three-dimensional image of the hip shape.

[0107] The method for collecting pig vital sign information provided by the present invention can comprehensively collect the vital sign information of each pig in the pig farm, making it convenient to grasp the overall growth status of the pig herd. It can also obtain the vital sign information of each pig without contacting the pigs, preventing the pigs from being stimulated by the external environment during the measurement process and producing stress reactions such as fear and panic. At the same time, it effectively reduces labor and saves breeding costs.

[0108] Based on the content of the above embodiment, as an optional embodiment, the physical sign information further includes: weight information;

[0109] The performing image recognition on the back depth sub-image to obtain the physical sign information of the target pig includes:

[0110] Inputting the back depth sub-image into a weight prediction model, and acquiring the weight information corresponding to the back depth sub-image according to an output result of the weight prediction model;

[0111] The weight prediction model is obtained by training based on back depth image samples with weight information labels.

[0112] The method for collecting pig vital sign information provided by the present invention pre-builds a weight prediction model for recognizing an input back depth sub-image when acquiring weight information of any target pig. The weight prediction model is constructed based on a deep learning network model.

[0113] Optionally, in the early stage of building the weight prediction model, electronic scales are placed in the pens of the pig farm and depth cameras are installed on the top of the pens.

[0114] When the weight information of any target pig is collected, the back depth sub-image corresponding to the target pig is determined by collecting the pig herd's back depth image. The collected back depth sub-image is used as the training sample (or the depth data corresponding to the back depth sub-image), and the weight information collected at the same time is used as the corresponding training label to construct a training set.

[0115] The above training set is used to pre-train the pre-built model between the pig depth data and weight to obtain the weight prediction model.

[0116] After the weight prediction model is trained, it can be separated from the electronic scale. By performing image segmentation on the depth image of the pig herd's back obtained by the depth-sensing camera, the depth sub-image of the back of each pig can be obtained. By inputting it into the weight prediction model, the weight information of each pig output by the model can be obtained.

[0117] The method for collecting pig vital sign information provided by the present invention adopts a deep learning method and realizes automatic collection of pig weight information by recognizing the collected depth images. The measurement of pigs is contactless and stress-free, avoiding the fear and panic of pigs caused by environmental changes, and has high measurement accuracy.

[0118] Based on the content of the above embodiment, as an optional embodiment, the method for collecting pig vital sign information provided by the present invention further includes:

[0119] Obtain thermal infrared images of pig herds;

[0120] Mapping the thermal infrared image of the pig group to the depth image of the pig group's back;

[0121] Acquire a pig thermal infrared sub-image corresponding to the target pig's back depth sub-image;

[0122] The maximum temperature of all pixels in the pig thermal infrared sub-image is used as the temperature information of the target pig;

[0123] The temperature information, the identity identifier and the vital sign information are bound and output.

[0124] The present invention adds a thermal infrared sensor to the pig vital sign information collection device provided in the above embodiment. While the depth camera collects the depth image of the pigs' backs in a certain area, the thermal infrared sensor collects the thermal infrared image of the pigs in the area.

[0125] It should be noted that when determining the body temperature of the target pigs based on the thermal infrared image of the pig herd, it is necessary to combine it with the target detection algorithm. For example: first, through coordinate conversion, according to the positional relationship between the thermal infrared sensor and the depth camera and their respective parameter settings, the thermal infrared image of the pig herd is mapped to the depth image of the pig herd's back.

[0126] When the target pig is determined from the back depth sub-image according to the target detection algorithm, the pig thermal infrared sub-image corresponding to the target pig can be segmented from the pig herd thermal infrared image accordingly.

[0127] Then, the pixel with the highest temperature is found from the pig's thermal infrared sub-image, and this highest temperature can be used as the temperature information of the target pig.

[0128] Optionally, the average temperature value of all pixels in the pig thermal infrared sub-image may be obtained, and this average value may be used as the temperature information of the target pig.

[0129] Finally, since the ID and vital signs information of the target pig have been determined before, in this embodiment, the acquired temperature information is bound to the ID and vital signs information and output to the pig farm manager so that he can judge the health status of the target pig based on its body temperature information.

[0130] Based on the content of the above embodiment, as an optional embodiment, the method for collecting pig vital sign information provided by the present invention further includes:

[0131] Collect pig sound signals;

[0132] Inputting the pig group sound signal into an emotion classification model to obtain emotion information corresponding to the pig group sound signal;

[0133] The emotion classification model is obtained by optimizing the parameters of the Gaussian mixture model according to the weight coefficient combination of the characteristic parameters and the influence of the number of Gaussian mixtures on the recognition rate.

[0134] The characteristic parameters include zero crossing rate (ZCR), formant and Mel-Frequency Cepstral Coefficients (MFCCs).

[0135] To address the problem of animal emotion recognition, a sound collector can be added to the pig vital sign information collection device provided in the above embodiment, which can collect the sound signals of the pig herd in the pig farm pen according to the preset sampling frequency. An application of Gaussian mixture model in animal sound emotion recognition is proposed. Combining speech signal processing and machine learning technology, the three characteristic parameters describing animal emotions, such as zero-crossing rate, resonance peak, and Mel-frequency cepstral coefficient, are analyzed for feature extraction of animal sound signals, and the animal sound emotions, including anxiety, hunger, illness and depression, are output.

[0136] The zero-crossing rate refers to the number of times a speech signal passes through zero (changing from positive to negative or vice versa) in each frame. This feature has been widely used in speech recognition and music information retrieval and is a key feature for classifying percussive sounds.

[0137] Formants are areas of relatively concentrated energy within a sound's frequency spectrum. Formants not only determine sound quality but also reflect the physical characteristics of the vocal tract (resonance cavity). In speech acoustics, formants determine the quality of vowels, while in computer music, they are crucial parameters for both timbre and quality.

[0138] Mel-frequency cepstral coefficients are the coefficients that make up the Mel-frequency cepstrum. They are derived from the cepstrum of an audio clip. The difference between the cepstrum and the Mel-frequency cepstrum is that the frequency bands of the Mel-frequency cepstrum are equally spaced on the Mel scale, which better approximates the human auditory system than the linearly spaced bands used in the normal logarithmic cepstrum. This nonlinear representation can improve the representation of sound signals in various fields.

[0139] Specifically, the present invention constructs an emotion classification model for collecting emotion information based on the Gaussian mixture model. In the early stage of model construction, the following steps are also included:

[0140] The Gaussian mixture model to be trained is used to perform cluster analysis on the collected animal sound signal training samples, and the posterior probability of the test samples is calculated to achieve automatic recognition of animal emotions.

[0141] During the training process, the optimal parameters were selected by analyzing the impact of the weighted combinations of the three characteristic parameters and the number of Gaussian mixtures on the recognition rate. The optimized Gaussian mixture model was able to infer the emotions associated with animal sounds, including anxiety, hunger, illness, and depression. Therefore, the trained Gaussian mixture model was used as the emotion classification model.

[0142] The pig vital sign information collection method provided by the present invention can effectively obtain the emotions of all pigs in the pen by collecting the pig sound signals emitted by all pigs in the pen and performing cluster analysis on the animal sound signals with the help of a Gaussian mixture model, thereby providing data reference for pig house managers to carry out pig farm environment regulation and operation and maintenance.

[0143] Based on the content of the above embodiment, as an optional embodiment, the method for collecting pig vital sign information provided by the present invention further includes:

[0144] Obtain near-infrared video of pigs;

[0145] Extracting a near-infrared image sequence containing the target pig from the near-infrared video of the pig herd;

[0146] Performing feature point detection on each frame of the near-infrared image sequence to obtain a sequence of regions of interest for pigs;

[0147] Calculating the pixel mean of each pig region of interest in the pig region of interest sequence to obtain a single-channel pixel mean time series;

[0148] Performing time delay processing on the single-channel pixel mean time series to obtain a dynamic embedding matrix;

[0149] Based on a blind source separation method, independent component analysis is performed on the dynamic embedding matrix to obtain multiple independent components;

[0150] Performing power spectrum analysis on each of the independent components to obtain target independent components containing heart rate information;

[0151] The heart rate information of the target pig is determined according to the frequency corresponding to the maximum amplitude of the target independent component.

[0152] Heart rate, as a major vital sign of livestock, refers to the number of heart beats per unit time, generally the number of heart beats per minute. It is an important indicator for evaluating the cardiovascular function of livestock and is of great significance for the diagnosis, treatment and monitoring of chronic diseases in livestock.

[0153] The present invention adopts a non-contact heart rate measurement method based on near-infrared video, and a heart rate sensor is added to the pig vital sign information collection device provided in the above embodiment to obtain near-infrared video of the pig herd.

[0154] Firstly, a near-infrared image sequence containing individual pigs is sampled from the near-infrared video, and feature point detection is performed on each frame of the near-infrared image sequence to obtain a sequence of pig regions of interest.

[0155] Then, the pixel mean of each pig's region of interest in the pig's region of interest sequence is calculated to obtain a single-channel pixel mean time series.

[0156] The image corresponding to the area of ​​interest of each pig is mainly composed of three channels (i.e., R layer, G layer, and B layer). The number of each pixel point in each layer is calculated separately, and it is an integer between (0 and 255). The sum of each layer (R layer, G layer, and B layer) is divided by the area of ​​the image (length * width), which is the pixel mean of each channel.

[0157] Furthermore, the preprocessed single-channel pixel mean time series is time-delayed to obtain a dynamic embedding matrix, and then the dynamic embedding matrix is ​​subjected to independent component analysis using the blind source separation method to obtain multiple independent components.

[0158] Finally, power spectrum analysis is performed on these independent components to confirm the independent components containing heart rate information and obtain the heart rate detection value.

[0159] Blind source separation is a technique for separating independent source signals from mixed signals measured by a set of sensors, using only the weakly known condition that the source signals are independent of each other, given the unknown system transfer function, mixing coefficients of the source signals, and their probability distribution. Power spectrum analysis can employ existing computational methods, which are not detailed in this invention.

[0160] The method for collecting pig vital sign information provided by the present invention collects near-infrared video of a pig herd in a pen and uses a non-contact heart rate measurement method using near-infrared video to complete the collection of heart rate information of each pig without contacting the pigs. The collection accuracy is high, providing data support for pig farm managers to monitor the health status of each pig. The degree of automation is high, and at the same time, it effectively reduces labor and saves breeding costs.

[0161] Based on the content of the above embodiment, as an optional embodiment, obtaining the back key point information of the target pig according to the back depth sub-image to determine the identity of the target pig includes:

[0162] Combined with the target pig's physical sign change curve, the back key point information is optimized by feature fusion using the isometric feature mapping manifold learning algorithm; the physical sign change curve is constructed based on the Markov chain model;

[0163] The shape feature information generated after feature fusion optimization is input into a hybrid kernel function support vector machine to generate the identity of the target pig.

[0164] A Markov chain is a set of discrete random variables with Markov properties. Specifically, for a set of random variables X in a probability space with a one-dimensional countable set as the exponent set, X = {X n :n>0}, if the values ​​of the random variable are all in a countable set: X=s i ,s i ∈s, and the conditional probability of the random variable satisfies the following relationship:

[0165] p(X t+1 |X t ,…,X1)=p(X t+1 |X t )

[0166] Here, X is called a Markov chain and t is an intermediate parameter.

[0167] Isometric feature mapping is a nonlinear dimensionality reduction method and one of the most widely used low-dimensional embedding methods. It is used to compute the embedding of quasi-isometric high-dimensional data into a low-dimensional form. Isometric feature mapping constructs a graph by connecting each data point with its neighbors and uses the Dijkstra distance from graph theory to estimate the geodesic distance of the manifold. Therefore, isometric feature mapping can be widely applied to data from various sources and with varying dimensions.

[0168] To avoid the drawbacks of existing pig ID collection methods (easily detached labels), the present invention proposes a method for collecting pig vital sign information. By comprehensively assessing changes in each target pig's vital sign information, a Markov chain model is employed to construct a pig vital sign change curve. This method then combines the acquired back key point information (which also reflects the pig's body shape) with the back key points of the target pig, employing an isometric feature mapping manifold learning algorithm for feature fusion optimization. Furthermore, a hybrid kernel support vector machine algorithm is employed to identify the target pig individually and generate a unique ID.

[0169] Finally, its ID is bound to the identified vital signs information and output to the pig farm manager to facilitate subsequent precise feeding and comprehensive management.

[0170] Based on the content of the above embodiment, as an optional embodiment, the method for collecting pig vital signs information provided by the present invention can also be used to identify key points (such as Figure 4 As shown in Figure 3), and after combining the Bag of Feature method for feature fusion processing, the time domain dynamic information is integrated and utilized.

[0171] Among them, the Bag of Feature method is an image feature extraction method. It draws on the idea of ​​the Bag of Words model in the text classification algorithm. It abstracts many representative keywords from the image to form a dictionary, then counts the number of keywords appearing in each image, and finally obtains the feature vector of the image.

[0172] The present invention realizes identity verification of target pigs through the Bag of Features method, including:

[0173] For the back depth sub-image, the identity tracking is performed by analyzing the ID of the target pig in the previous frame and comparing the similarity between the key areas of the current frame and the key areas of the previous frame, which can achieve tracking of the target pig in continuous video.

[0174] The pig vital sign information collection method provided by the present invention adopts the Bag of Feature method to track each pig in multiple consecutive frames of pig herd back depth images, effectively improving the calculation speed of information collection and improving the efficiency of information collection to a certain extent.

[0175] As another optional embodiment, the present invention also uses a behavior recognition network model (such as an StNet network model) as a classifier to recognize the input back depth sub-image to achieve recognition of the target pig's eating, drinking, standing, lying down, lying on the side, sitting, fighting and other behaviors.

[0176] Among them, during the recognition process, the StNet network model stacks N consecutive video frames into a super image with 3N channels and performs 2D convolution on the super image to capture local spatiotemporal relationships.

[0177] To model global spatiotemporal relationships, the StNet network model performs temporal convolution on local spatiotemporal feature maps. Specifically, it uses separate channel and temporal convolutions on the feature sequence of the video.

[0178] The pig vital sign information collection method provided by the present invention adopts the StNet network model to identify the behaviors of each pig, such as eating, drinking, standing, lying down, lying on the side, sitting, fighting, etc., and can make corresponding decisions based on different behaviors, or send prompt information or alarms to the terminal.

[0179] The method for collecting pig vital sign information provided by this invention uses a depth-sensing camera to record videos of target pigs and track their movements. Existing video image analysis methods require researchers to manually label all target pigs in each frame, or place markers on each target pig (at predetermined points on the body). However, these markers can interfere with the target's behavior and are generally only suitable for a limited range of movements. Manual labeling is also time-consuming and laborious. To address this issue, the present invention uses the DeepLabCut algorithm to track the behavior of each target pig.

[0180] First, the pre-built DeepLabCut network model is pre-trained using an open source image database containing pig images. Then, it is trained again using a small-scale training sample (sample images with manually labeled information, such as only 200 images) to obtain the trained DeepLabCut network model.

[0181] Using the trained DeepLabCut network model, it is possible to automatically analyze videos captured by depth cameras without the need for markers to track the movement of any body part of any target pig during various behaviors, and to achieve trajectory tracking of any target pig.

[0182] Figure 5 This is a schematic diagram of the structure of the pig vital signs information collection system provided by the present invention. Figure 5 As shown, it mainly includes but is not limited to an image segmentation unit 51, an identity recognition unit 52, an information analysis unit 53 and an information output unit 54, wherein:

[0183] The image segmentation unit 51 is mainly used to perform image segmentation on the pig herd back depth image based on the target detection algorithm to obtain the back depth sub-image of any target pig;

[0184] The identity recognition unit 52 is mainly used to obtain the back key point information of the target pig according to the back depth sub-image to determine the identity of the target pig;

[0185] The information analysis unit 53 is mainly used to perform image recognition on the back depth sub-image to obtain the physical sign information of the target pig;

[0186] The information output unit 54 is mainly used to bind the identity identifier and the vital sign information and output them.

[0187] The pig vital sign information collection system provided by the present invention can automatically obtain the identity of each pig by performing target tracking and identification on the depth image of the pig herd's back obtained by the depth-sensing camera; and can obtain the vital sign information of each pig by performing image processing on the depth sub-image of the back of each pig; during the entire information collection process, no contact is made with the pigs, thereby avoiding stress reactions caused by environmental changes during pig detection, and at the same time effectively reducing labor and saving breeding costs.

[0188] It should be noted that the pig vital signs information collection system provided by the embodiment of the present invention can execute the pig vital signs information collection method described in any of the above embodiments during specific operation, which will not be described in detail in this embodiment.

[0189] Figure 6 Schematic diagram of the structure of the electronic device provided by the present invention, such as Figure 6 As shown, the electronic device may include: a processor 610, a communication interface 620, a memory 630, and a communication bus 640, wherein the processor 610, the communication interface 620, and the memory 630 communicate with each other via the communication bus 640. The processor 610 may call the logic instructions in the memory 630 to execute a method for collecting pig vital signs information, which includes: performing image segmentation on a pig herd back depth image based on a target detection algorithm to obtain a back depth sub-image of any target pig; obtaining key point information of the back of the target pig based on the back depth sub-image to determine the identity of the target pig; performing image recognition on the back depth sub-image to obtain the vital signs information of the target pig; and binding the identity with the vital signs information and outputting the result.

[0190] In addition, the logic instructions in the above-mentioned memory 630 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0191] On the other hand, the present invention also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the pig vital sign information collection method provided by the above methods, which includes: performing image segmentation on the back depth image of the pig group based on the target detection algorithm to obtain the back depth sub-image of any target pig; obtaining the back key point information of the target pig based on the back depth sub-image to determine the identity of the target pig; performing image recognition on the back depth sub-image to obtain the vital sign information of the target pig; and binding the identity with the vital sign information and outputting it.

[0192] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, it is implemented to execute the pig vital sign information collection method provided in the above-mentioned embodiments, the method comprising: performing image segmentation on the back depth image of the pig group based on the target detection algorithm to obtain a back depth sub-image of any target pig; obtaining back key point information of the target pig based on the back depth sub-image to determine the identity of the target pig; performing image recognition on the back depth sub-image to obtain the vital sign information of the target pig; and binding the identity with the vital sign information and outputting it.

[0193] The system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units. They may be located in one place or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of this embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.

[0194] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, or of course, by hardware. Based on this understanding, the essence of the above technical solution or the part that contributes to the existing technology can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or certain parts of the embodiments.

[0195] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.

Claims

1. A method for collecting pig vital signs information, characterized in that: include: Perform image segmentation on the pig herd's back depth image based on the target detection algorithm to obtain the back depth sub-image of any target pig; Acquiring key point information of the back of the target pig according to the back depth sub-image to determine the identity of the target pig includes: Combined with the target pig's physical sign change curve, the back key point information is optimized by feature fusion using the isometric feature mapping manifold learning algorithm; the physical sign change curve is constructed based on the Markov chain model; Inputting the shape feature information generated after feature fusion optimization into a hybrid kernel function support vector machine to generate an identity identifier of the target pig; Performing image recognition on the back depth sub-image to obtain the physical sign information of the target pig, including: inputting the back depth sub-image into a weight prediction model, and obtaining the weight information corresponding to the back depth sub-image based on the output result of the weight prediction model; wherein the weight prediction model is obtained by training based on back depth image samples with weight information labels; The physical sign information includes body length information, body height information, body width information, back fat information and weight information; Binding the identity identifier and the vital sign information to output; Also includes: Obtain thermal infrared images of pig herds; Mapping the thermal infrared image of the pig group to the depth image of the pig group's back; Acquire a pig thermal infrared sub-image corresponding to the target pig's back depth sub-image; The maximum temperature of all pixels in the pig thermal infrared sub-image is used as the temperature information of the target pig; The temperature information, the identity identifier and the vital sign information are bound and output.

2. The method for collecting pig vital signs information according to claim 1, characterized in that: The performing image recognition on the back depth sub-image to obtain the physical sign information of the target pig includes: Determine the two ear root position points, the tail root position point, and the top of the chinchilla of the target pig according to the back depth sub-image, and determine the center of mass of the target pig; The length of the line between the midpoint of the line connecting the two ear roots and the tail root is used as the body length information; The vertical distance from the top of the chignon to the ground is used as the body height information; Determine the projection of the center of mass to each ear root position point, and use the sum of the lengths of the two projections as the body width information; After rotational normalization of the back depth sub-image, a three-dimensional image of the buttocks shape of the target pig is obtained; the three-dimensional image of the buttocks shape is matched with a pre-constructed mapping table of buttocks shape and backfat thickness to obtain the backfat information.

3. The method for collecting pig vital signs information according to claim 1, characterized in that: Also includes: Collect pig sound signals; Inputting the pig group sound signal into an emotion classification model to obtain emotion information corresponding to the pig group sound signal; The emotion classification model is obtained by optimizing the parameters of the Gaussian mixture model based on the weight coefficient combination of the feature parameters and the influence of the number of Gaussian mixtures on the recognition rate; The characteristic parameters include zero-crossing rate, formant and Mel-frequency cepstral coefficient.

4. The method for collecting pig vital signs information according to claim 1, characterized in that: Also includes: Obtain near-infrared video of pigs; Extracting a near-infrared image sequence containing the target pig from the near-infrared video of the pig herd; Performing feature point detection on each frame of the near-infrared image sequence to obtain a sequence of regions of interest for pigs; Calculating the pixel mean of each pig region of interest in the pig region of interest sequence to obtain a single-channel pixel mean time series; Performing time delay processing on the single-channel pixel mean time series to obtain a dynamic embedding matrix; Based on a blind source separation method, independent component analysis is performed on the dynamic embedding matrix to obtain multiple independent components; Performing power spectrum analysis on each of the independent components to obtain target independent components containing heart rate information; The heart rate information of the target pig is determined according to the frequency corresponding to the maximum amplitude of the target independent component.

5. A pig vital sign information collection system, characterized in that: include: An image segmentation unit is used to segment the depth image of the pigs' backs based on a target detection algorithm to obtain a depth sub-image of the back of any target pig; An identity recognition unit is used to obtain key point information of the back of the target pig based on the back depth sub-image to determine the identity of the target pig, including: Combined with the target pig's physical sign change curve, the back key point information is optimized by feature fusion using the isometric feature mapping manifold learning algorithm; the physical sign change curve is constructed based on the Markov chain model; Inputting the shape feature information generated after feature fusion optimization into a hybrid kernel function support vector machine to generate an identity identifier of the target pig; an information analysis unit, configured to perform image recognition on the back depth sub-image to obtain physical sign information of the target pig, comprising: inputting the back depth sub-image into a weight prediction model, and obtaining the weight information corresponding to the back depth sub-image based on an output result of the weight prediction model; wherein the weight prediction model is obtained by training based on back depth image samples with weight information labels; The physical sign information includes body length information, body height information, body width information, back fat information and weight information; An information output unit, configured to bind the identity identifier and the vital sign information and output the binding; Also includes: Obtain thermal infrared images of pig herds; Mapping the thermal infrared image of the pig group to the depth image of the pig group's back; Acquire a pig thermal infrared sub-image corresponding to the target pig's back depth sub-image; The maximum temperature of all pixels in the pig thermal infrared sub-image is used as the temperature information of the target pig; The temperature information, the identity identifier and the vital sign information are bound and output.

6. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the pig vital sign information collection method according to any one of claims 1 to 4 are implemented.

7. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the pig vital sign information collection method according to any one of claims 1 to 4 are implemented.

Citation Information

Patent Citations

  • Isomap and SVM algorithm-based overlooked herded pig individual recognition method

    CN105654141A

  • Non-contact heart rate detection method based on near-infrared video

    CN110236515A

  • Livestock individual backfat detection method and device, electronic equipment and storage medium

    CN112288793A