Automatic feeding device, system and method based on pig face recognition technology

By adopting the automatic feeding system with pig face recognition technology in pig farms, the existing feeding system is solved, and the existing feeding system is fed on demand is realized, which reduces feed costs and improves feeding efficiency.

CN111567427BActive Publication Date: 2025-01-10UNIV OF SCI & TECH BEIJING +1
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202010459568.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-05-27
Publication Date
2025-01-10
Estimated Expiration
2040-05-27

Smart Images

  • Figure CN111567427B_ABST
    Figure CN111567427B_ABST
Patent Text Reader

Abstract

The present invention provides an automatic feeder, system and method based on pig face recognition technology; the automatic feeder includes a food storage bucket, a conduit is provided at the bottom end, a valve and a recognition device for identifying pig faces are provided on the conduit, and a food trough is provided at the bottom end of the conduit; the recognition device is used to recognize the pig face image, determine the current amount of food and frequency of the pig, and judge whether the current pig needs to eat; the automatic feeding system is composed of the above-mentioned multiple automatic feeders in parallel, each automatic feeder corresponds to a feeding channel, and automatic feeding can be achieved according to the pig face recognition result. The present invention has built an intelligent breeding service platform based on pig face recognition, and created a full-process, full-chain, and full-ecological pig face recognition automatic feeding system, which solves the problems of high waste, high pollution, and high energy consumption in the process of pig breeding, and reduces the breeding cost for small and medium-sized breeding enterprises.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of automated application and image recognition technology, and in particular to an automatic feeder, system and method based on pig face recognition technology. Background Art

[0002] For developing countries, smart agriculture is the main way to eliminate poverty, realize latecomer advantages, catch up in economic development, and implement catch-up strategies, and animal husbandry is an important part of agriculture.

[0003] On the other hand, in the current pig farming industry, there are generally two ways to feed pigs. One way is open feeding and penning, that is, a pen of pigs share a trough. This feeding method is efficient and fast, but it is easy to cause waste due to pigs fighting for food, and it is impossible for each pig to eat accurately. The other feeding method is separate feeding, that is, each pig has a separate feeding area. This method can ensure accurate feeding, but the operation is cumbersome and the cost of pig pen modification is high. It is not suitable for small and medium-sized pig farms. Summary of the invention

[0004] The technical problem to be solved by the present invention is to provide an automatic feeder, system and method based on pig face recognition technology, so as to at least partially solve the above-mentioned problems existing in the existing pig farm feeding system.

[0005] In order to solve the above technical problems, the present invention provides the following technical solutions:

[0006] An automatic feeder based on pig face recognition technology, the automatic feeder comprises a food storage bucket for storing pig food, a conduit for conveying pig food is provided at the bottom end of the food storage bucket, a valve for controlling the closure of the conduit is provided on the conduit, a trough for accommodating the pig food flowing out of the conduit is provided at the bottom end of the conduit; the conduit is also provided with an identification device for performing pig face recognition sensing on a pig to be fed.

[0007] Furthermore, the recognition device includes an infrared camera, an image processor and a display; wherein,

[0008] The infrared camera is used to collect pig face images of pigs to be fed; the image processor is used to recognize the collected pig face images using a preset processing algorithm, display the recognition results through the display, and determine the current pig's food intake and feeding frequency based on the recognition results, and judge whether the current pig needs to eat.

[0009] Furthermore, the preset processing algorithm includes a pig face detection algorithm and a pig face recognition model; wherein,

[0010] The pig face detection algorithm is used to perform grayscale processing, pig face detection, edge cropping, rotation correction and resizing on the pig face image collected by the infrared camera and extract multiple facial feature points;

[0011] The pig face recognition model is used to encode the corresponding pig face image into a feature vector of preset dimension according to the extracted facial feature points, and respectively calculate the complexity invariant distance between the feature vector and all image vectors in a preset database, and take the image whose calculated complexity invariant distance exceeds a preset threshold and has the smallest complexity invariant distance value with the feature vector as the recognition result, and display the pig number corresponding to the recognition result and its preset related information through the display.

[0012] Furthermore, the facial feature points include eyes, nose and mouth.

[0013] Furthermore, after respectively calculating the complexity invariant distances between the feature vector and all image vectors in the preset database, the pig face recognition model is also used to:

[0014] The calculated image vectors whose complexity invariant distance exceeds a preset threshold are used to overwrite the original image vectors in the preset database, so as to achieve self-update of the preset database.

[0015] Furthermore, the pig face recognition model is built based on a convolutional neural network, whose input layer is a pig face image processed by the pig face detection algorithm, sampled by a convolution layer, and then composed of two sampling modules, each sampling module includes two convolution layers and a pooling layer, followed by two fully connected layers and an output layer; the pig face recognition model uniformly adopts ReLU as the activation function.

[0016] Accordingly, in order to solve the above technical problems, the present invention also provides the following technical solutions:

[0017] An automatic feeding system based on pig face recognition technology, the automatic feeding system comprises the automatic feeder as described above, each of the automatic feeders corresponds to a feeding channel; one end of the feeding channel is provided with a walk-in door for the pigs to be fed to walk into the feeding channel, and the other end is provided with an exit door for the pigs in the feeding channel to walk out of the feeding channel;

[0018] When a pig walks to the walk-in door, if there is no pig eating in the feeding passage and the walk-out door is in a closed state, the automatic feeder controls the walk-in door to open; after the current pig enters the feeding passage, the automatic feeder controls the walk-in door to close;

[0019] When the identification device determines that the current pig needs to eat, the valve is controlled to open, so that the pig food in the food storage bucket flows into the trough through the conduit for the current pig to eat; when the pig in the feeding channel has finished eating or the identification device determines that the current pig does not need to eat, the exit door is controlled to open to drive the pig out of the feeding channel, and the exit door is closed after the current pig walks out of the feeding channel.

[0020] Furthermore, the automatic feeding system also includes a food storage device, and the food storage device is connected to each food storage bucket.

[0021] Accordingly, in order to solve the above technical problems, the present invention also provides the following technical solutions:

[0022] An automatic feeding method based on pig face recognition technology implemented by the above-mentioned automatic feeding system based on pig face recognition technology, the automatic feeding method comprising:

[0023] When a pig walks to the walk-in door, if there is no pig eating in the feeding channel and the walk-out door is closed, the walk-in door is controlled to open; and after the current pig enters the feeding channel, the walk-in door is controlled to close;

[0024] Acquire a pig face image through an infrared camera, and send the pig face image to an image processor;

[0025] Performing pig face detection according to the pig face feature points in the pig face image, determining the pig face image according to the edge feature points after the pig face is detected and performing preprocessing, including graying, edge cropping and rotation alignment;

[0026] Resize the preprocessed pig face image and input it into the pig face recognition model;

[0027] According to the output result of the pig face recognition model, determine whether the current pig needs to be fed;

[0028] If the current pig needs to eat, the valve is controlled to open so that the pig food in the food storage bucket flows into the trough; when the pig has finished eating or it is determined that the current pig does not need to eat, the exit door is controlled to open to drive the pig out of the feeding passage, and the exit door is closed after the current pig walks out of the feeding passage.

[0029] Furthermore, the pig face recognition model recognizes the pig face image in the following steps:

[0030] Encoding the pig face image into a feature vector of a preset dimension according to facial feature points in the pig face image;

[0031] respectively calculating the complexity invariant distances between the feature vector and all image vectors in a preset database;

[0032] The image whose complexity invariant distance exceeds the preset threshold and whose complexity invariant distance value with the feature vector is the smallest is taken as the recognition result, and the image vector whose complexity invariant distance exceeds the preset threshold is used to overwrite the original image vector in the preset database to realize self-update of the preset database.

[0033] The beneficial effects of the above technical solution of the present invention are as follows:

[0034] The automatic feeder of the present invention can automatically identify the pig face, and accurately measure the daily food intake of each pig according to the identification result, and realize on-demand feeding according to the food intake of the pig, so as to achieve the effect of high efficiency and environmental protection. The automatic feeding system composed of the automatic feeder can ensure that only one pig eats at the same time, ensure the daily food intake of the pig, and greatly reduce the feed cost. Moreover, each automatic feeder in the system of the present invention can operate independently or in combination, and can be flexibly applied to small and medium-sized breeding enterprises. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Figure 1 A schematic diagram of the structure of an automatic feeder based on pig face recognition technology provided by the first embodiment of the present invention;

[0036] Figure 2 A schematic diagram of the network structure of the pig face recognition model of the present invention;

[0037] Figure 3 A schematic flow chart of an automatic feeding method based on pig face recognition technology provided in the third embodiment of the present invention.

[0038] Description of reference numerals:

[0039] 1. Food storage bucket; 2. Conduit; 3. Valve; 4. Food trough; 5. Identification device. DETAILED DESCRIPTION

[0040] In order to make the technical problems, technical solutions and advantages to be solved by the present invention more clear, a detailed description will be given below with reference to the accompanying drawings and specific embodiments.

[0041] First embodiment

[0042] See also Figure 1 The present embodiment provides an automatic feeder based on pig face recognition technology, which includes a food storage bucket 1 for storing pig food, a conduit 2 for conveying pig food is arranged at the bottom end of the food storage bucket 1, a valve 3 for controlling the closing of the conduit 2 is arranged on the conduit 2, and the valve 3 can be a solenoid valve; a trough 4 for accommodating the pig food flowing out of the conduit 2 is arranged at the bottom end of the conduit 2; in addition, an identification device 5 for performing pig face recognition sensing on the pig to be fed is also arranged on the conduit 2.

[0043] The above-mentioned recognition device 5 includes an infrared camera, an image processor and a display; wherein the infrared camera is used to collect pig face images of pigs to be fed. The use of an infrared camera can improve the success rate of pig face image collection in low-light environments; the image processor is used to use a preset processing algorithm to identify the collected pig face images, display the results through the display, and determine the current pig's food intake and feeding frequency based on the recognition results, and send them to the main server through the network to determine whether the current pig needs to eat.

[0044] The equipment of this embodiment can analyze the eating habits of pigs, and combined with scientific diet matching, ensure the daily food intake of pigs, greatly reducing feed costs.

[0045] Specifically, the preset processing algorithms include pig face detection and preprocessing algorithms and pig face recognition models; both algorithms need to be trained with a large number of data sets. On the one hand, the parameters in the algorithm can be optimized to ensure effective detection and feature extraction of pig faces in input images; on the other hand, a larger training set can solve the problems of overfitting and poor generalization ability of the model.

[0046] The pig face detection algorithm is used to perform grayscale processing, pig face detection, edge cropping, rotation correction, and resizing on the pig face image collected by the infrared camera, and extract multiple facial feature points; wherein the facial feature points include the pig's eyes, nose, mouth and other feature points;

[0047] The pig face recognition model is used to encode the corresponding pig face image into a 128-dimensional feature vector based on the extracted facial feature points, and calculate the complexity invariant distance between the feature vector and all image vectors in the preset database, and output the image whose calculated complexity invariant distance exceeds the preset threshold and whose complexity invariant distance value with the feature vector is the smallest as the recognition result, and display the pig number corresponding to the recognition result and its preset related information through the display. At the same time, the image vector whose calculated complexity invariant distance exceeds the preset threshold is used to overwrite the original image vector in the preset database to achieve self-update of the preset database. This is to overcome the problem of fast growth of pigs and fast changes in pig faces. If the calculated results do not exceed the threshold, it is deemed that the recognition has failed, and the recognition results will be confirmed or corrected through manual assistance.

[0048] Furthermore, the above pig face recognition model is built based on a convolutional neural network, such as Figure 2 As shown in the figure, its input layer is a pig face image processed by a pig face detection algorithm, which is sampled by a convolution layer, followed by two sampling modules. Each sampling module includes two convolution layers and a pooling layer, followed by two fully connected layers and an output layer. The recognition model uniformly uses ReLU as the activation function.

[0049] By using the automatic feeder based on pig face recognition technology of this embodiment, when a pig approaches the trough, the pig's face can be automatically detected and identified through the recognition device, and the daily food intake and frequency of each pig can be accurately measured based on the recognition result, and on-demand feeding can be achieved according to the pig's food intake, achieving efficient and environmentally friendly effects.

[0050] Second embodiment

[0051] The present embodiment provides an automatic feeding system based on pig face recognition technology, which is composed of automatic feeders as described in the first embodiment connected in parallel, and each automatic feeder corresponds to a feeding channel; a walk-in door is provided at one end of the feeding channel for the pigs to be fed to enter the feeding channel, and the pigs can enter the walk-in door freely. When a pig enters, the door automatically senses and closes, and other pigs can no longer enter. The door can only be used for entry but not exit; an exit door is provided at the other end of the feeding channel for the pigs in the feeding channel to walk out of the feeding channel, and the door can only be used for exit but not entry; the feeding channel ensures that only one pig eats at the same time.

[0052] When a pig walks to the walk-in door, if there is no pig eating in the feeding channel and the walk-out door is closed, the automatic feeder controls the walk-in door to open; after the current pig enters the feeding channel, the automatic feeder controls the walk-in door to close; when the identification device determines that the current pig needs to eat, the valve 3 is controlled to open, so that the pig food in the food storage bucket 1 flows into the trough 4 through the conduit 2 for the current pig to eat; when the pig in the feeding channel finishes eating or the identification device determines that the current pig does not need to eat, the walk-out door is controlled to open, the pig is driven out of the feeding channel, and the walk-out door is closed after the current pig walks out of the feeding channel.

[0053] Furthermore, the automatic feeding system of this embodiment also includes a food storage device, which is connected to each food storage bucket through a transmission pipe. The food storage device is used to produce and mix pig feed as a whole, and then transmit it to each feeder through the transmission pipe.

[0054] With the automatic feeding system of this embodiment, when a pig approaches the trough, the recognition device automatically identifies the amount of food the pig has eaten today and determines whether the pig needs to eat. If the pig needs to eat, the device automatically releases the pig food. If the pig does not need to eat, the exit is opened to prompt the pig to leave. At the same time, the recognition model adopts an autonomous learning system to update the pig face data in real time to ensure that the pig is accurately identified during its growth. The system is connected in parallel, and each automatic feeder can operate independently or in combination, which can be flexibly applied to small and medium-sized breeding enterprises.

[0055] Third embodiment

[0056] See also Figure 3This embodiment provides an automatic feeding method based on pig face recognition technology implemented by the automatic feeding system of the second embodiment above, and the automatic feeding method includes:

[0057] S101, when a pig walks to the walk-in door, if there is no pig eating in the feeding channel and the walk-out door is closed, the walk-in door is controlled to open; and after the current pig enters the feeding channel, the walk-in door is controlled to close;

[0058] S102, acquiring a pig face image through an infrared camera, and sending the pig face image to an image processor;

[0059] S103, performing pig face detection according to the pig face feature points in the pig face image, and after the pig face is detected, determining the pig face image according to the edge feature points and performing preprocessing, including graying, edge cropping and rotation alignment;

[0060] S104, resizing the preprocessed pig face image and inputting it into a pig face recognition model;

[0061] S105, judging whether the current pig needs to be fed according to the output result of the pig face recognition model;

[0062] S106, if the current pig needs to eat, the valve is controlled to open so that the pig food in the food storage bucket flows into the trough; when the pig has finished eating or it is determined that the current pig does not need to eat, the exit door is controlled to open to drive the pig out of the feeding passage, and the exit door is closed after the current pig walks out of the feeding passage.

[0063] Furthermore, the pig face recognition model of this embodiment recognizes the pig face image in the following manner:

[0064] Encode the pig face image into a 128-dimensional feature vector according to the facial feature points in the pig face image;

[0065] Calculate the complexity invariant distance between the feature vector and all image vectors in the preset database respectively;

[0066] The image whose complexity invariant distance exceeds the preset threshold and whose complexity invariant distance value with the feature vector is the smallest is taken as the recognition result. At the same time, the image vector whose complexity invariant distance exceeds the preset threshold is used to overwrite the original image vector in the preset database to realize self-update of the preset database.

[0067] By adopting the automatic feeding method of this embodiment, when a pig approaches the trough, the pig face recognition device can automatically identify the pig's food intake today and determine whether the pig needs to eat. If the pig needs to eat, the device automatically releases the pig food, and if the pig does not need to eat, the exit is opened to prompt the pig to leave. At the same time, the recognition model adopts an autonomous learning system to update the pig face data in real time to ensure that the pig is accurately identified during its growth process.

[0068] In addition, it should be noted that those skilled in the art should understand that the embodiments of the present invention can be provided as methods, devices, or computer program products. Therefore, the embodiments of the present invention can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the embodiments of the present invention can take the form of a computer program product implemented on one or more computer-usable storage media containing computer-usable program code.

[0069] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal 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.

[0070] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device, so that a series of operation steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable terminal device provide for implementing the process in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0071] It should also be noted that, in this article, the terms "include", "comprises" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.

[0072] Finally, it should be noted that the above is a preferred embodiment of the present invention. It should be pointed out that although the preferred embodiment of the present invention has been described, once the basic creative concept of the present invention is known, a number of improvements and modifications can be made by ordinary technicians in this field without departing from the principles of the present invention. These improvements and modifications should also be regarded as the protection scope of the present invention. Therefore, the attached claims are intended to be interpreted as including the preferred embodiment and all changes and modifications that fall within the scope of the embodiments of the present invention.

Claims

1. An automatic feeding device based on pig face recognition technology, characterized in that: It comprises a food storage bucket for storing pig food, wherein a conduit for conveying pig food is provided at the bottom end of the food storage bucket, a valve for controlling the closing of the conduit is provided on the conduit, and a feeding trough for accommodating the pig food flowing out of the conduit is provided at the bottom end of the conduit; and an identification device for performing pig face identification sensing on the pig to be fed is also provided on the conduit; The recognition device includes an infrared camera, an image processor and a display; wherein, The infrared camera is used to collect the pig face image of the pig to be fed; the image processor is used to recognize the collected pig face image using a preset processing algorithm, display the recognition result through the display, and determine the current pig's food intake and feeding frequency according to the recognition result, and judge whether the current pig needs to eat; The preset processing algorithm includes a pig face detection algorithm and a pig face recognition model; wherein, The pig face detection algorithm is used to perform grayscale processing, pig face detection, edge cropping, rotation correction and resizing on the pig face image collected by the infrared camera and extract multiple facial feature points; The pig face recognition model is used to encode the corresponding pig face image into a feature vector of preset dimension according to the extracted facial feature points, and respectively calculate the complexity invariant distance between the feature vector and all image vectors in a preset database, and take the image whose calculated complexity invariant distance exceeds a preset threshold and has the smallest complexity invariant distance value with the feature vector as the recognition result, and display the pig number corresponding to the recognition result and its preset related information through the display; The facial feature points include eyes, nose and mouth; After respectively calculating the complexity invariant distances between the feature vector and all image vectors in the preset database, the pig face recognition model is further used to: Using the calculated image vector whose complexity invariant distance exceeds a preset threshold to overwrite the original image vector in the preset database, so as to achieve self-update of the preset database; The pig face recognition model is built based on a convolutional neural network, and includes an input layer, a first sampling module, a second sampling module, a first fully connected layer, a second fully connected layer and an output layer; the input of the input layer is a pig face image processed by the pig face detection algorithm, the input layer is sampled by a convolutional layer, the input layer is followed by a first sampling module and a second sampling module, the first sampling module and the second sampling module both include two convolutional layers and a pooling layer, the second sampling module is followed by a first fully connected layer, a second fully connected layer and an output layer; the pig face recognition model uniformly adopts ReLU as an activation function.

2. An automatic feeding system based on pig face recognition technology, characterized in that: It comprises a plurality of automatic feeders as claimed in claim 1, each of the automatic feeders corresponding to a feeding channel; one end of the feeding channel is provided with a walk-in door for the pigs to be fed to walk into the feeding channel, and the other end is provided with an exit door for the pigs in the feeding channel to walk out of the feeding channel; When a pig walks to the walk-in door, if there is no pig eating in the feeding passage and the walk-out door is in a closed state, the automatic feeder controls the walk-in door to open; after the current pig enters the feeding passage, the automatic feeder controls the walk-in door to close; When the identification device determines that the current pig needs to eat, the valve is controlled to open, so that the pig food in the food storage bucket flows into the trough through the conduit for the current pig to eat; when the pig in the feeding channel has finished eating or the identification device determines that the current pig does not need to eat, the exit door is controlled to open to drive the pig out of the feeding channel, and the exit door is closed after the current pig walks out of the feeding channel.

3. The automatic feeding system based on pig face recognition technology as claimed in claim 2, characterized in that: The automatic feeding system also includes a food storage device, which is connected to each food storage bucket.

4. An automatic feeding method implemented by the automatic feeding system according to claim 3, characterized in that: The automatic feeding method comprises: When a pig walks to the walk-in door, if there is no pig eating in the feeding channel and the walk-out door is closed, the walk-in door is controlled to open; and after the current pig enters the feeding channel, the walk-in door is controlled to close; Acquire a pig face image through an infrared camera, and send the pig face image to an image processor; The image processor performs grayscale processing, pig face detection, edge cropping, rotation correction and resizing on the pig face image collected by the infrared camera through a pig face detection algorithm and extracts a plurality of facial feature points; and performs pig face recognition according to the extracted facial feature points through a pig face recognition model; According to the output result of the pig face recognition model, determine whether the current pig needs to be fed; If the current pig needs to eat, the valve is controlled to open so that the pig food in the food storage bucket flows into the trough; when the pig has finished eating or it is determined that the current pig does not need to eat, the exit door is controlled to open to drive the pig out of the feeding passage, and the exit door is closed after the current pig walks out of the feeding passage.

5. The automatic feeding method based on pig face recognition technology as claimed in claim 4, characterized in that: The pig face recognition is performed according to the extracted facial feature points by using the pig face recognition model, including: Encoding the pig face image into a feature vector of a preset dimension according to the extracted facial feature points; respectively calculating the complexity invariant distances between the feature vector and all image vectors in a preset database; The image whose complexity invariant distance exceeds the preset threshold and whose complexity invariant distance value with the feature vector is the smallest is taken as the recognition result, and the image vector whose complexity invariant distance exceeds the preset threshold is used to overwrite the original image vector in the preset database to realize self-update of the preset database.

Citation Information

Patent Citations

  • Automatic sow feeding management system

    CN101861837A

  • Pig face identification system and method

    CN108363990A

  • Breeding pig growth survey system

    CN207443922U

  • Automatic feeder and system based on pig face recognition technology

    CN212344948U