Piglet heat preservation method and system based on visual image recognition
Through the method based on visual image recognition, the behavior and body temperature characteristics of piglets are monitored and analyzed in real time, and the insulation strategies of individuals and groups are generated, which solves the problems of manual observation and inaccurate adjustment in traditional methods, and realizes intelligent and precise insulation management of piglets.
Patent Information
- Application Number
- CN202510086950.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-20
- Publication Date
- 2025-05-06
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing piglet insulation methods rely on manual observation and manual adjustment, making it difficult to achieve all-weather, real-time monitoring and dynamic adjustment, resulting in insufficient or excessive insulation, affecting the health and growth of piglets.
Using a method based on visual image recognition, the visible light video stream, infrared imaging video stream and ambient temperature data of the piglet area are obtained in real time, and image registration and fusion are used to identify and track piglets, their behavior and body temperature feature scores are calculated, and the insulation strategy of individuals and groups is generated.
Accurate identification and continuous tracking of piglets is achieved, and scientific and reasonable insulation strategies are generated to ensure that piglets obtain a suitable insulation environment, improve health level and growth efficiency, reduce breeding costs, and improve the management level and economic benefits of the pig farming industry.
Smart Images

Figure CN119942596A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of piglet breeding, and in particular to a piglet insulation method and system based on visual image recognition. Background Art
[0002] With the development of modern pig farming, the insulation management of piglets has become a key link in improving breeding efficiency and piglet survival rate. However, the existing methods of piglet insulation have many defects and shortcomings. First, the traditional insulation method mainly relies on manual observation and manual adjustment, which is not only time-consuming and laborious, but also difficult to achieve all-weather, real-time monitoring, and it is easy to miss the temperature changes and abnormal behavior of piglets. Secondly, the manual adjustment of insulation equipment lacks accuracy and timeliness, and cannot be dynamically adjusted according to the actual needs of piglets, which may lead to insufficient or excessive insulation, affecting the health and growth of piglets. In addition, it is difficult for traditional methods to manage a large number of piglets individually, and it is impossible to detect and deal with piglets with abnormal body temperature in time, resulting in some health problems not being solved in time. Finally, the existing insulation methods often rely on experience, lack scientific data support and analysis methods, and it is difficult to optimize and improve insulation strategies. These problems have seriously affected the growth environment and health of piglets and restricted the development of the pig farming industry.
[0003] Therefore, it is necessary to provide a piglet insulation method and system based on visual image recognition to solve the above technical problems. Summary of the invention
[0004] In order to solve the above technical problems, the present invention provides a piglet insulation method and system based on visual image recognition, which achieves the beneficial effect of intelligent and precise piglet insulation management. The present invention provides a piglet keeping warm method based on visual image recognition, and the piglet keeping warm method comprises the following steps: S1: Real-time acquisition of visible light video stream, infrared imaging video stream and environmental temperature data of the area where the piglets are located; S2: Input the acquired visible light video stream, infrared imaging video stream and ambient temperature data into the pre-trained end-to-end deep learning model for frame-by-frame image registration and fusion to obtain a comprehensive information video stream; S3: using a lightweight object detection method to identify the location of piglets in the comprehensive information video stream, and using a multi-object tracking method to continuously track each piglet in the comprehensive information video stream; S4: Based on the identification results and tracking results, the comprehensive behavioral characteristic score and comprehensive body temperature characteristic score of each piglet are obtained; S5: weighted fusion of the comprehensive behavioral characteristic score and the comprehensive body temperature characteristic score to obtain the heat preservation strategy score of each piglet; S6: Establish a probability distribution based on the insulation strategy scores of all piglets, and generate the insulation strategy of the piglets according to the probability distribution.
[0005] Preferably, step S2 comprises the following steps: S201: Reading image frames of a visible light video stream and an infrared imaging video stream frame by frame to obtain visible light image frames and infrared imaging image frames; S202: spatially aligning corresponding visible light image frames and infrared imaging image frames through a spatial transformation network; S203: fusing the spatially aligned visible light image frames and infrared imaging image frames frame by frame to obtain a plurality of comprehensive frame information images; S204: Recombining the multiple comprehensive frame information images and integrating the ambient temperature data to obtain a comprehensive information video stream.
[0006] Preferably, the comprehensive behavior characteristic score includes a motion state score and an aggregation level score, and the motion state score includes a moving speed score, a direction change rate score, and a path complexity score.
[0007] Preferably, the movement speed score is determined by calculating the displacement distance of the piglet in a plurality of consecutive frames within a selected time period; The direction change rate score is determined by calculating the change angle of the piglet's movement direction in a plurality of consecutive frames within a selected time period; The path complexity score is determined by calculating the curvature of the piglet's movement trajectory during a selected time period; The aggregation level score is determined by analyzing the distance and relative position between piglets over a selected time period.
[0008] Preferably, the calculation formula of the motion state score is:
[0009] in, Score for the movement status, Score for movement speed, is the direction change rate score, is the path complexity score, They are the weight coefficients of the moving speed score, direction change rate score and path complexity score respectively.
[0010] Preferably, the calculation formula of the comprehensive behavior characteristic score is:
[0011] in, is the comprehensive behavioral characteristic score, is the aggregation level score, are the weight coefficients of the motion state score and aggregation level score respectively.
[0012] Preferably, in step S5, the calculation formula of the comprehensive body temperature feature score is:
[0013] in, is the comprehensive temperature characteristic score, , is the proportionality coefficient, is the current body temperature of the piglet, The lower limit of normal body temperature for piglets. The upper limit of normal body temperature for piglets. is the current ambient temperature, is the lower limit of normal ambient temperature, It is the upper limit of normal ambient temperature.
[0014] Preferably, the calculation formula of the insulation strategy score is:
[0015] in, Score the insulation strategy, are the weight coefficients of the comprehensive behavioral characteristic score and the comprehensive temperature characteristic score, respectively.
[0016] Preferably, the piglet insulation strategy includes a group insulation strategy and an abnormal individual piglet insulation strategy, wherein the group insulation strategy is based on a preset upper limit threshold of the insulation strategy score. , lower threshold , the mean score of the insulation strategy and decision execution probability threshold Specifically, Calculate the mean and standard deviation of the heat preservation strategy scores of all piglets, and then calculate the heat preservation strategy score Greater than upper threshold Or the insulation strategy score Less than the lower threshold The probability of , where the probability Indicates the insulation strategy score Greater than upper threshold The proportion of piglets or the score of the heat preservation strategy Less than the lower threshold The proportion of piglets like ,and Then turn on the ventilation equipment to cool down; like ,and Then turn on the heating equipment to heat and keep warm; The abnormal individual piglet insulation strategy is to calculate the standardized value of each piglet's insulation strategy score based on the obtained mean and standard deviation. When the standardized value is less than the preset lower limit threshold and greater than the preset upper limit threshold, it is judged as an abnormal value. If the standardized value for an individual piglet is an outlier, and , then implement individual heating pad heating and insulation measures for abnormal individual piglets; If the standardized value for an individual piglet is an outlier, and , individual ventilation and cooling measures will be implemented for abnormal individual piglets.
[0017] The present invention also provides a piglet insulation system based on visual image recognition, which is applied to a piglet insulation method based on visual image recognition. The piglet insulation system comprises: A data acquisition module is used to obtain real-time visible light video stream, infrared imaging video stream and ambient temperature data of the area where the piglets are located; The image registration and fusion module is used to input the acquired visible light video stream, infrared imaging video stream and ambient temperature data into the pre-trained end-to-end deep learning model for frame-by-frame image registration and fusion to obtain a comprehensive information video stream; an object detection and tracking module for identifying the position of the piglets in the comprehensive information video stream using a lightweight object detection method and continuously tracking each piglet in the comprehensive information video stream using a multi-object tracking method; A feature score calculation module is used to obtain a comprehensive behavioral feature score and a comprehensive body temperature feature score of each piglet based on the recognition results and the tracking results; The heat preservation strategy score calculation module is used to perform weighted fusion of the comprehensive behavioral characteristic score and the comprehensive body temperature characteristic score to obtain the heat preservation strategy score of each piglet; The heat preservation strategy generation module is used to establish a probability distribution based on the heat preservation strategy scores of all piglets, and generate the heat preservation strategy of the piglets according to the probability distribution.
[0018] Compared with the related art, the piglet insulation method and system based on visual image recognition provided by the present invention have the following beneficial effects: The present invention acquires the visible light video stream, infrared imaging video stream and ambient temperature data of the piglet area in real time, and uses a pre-trained end-to-end deep learning model to perform frame-by-frame image registration and fusion, so as to realize accurate identification and continuous tracking of piglets, and generate a heat preservation strategy score for each piglet based on the weighted fusion of the comprehensive behavior feature score and the comprehensive body temperature feature score, so as to establish the heat preservation strategy for the group and the individual, and ensure the intelligence, comprehensiveness and scientificity of the decision-making. This method not only overcomes the defects of time-consuming and labor-intensive manual observation and imprecise and untimely manual adjustment in the traditional method, but also realizes all-weather, real-time monitoring and dynamic adjustment, so as to ensure that each piglet can obtain a suitable heat preservation environment, improve the health level and growth efficiency of the piglets, reduce the breeding cost, and improve the management level and economic benefits of the pig farming industry. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 A schematic flow chart of a piglet heat preservation method based on visual image recognition according to the present invention; Figure 2 The present invention is a schematic diagram of the module structure of a piglet insulation system based on visual image recognition. DETAILED DESCRIPTION
[0020] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only the parts related to the present invention, rather than all structures, are shown in the accompanying drawings. In addition, the embodiments of the present invention and the features in the embodiments may be combined with each other without conflict.
[0021] It should also be noted that, for ease of description, only the parts related to the present invention, but not all of the contents, are shown in the accompanying drawings. Before discussing the exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow charts describe the operations (or steps) as sequential processes, many of the operations therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of the operations can be rearranged. The process can be terminated when its operation is completed, but it can also have additional steps not included in the accompanying drawings. The process can correspond to methods, functions, procedures, subroutines, subprograms, etc.
[0022] Embodiment 1 A piglet insulation method based on visual image recognition, in the specific implementation process, such as Figure 1 As shown, it shows a schematic flow chart of a piglet insulation method based on visual image recognition, including: Step S1: Obtain the visible light video stream, infrared imaging video stream and ambient temperature data of the area where the piglets are located in real time.
[0023] During the specific implementation process, high-definition visible light cameras, infrared imaging cameras and ambient temperature sensors are installed in the area where the piglets are located to collect visible light video streams, infrared imaging video streams and ambient temperature data in real time.
[0024] Step S2: Input the acquired visible light video stream, infrared imaging video stream and ambient temperature data into the pre-trained end-to-end deep learning model for frame-by-frame image registration and fusion to obtain a comprehensive information video stream.
[0025] Specifically, step S2 includes the following steps: Step S201: reading image frames of the visible light video stream and the infrared imaging video stream frame by frame to obtain visible light image frames and infrared imaging image frames; Step S202: spatially aligning the corresponding visible light image frames and infrared imaging image frames through a spatial transformation network; Step S203: fusing the spatially aligned visible light image frames and infrared imaging image frames frame by frame to obtain a plurality of comprehensive frame information images; Step S204: Recombine multiple comprehensive frame information images and fuse the ambient temperature data to obtain a comprehensive information video stream.
[0026] In the specific implementation process, firstly, the image frames of the visible light video stream and the infrared imaging video stream are read frame by frame by the video processing software to obtain the visible light image frames and the infrared imaging image frames; then, necessary preprocessing is performed on the visible light image frames and the infrared imaging image frames to improve the accuracy of subsequent processing, and feature extraction is performed on the preprocessed visible light image frames and the infrared imaging image frames, and the key points and descriptors of the visible light image frames and the infrared imaging image frames are extracted by using the feature extraction algorithm, and the key points of the visible light image frames and the infrared imaging image frames are matched by using the feature matching algorithm, and the spatial transformation matrix is calculated according to the matching point pairs, and the infrared imaging image frames are transformed by using the spatial transformation matrix to align them with the visible light image frames; secondly, each pair of aligned visible light image frames and infrared imaging image frames is fused by the image fusion algorithm to generate a plurality of comprehensive frame information images; finally, the plurality of comprehensive frame information images are recombined into a video stream in chronological order, and then combined with the ambient temperature data, the timestamp of the ambient temperature data is aligned with the recombined video stream to generate a comprehensive information video stream.
[0027] Step S3: using a lightweight target detection method to identify the position of the piglets in the comprehensive information video stream, and using a multi-target tracking method to continuously track each piglet in the comprehensive information video stream.
[0028] During the specific implementation process, the image frames in the comprehensive information video stream are read, and a lightweight target detection method, exemplarily, a lightweight target detection method YOLOv5 is used to identify the position of the piglets in the image frame, and a multi-target tracking algorithm is selected, exemplarily, a DeepSORT multi-target tracking algorithm is used to pass the target recognition result in each image frame to the multi-target tracking algorithm for processing, and the tracking status of each piglet is updated.
[0029] Step S4: Based on the identification results and the tracking results, the comprehensive behavior characteristic score and the comprehensive body temperature characteristic score of each piglet are obtained.
[0030] Specifically, the comprehensive behavior characteristic score includes a motion state score and an aggregation level score, and the motion state score includes a moving speed score, a direction change rate score, and a path complexity score.
[0031] Specifically, the movement speed score was determined by calculating the displacement distance of the piglets in multiple consecutive frames within the selected time period; The direction change rate score was determined by calculating the change angle of the piglet's movement direction in multiple consecutive frames during the selected time period; The path complexity score was determined by calculating the curvature of the piglet’s trajectory during the selected time period; Aggregation level scores were determined by analyzing the distance and relative position between piglets over a selected time period.
[0032] In the specific implementation process, based on the results of recognition and tracking, it is necessary to calculate the comprehensive behavior feature score and the comprehensive body temperature feature score. The comprehensive behavior feature score includes the motion state score and the aggregation level score. The calculation of the motion state score needs to consider the movement speed score, direction change rate score and path complexity score of each piglet. The movement speed score is determined by, for example, selecting the position of each piglet in multiple consecutive frames within 10 seconds within a selected time period, and calculating the displacement distance of each piglet in these frames, thereby calculating the movement speed of each piglet, and normalizing the movement speed to between 0 and 1 through normalization processing to obtain the movement speed score; the direction change rate score is determined by, for example, selecting the position of each piglet in multiple consecutive frames within 10 seconds within a selected time period, and calculating the displacement distance of each piglet in these frames, thereby calculating the movement speed of each piglet, and normalizing the movement speed to between 0 and 1 through normalization processing to obtain the movement speed score; the direction change rate score is determined by, for example, selecting the position of each piglet in multiple consecutive frames within 10 seconds within a selected time period, and calculating the displacement distance of each piglet in these frames, thereby calculating the movement speed of each piglet For example, the change in the movement direction of each piglet in multiple consecutive frames within 10 seconds is selected, and the direction change angle of each piglet in these frames is calculated, and the direction change angle is normalized to between 0 and 1 to obtain a direction change rate score; the path complexity score is obtained by, for example, selecting the movement trajectory of each piglet within 10 seconds in a selected time period, and calculating the curvature of the movement trajectory of each piglet, and normalizing the path curvature to between 0 and 1 to obtain a path complexity score; the aggregation level score is obtained by, for example, recording the position of each piglet within a selected time period, for example, selecting within 10 seconds, and calculating the average distance between each piglet and other piglets, and normalizing the average distance to between 0 and 1 to obtain an aggregation level score.
[0033] Specifically, the calculation formula of the motion status score is:
[0034] in, Score for the movement status, Score for movement speed, is the direction change rate score, is the path complexity score, They are the weight coefficients of the moving speed score, direction change rate score and path complexity score respectively.
[0035] In the specific implementation process, the calculated moving speed score, direction change rate score and path complexity score are weighted and fused to obtain the motion state score. They are the weight coefficients of the moving speed score, the direction change rate score and the path complexity score, respectively. These coefficients are determined and adjusted according to the specific environmental experimental data.
[0036] Specifically, the calculation formula for the comprehensive behavioral characteristic score is:
[0037] in, is the comprehensive behavioral characteristic score, is the aggregation level score, are the weight coefficients of the motion state score and aggregation level score respectively.
[0038] In the specific implementation process, the comprehensive behavior feature score is obtained by weighted fusion of the motion state score and the aggregation level score, where: are the weight coefficients of the motion state score and the aggregation level score, respectively. These coefficients are determined and adjusted according to the specific environmental experimental data.
[0039] Specifically, in step S5, the calculation formula for the comprehensive body temperature feature score is:
[0040] in, is the comprehensive temperature characteristic score, , is the proportionality coefficient, is the current body temperature of the piglet, The lower limit of normal body temperature for piglets. The upper limit of normal body temperature for piglets. is the current ambient temperature, is the lower limit of normal ambient temperature, It is the upper limit of normal ambient temperature.
[0041] In the specific implementation process, the comprehensive body temperature characteristic score needs to take into account the body temperature characteristics of each individual piglet, and also needs to consider the influence of ambient temperature. First, determine the lower limit of normal body temperature of piglets. and the upper limit of normal body temperature of piglets , and the lower limit of normal ambient temperature , upper limit of normal ambient temperature , based on the current body temperature data obtained for each piglet and current ambient temperature , through the normalization formula and combined with the proportionality coefficient , , proportionality coefficient , , determined and adjusted through actual environmental tests, and the comprehensive body temperature characteristic score was calculated. The comprehensive body temperature characteristic score obtained by this body temperature characteristic calculation formula comprehensively considers the current body temperature and ambient temperature of the piglet, increasing the comprehensiveness and scientificity of the data.
[0042] Step S5: weighted fusion of the comprehensive behavioral characteristic score and the comprehensive body temperature characteristic score to obtain the heat preservation strategy score of each piglet.
[0043] Specifically, the calculation formula for the insulation strategy score is:
[0044] in, Score the insulation strategy, are the weight coefficients of the comprehensive behavioral characteristic score and the comprehensive temperature characteristic score respectively. During the specific implementation process, the comprehensive behavioral characteristic score and the comprehensive body temperature characteristic score are finally weighted and fused to obtain the insulation strategy score of each piglet. Similarly, the insulation strategy score for each piglet is determined and adjusted through actual environmental tests, and serves as the basis for the implementation of subsequent insulation strategies.
[0045] Step S6: establishing a probability distribution based on the heat preservation strategy scores of all piglets, and generating the heat preservation strategy of the piglets according to the probability distribution.
[0046] Specifically, the piglet insulation strategy includes a group insulation strategy and an abnormal individual piglet insulation strategy, wherein the group insulation strategy is based on the upper limit threshold of the preset insulation strategy score. , lower threshold , the mean score of the insulation strategy and decision execution probability threshold Specifically: Calculate the mean and standard deviation of the heat preservation strategy scores of all piglets, and then calculate the heat preservation strategy score Greater than upper threshold Or the insulation strategy score Less than the lower threshold The probability of , where the probability Indicates the insulation strategy score Greater than upper threshold The proportion of piglets or the score of the heat preservation strategy Less than the lower threshold The proportion of piglets like ,and Then turn on the ventilation equipment to cool down; like ,and Then turn on the heating equipment to heat and keep warm; The abnormal individual piglet insulation strategy is to calculate the standardized value of each piglet's insulation strategy score based on the obtained mean and standard deviation. When the standardized value is less than the preset lower limit threshold and greater than the preset upper limit threshold, it is judged as an abnormal value. If the standardized value for an individual piglet is an outlier, and , then implement individual heating pad heating and insulation measures for abnormal individual piglets; If the standardized value for an individual piglet is an outlier, and , individual ventilation and cooling measures will be implemented for abnormal individual piglets.
[0047] During the specific implementation process, a probability distribution is established based on the insulation strategy scores of all piglets, and the insulation strategy of the piglets is generated according to the probability distribution. The insulation strategy of the piglets is divided into group insulation strategy and abnormal individual insulation strategy. The group insulation strategy usually ignores the actual conditions of some individual piglets, and it is necessary to pay attention to the conditions of abnormal individual piglets and take additional insulation measures for them. The group insulation strategy and the abnormal individual insulation strategy complement each other, making the insulation strategy more efficient and scientific. For example, the normal distribution is used to determine the group insulation strategy of the piglets. First, the mean and standard deviation of the insulation strategy scores of all piglets are calculated, and the upper limit threshold of the insulation strategy score is preset. , lower threshold and decision execution probability threshold , and Determined according to the actual environmental test, and then the mean value of the insulation strategy score is determined respectively and and If , and then calculate the probability If the same value , indicating that most piglets have a high score in the heat preservation strategy segment, and it is necessary to cool the piglets appropriately. Then, the ventilation equipment should be turned on for cooling. Similarly, if ,and This means that the insulation strategy scores of most piglets are in the low segment and the heating equipment needs to be turned on for heating and insulation. At the same time, in practice, attention should be paid to the situation of abnormal individual piglets. The standardized value of the insulation strategy score of each piglet is calculated based on the obtained mean and standard deviation. When the standardized value is less than the preset standardized lower limit threshold and greater than the preset standardized upper limit threshold, it is judged as an outlier. For example, in a standard normal distribution, the standardized values of about 95% of the data points are between -2 and 2. Therefore, if the absolute value of the standardized value of a insulation strategy score data point is greater than 2, it is considered that the insulation strategy score of the piglet deviates significantly from the mean value and is considered to be an outlier. Therefore, in actual production, the standardized lower limit threshold is set to -2, and the standardized upper limit threshold is set to 2. After identifying the piglets with abnormal standardized values, if the insulation strategy score of the piglet meets the standard, then , it means that the piglet's body temperature is abnormally low and additional insulation measures are needed. For example, a separate heating pad is used to provide heating and insulation for the piglet. Similarly, after identifying the piglet with abnormal standardized value, if the piglet's insulation strategy score meets , indicating that the piglet's body temperature is abnormally high and additional cooling measures are needed. For example, a separate ventilation device is used to cool the piglet.
[0048] The working principle of the piglet insulation method based on visual image recognition provided by the present invention is as follows: By acquiring the visible light video stream, infrared imaging video stream and ambient temperature data of the piglet area in real time, the pre-trained end-to-end deep learning model is used to perform frame-by-frame image registration and fusion to generate a comprehensive information video stream. Then, a lightweight target detection method is used to identify the position of the piglets in the comprehensive information video stream, and each piglet is continuously tracked by a multi-target tracking method. Based on the results of recognition and tracking, the comprehensive behavioral feature score and comprehensive body temperature feature score of each piglet are calculated. The comprehensive behavioral feature score includes the motion state score and the aggregation level score. The motion state score includes the moving speed score, the direction change rate score and the path complexity score. The insulation strategy score of each piglet is generated through weighted fusion. Finally, the group and individual insulation strategies are established according to the insulation strategy score to achieve accurate and intelligent piglet insulation management.
[0049] Embodiment 2 A piglet insulation system based on visual image recognition is applied to a piglet insulation method based on visual image recognition. In the specific implementation process, Figure 2 As shown, it shows a schematic diagram of the module structure of a piglet insulation system based on visual image recognition, including: The data acquisition module 100 is used to obtain the visible light video stream, infrared imaging video stream and environmental temperature data of the area where the piglets are located in real time; The image registration and fusion module 200 is used to input the acquired visible light video stream, infrared imaging video stream and ambient temperature data into a pre-trained end-to-end deep learning model for frame-by-frame image registration and fusion to obtain a comprehensive information video stream; The target detection and tracking module 300 is used to identify the position of the piglets in the comprehensive information video stream using a lightweight target detection method, and to continuously track each piglet in the comprehensive information video stream using a multi-target tracking method; A feature score calculation module 400 is used to obtain a comprehensive behavior feature score and a comprehensive body temperature feature score of each piglet based on the recognition result and the tracking result; The heat preservation strategy score calculation module 500 is used to perform weighted fusion of the comprehensive behavior characteristic score and the comprehensive body temperature characteristic score to obtain the heat preservation strategy score of each piglet; The heat preservation strategy generation module 600 is used to establish a probability distribution based on the heat preservation strategy scores of all piglets, and generate a heat preservation strategy for the piglets according to the probability distribution.
[0050] The working principle of the piglet insulation system based on visual image recognition provided by the present invention is as follows: The data acquisition module 100 collects the visible light video stream, infrared imaging video stream and ambient temperature data of the area where the piglets are located in real time. The image registration and fusion module 200 reads the image frames of the visible light video stream and the infrared imaging video stream frame by frame, spatially aligns the corresponding image frames through the spatial transformation network, fuses the aligned image frames frame by frame, generates multiple comprehensive frame information images, and finally recombines these comprehensive frame information images and fuses the ambient temperature data to obtain a comprehensive information video stream. The target detection and tracking module 300 loads the pre-trained lightweight target detection model, performs target detection on each frame in the comprehensive information video stream, and identifies the position of the piglets; then uses the multi-target tracking algorithm to continuously track the position of each piglet. Movement trajectory, feature score calculation module 400, calculates the movement state score and aggregation level score of each piglet, and then weighted fusion obtains the comprehensive behavior feature score of each piglet; at the same time, combined with the current body temperature of the piglet, normal body temperature range, ambient temperature and normal ambient temperature range, calculates the comprehensive body temperature feature score of each piglet, insulation strategy score calculation module 500, weighted fusion of the comprehensive behavior feature score and the comprehensive body temperature feature score, generates the insulation strategy score of each piglet, ensures the comprehensiveness and scientificity of the decision, insulation strategy generation module 600, calculates the mean and standard deviation of the insulation strategy scores of all piglets, and establishes a probability distribution; generates group and individual insulation strategies based on the probability distribution and the preset threshold.
[0051] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0052] A person skilled in the art may understand that all or part of the steps in the various methods of the above embodiments may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, the storage medium including a read-only memory (ROM), a random access memory (RAM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electronically-erasable programmable read-only memory (EEPROM), a compact disc (CD-ROM) or other optical disc storage, magnetic disk storage, magnetic tape storage, or any other computer-readable medium that can be used to carry or store data.
[0053] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
Claims
1. A piglet insulation method based on visual image recognition, characterized in that: The piglet heat preservation method comprises the following steps: S1: Real-time acquisition of visible light video stream, infrared imaging video stream and environmental temperature data of the area where the piglets are located; S2: Input the acquired visible light video stream, infrared imaging video stream and ambient temperature data into the pre-trained end-to-end deep learning model for frame-by-frame image registration and fusion to obtain a comprehensive information video stream; S3: using a lightweight object detection method to identify the location of piglets in the comprehensive information video stream, and using a multi-object tracking method to continuously track each piglet in the comprehensive information video stream; S4: Based on the identification results and tracking results, the comprehensive behavioral characteristic score and comprehensive body temperature characteristic score of each piglet are obtained; S5: weighted fusion of the comprehensive behavioral characteristic score and the comprehensive body temperature characteristic score to obtain the heat preservation strategy score of each piglet; S6: Establish a probability distribution based on the insulation strategy scores of all piglets, and generate the insulation strategy of the piglets according to the probability distribution.
2. A method for keeping piglets warm based on visual image recognition according to claim 1, characterized in that: The step S2 comprises the following steps: S201: Reading image frames of a visible light video stream and an infrared imaging video stream frame by frame to obtain visible light image frames and infrared imaging image frames; S202: spatially aligning corresponding visible light image frames and infrared imaging image frames through a spatial transformation network; S203: fusing the spatially aligned visible light image frames and infrared imaging image frames frame by frame to obtain a plurality of comprehensive frame information images; S204: Recombining the multiple comprehensive frame information images and integrating the ambient temperature data to obtain a comprehensive information video stream.
3. A piglet keeping warm method based on visual image recognition according to claim 2, characterized in that: The comprehensive behavior feature score includes a motion state score and an aggregation level score, and the motion state score includes a moving speed score, a direction change rate score, and a path complexity score.
4. A piglet keeping warm method based on visual image recognition according to claim 3, characterized in that: The movement speed score is determined by calculating the displacement distance of the piglet in a plurality of consecutive frames within a selected time period; The direction change rate score is determined by calculating the change angle of the piglet's movement direction in a plurality of consecutive frames within a selected time period; The path complexity score is determined by calculating the curvature of the piglet's movement trajectory during a selected time period; The aggregation level score is determined by analyzing the distance and relative position between piglets over a selected time period.
5. A method for keeping piglets warm based on visual image recognition according to claim 4, characterized in that: The calculation formula of the motion status score is: in, Score for the movement status, Score for movement speed, is the direction change rate score, is the path complexity score, They are the weight coefficients of the moving speed score, direction change rate score and path complexity score respectively.
6. The method for keeping piglets warm based on visual image recognition according to claim 3, characterized in that: The calculation formula of the comprehensive behavior characteristic score is: in, is the comprehensive behavioral characteristic score, is the aggregation level score, are the weight coefficients of the motion state score and aggregation level score respectively.
7. A method for keeping piglets warm based on visual image recognition according to claim 6, characterized in that: In step S5, the calculation formula of the comprehensive body temperature feature score is: in, is the comprehensive temperature characteristic score, , is the proportionality coefficient, is the current body temperature of the piglet, The lower limit of normal body temperature for piglets. The upper limit of normal body temperature for piglets. is the current ambient temperature, is the lower limit of normal ambient temperature, It is the upper limit of normal ambient temperature.
8. The method for keeping piglets warm based on visual image recognition according to claim 7, characterized in that: The calculation formula of the insulation strategy score is: in, Score the insulation strategy, are the weight coefficients of the comprehensive behavioral characteristic score and the comprehensive temperature characteristic score, respectively.
9. A method for keeping piglets warm based on visual image recognition according to claim 8, characterized in that: The piglet insulation strategy includes group insulation strategy and abnormal individual piglet insulation strategy, among which the group insulation strategy is based on the upper limit threshold of the preset insulation strategy score. , lower threshold , the mean score of the insulation strategy and decision execution probability threshold Specifically: Calculate the mean and standard deviation of the heat preservation strategy scores of all piglets, and then calculate the heat preservation strategy score Greater than upper threshold Or the insulation strategy score Less than the lower threshold The probability of , where the probability Indicates the insulation strategy score Greater than upper threshold The proportion of piglets or the score of the heat preservation strategy Less than the lower threshold The proportion of piglets like ,and Then turn on the ventilation equipment to cool down; like ,and Then turn on the heating equipment to heat and keep warm; The abnormal individual piglet insulation strategy is to calculate the standardized value of each piglet's insulation strategy score based on the obtained mean and standard deviation. When the standardized value is less than the preset lower limit threshold and greater than the preset upper limit threshold, it is judged as an abnormal value. If the standardized value for an individual piglet is an outlier, and , then implement individual heating pad heating and insulation measures for abnormal individual piglets; If the standardized value for an individual piglet is an outlier, and , individual ventilation and cooling measures will be implemented for abnormal individual piglets.
10. A piglet insulation system based on visual image recognition, characterized in that: Applied to a piglet insulation method based on visual image recognition as claimed in any one of claims 1 to 9, the piglet insulation system comprises: A data acquisition module is used to obtain real-time visible light video stream, infrared imaging video stream and ambient temperature data of the area where the piglets are located; The image registration and fusion module is used to input the acquired visible light video stream, infrared imaging video stream and ambient temperature data into the pre-trained end-to-end deep learning model for frame-by-frame image registration and fusion to obtain a comprehensive information video stream; an object detection and tracking module for identifying the position of the piglets in the comprehensive information video stream using a lightweight object detection method and continuously tracking each piglet in the comprehensive information video stream using a multi-object tracking method; A feature score calculation module is used to obtain a comprehensive behavioral feature score and a comprehensive body temperature feature score of each piglet based on the recognition results and the tracking results; The heat preservation strategy score calculation module is used to perform weighted fusion of the comprehensive behavioral characteristic score and the comprehensive body temperature characteristic score to obtain the heat preservation strategy score of each piglet; The heat preservation strategy generation module is used to establish a probability distribution based on the heat preservation strategy scores of all piglets, and generate the heat preservation strategy of the piglets according to the probability distribution.
Citation Information
Cited By
Warm-keeping device for piglet breeding and use method of warm-keeping device
CN120477075A