Disclosure of Invention
After the inventor analyzes the pig farm, a breeder usually takes charge of a plurality of piggeries, and the breeder needs to visit the responsible piggeries at least once every day to clean the excrement, so that the efficiency of a manual patrol scheme is low, and the workload of the breeder is large. In the scheme of the timing cleaning, if the cleaning is not timely, the environment of the pigsty is poor, and the ammonia concentration is too high, so that the normal growth of the pigs is influenced. Thus, both of the above-mentioned schemes make it difficult to find uncleaned animal manure inside the pig farm.
The embodiment of the invention aims to solve the technical problem that: how to improve the efficiency of monitoring animal waste in animal houses.
According to a first aspect of some embodiments of the present invention there is provided a method of monitoring animal faeces comprising: inputting the acquired images of the animal colony house into a pre-trained target detection model to detect a target object in the images, wherein the target object is animal excrement; determining the outline of the animal excrement in the image according to the detection result of the target detection model; the area of animal faeces in the animal housing is determined from the animal faeces profile.
In some embodiments, a plurality of acquired images of the same animal house are respectively input into a pre-trained target detection model, wherein the plurality of images are acquired at different times and at the same position; determining the outline of animal excrement in each image according to the detection result of the target detection model; the area of animal faeces in the animal house is determined from the union of the regions within the animal faeces profile in each image.
In some embodiments, the area of animal faeces in the animal house is determined from the number of pixel points in the image that lie in the animal faeces profile.
In some embodiments, the images are acquired by inspection equipment; the inspection equipment is provided with a camera and is used for acquiring images of one or more animal houses.
In some embodiments, the animal stool monitoring method further comprises: periodically sending an image acquisition instruction to the inspection equipment so that the inspection equipment moves according to a preset path and acquires images of one or more animal houses.
In some embodiments, the animal stool monitoring method further comprises: determining the proportion of the area of the animal wastes in the animal housing in the area of the animal housing; and generating a cleaning prompt under the condition that the proportion is greater than a preset value.
In some embodiments, the animal stool monitoring method further comprises: acquiring a sample image of a marked animal house, wherein the sample image comprises animal excrement and the area where the animal excrement is located is marked; inputting the obtained sample image into a target detection model to obtain a detection result determined by the target detection model; determining the outline of animal excrement in the sample image according to the detection result of the target detection model; and training the target detection model according to the animal excrement outline in the sample image and the mark of the sample image.
According to a second aspect of some embodiments of the present invention there is provided an animal manure monitoring device comprising: the target detection module is configured to input the acquired images of the animal barn into a pre-trained target detection model to detect a target object in the images, wherein the target object is animal excrement; a contour determination module configured to determine a contour of animal feces in the image according to a detection result of the target detection model; an area determination module configured to determine an area of animal manure in the animal house from the animal manure contour.
In some embodiments, the animal waste monitoring device is a computing gateway.
According to a third aspect of some embodiments of the present invention there is provided an animal waste inspection apparatus comprising: any one of the foregoing animal waste monitoring devices; and a camera for capturing images of one or more animal houses.
In some embodiments, the animal waste detection apparatus further comprises: and the movable component is used for bearing the animal excrement monitoring device and moving the camera.
In some embodiments, the animal waste monitoring device is further configured to periodically send an image capture indication to the movable member and the camera head so that the movable member moves according to a preset path and the camera head captures images of one or more animal houses.
In some embodiments, the animal waste monitoring device is further configured to instruct the camera to capture an image in response to detecting that the animal waste inspection apparatus has reached a preset position above the animal pen.
According to a fourth aspect of some embodiments of the present invention there is provided an animal waste inspection system comprising: the inspection track is erected above the animal housing; and the animal excrement inspection equipment is an inspection vehicle which runs along an inspection track.
In some embodiments, one or more hall detection points are arranged on the routing inspection track, and each hall detection point corresponds to one animal housing; the animal waste monitoring device in the animal waste inspection equipment responds to the detection of the Hall detection point and indicates a camera in the animal waste inspection equipment to acquire images.
In some embodiments, the animal waste detection system further comprises: and the management platform is configured to acquire the area of the animal waste in the animal housing sent by the animal waste inspection equipment.
According to a fifth aspect of some embodiments of the present invention there is provided an animal manure monitoring device comprising: a memory; and a processor coupled to the memory, the processor configured to perform any of the foregoing animal litter monitoring methods based on instructions stored in the memory.
According to a sixth aspect of some embodiments of the present invention there is provided a computer readable storage medium having a computer program stored thereon, wherein the program when executed by a processor implements any one of the animal waste monitoring methods described above.
Some embodiments of the above invention have the following advantages or benefits: since the image input into the target detection model includes features of a plurality of angles such as color, texture, shape, etc., the animal stool contour can be obtained more accurately. Therefore, the embodiment of the invention can estimate the area of the animal waste more accurately and improve the efficiency of monitoring the animal waste in the animal housing.
Other features of the present invention and advantages thereof will become apparent from the following detailed description of exemplary embodiments thereof, which proceeds with reference to the accompanying drawings.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the invention, its application, or uses. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The relative arrangement of the components and steps, the numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present invention unless specifically stated otherwise.
Meanwhile, it should be understood that the sizes of the respective portions shown in the drawings are not drawn in an actual proportional relationship for the convenience of description.
Techniques, methods, and apparatus known to those of ordinary skill in the relevant art may not be discussed in detail but are intended to be part of the specification where appropriate.
In all examples shown and discussed herein, any particular value should be construed as merely illustrative, and not limiting. Thus, other examples of the exemplary embodiments may have different values.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, further discussion thereof is not required in subsequent figures.
FIG. 1 is a schematic flow diagram of a method of monitoring animal feces according to some embodiments of the present invention. As shown in fig. 1, the animal litter monitoring method of this embodiment includes steps S102 to S106.
In step S102, the acquired images of the animal house are input into a pre-trained target detection model to detect a target object in the images, wherein the target object is animal feces.
One or more animals are kept in the animal housing, where they excrete their faeces. Thus, the images obtained of the animal house also have animal faeces.
The target detection model can be obtained by adopting image training of animal excrement areas marked in advance. The acquisition position and angle of the sample image used for training may be consistent with the acquisition position and angle of the image acquired during monitoring to improve the accuracy of contour determination. The object detection model may be, for example, a neural network model.
In step S104, the contour of the animal stool in the image is determined based on the detection result of the target detection model.
The target detection model can directly mark the animal manure outline in the input image and can also output the coordinates of the pixel where the animal manure outline is located.
In step S106, the area of animal faeces in the animal house is determined from the animal faeces profile.
In some embodiments, the area of animal faeces in the animal house may be determined from the number of pixel points in the image that lie in the animal faeces profile. The area of the animal faeces may also be determined in other ways by the person skilled in the art and will not be described in further detail herein.
The animal waste area can be the pixel area occupied by the animal waste in the image, and can also be the actual area of the animal waste converted according to the ratio of the colony area to the actual colony area in the image. According to the area of the animal waste, the proportion of the animal waste in the animal housing can be further determined so as to judge whether the animal housing needs to be cleaned.
Since the image input into the target detection model includes features of a plurality of angles such as color, texture, shape, etc., the animal stool contour can be obtained more accurately. Therefore, the embodiment of the invention can estimate the area of the animal waste more accurately and improve the efficiency of monitoring the animal waste in the animal housing.
An embodiment of the object detection model training method of the present invention is described below with reference to fig. 2.
FIG. 2 is a flow diagram of a method of training a target detection model according to some embodiments of the invention. As shown in fig. 2, the target detection model training method of this embodiment includes steps S202 to S208.
In step S202, a sample image of a marked animal house is acquired, wherein the sample image includes animal feces and an area where the animal feces is located is marked.
The acquisition position of the sample image can be consistent with the acquisition position of the image in the detection stage, so that the trained model is more suitable for the actual detection process.
In step S204, the acquired sample image is input into the target detection model, and a detection result determined by the target detection model is obtained.
In step S206, the contour of the animal stool in the sample image is determined based on the detection result of the target detection model.
In step S208, a target detection model is trained according to the animal stool contour in the sample image and the label of the sample image.
By the method of the above embodiment, an object detection model for determining the outline of animal feces can be obtained. Therefore, when the animal excrement is detected, the area of the animal excrement can be estimated more accurately.
Because the animals in the animal housing do not remain stationary all the time, some animal wastes may be blocked in the images acquired at a certain moment; in an image of the same viewing angle acquired at another time, the originally occluded stool may be exposed again in the lens. The invention can be combined with images acquired at a plurality of moments to determine the area of the animal waste. An embodiment of the animal stool monitoring method of the present invention is described below with reference to fig. 3A.
Fig. 3A is a schematic flow diagram of a method of monitoring animal waste according to some embodiments of the present invention. As shown in fig. 3A, the animal litter monitoring method of this embodiment includes steps S302 to S308.
In step S302, a plurality of images of the same animal house acquired at different times and at the same location are acquired.
In some embodiments, the plurality of images are acquired at a time interval between two adjacent animal house cleaning actions to improve the accuracy of the area determination.
In step S304, the acquired images of the same animal house are respectively input into a pre-trained object detection model to detect animal feces in each image.
In step S306, the contour of the animal stool in each image is determined based on the detection result of the target detection model.
In step S308, the area of animal faeces in the animal house is determined from the union of the regions within the animal faeces profile in each image.
Fig. 3B and 3C exemplarily show the result of the recognition of the contour of animal faeces in images of the same animal house taken at different moments in time. In fig. 3B, the animal waste includes areas within outlines 31 and 32; in fig. 3C, the animal waste includes areas within outlines 33 and 34. When taking the union of the areas within the animal manure contours of fig. 3B and 3C, the areas within contour 32 and contour 33 are actually coincident, so the manure area of the animal house determined according to fig. 3A and 3B is the area within contours 31, 32 (or 33), 34, as shown in fig. 3D.
By the method of the embodiment, when part of excrement is shielded by animals, images can be acquired for many times at multiple moments, so that excrement areas in the animal housing can be identified more completely, and the efficiency of monitoring the excrement of the animals in the animal housing is improved.
In some embodiments, animal housing and animal feeding processes can be managed according to the area of animal waste. An embodiment of the animal house management method of the present invention is described below with reference to fig. 4.
Fig. 4 is a schematic flow diagram of a method of animal house management according to some embodiments of the invention. As shown in fig. 4, the animal house management method of this embodiment includes steps S402 to S404.
In step S402, the proportion of the area of animal waste in the animal house to the area of the animal house is determined.
In some embodiments, the ratio of the number of pixels in the image that are located in the animal stool outline to the number of pixels in the image that are occupied by the animal pen may be determined as the above ratio.
In step S404, in the case where the ratio is greater than the preset value, a cleaning reminder is generated. Therefore, the breeder can timely clean the animal housing in response to the cleaning reminding, so that the cleaning efficiency of the animal housing and the cleanliness of the animal housing are improved.
In some embodiments, if the images are collected after the breeder has cleaned the animal house, the cleaning effect of the breeder can also be determined by the above-mentioned ratio, so that the workload of the breeder can be objectively evaluated.
In some embodiments, the images are acquired by an inspection device. The inspection equipment is provided with a camera and is used for acquiring images of one or more animal houses. The inspection device may be, for example, an inspection vehicle. The inspection equipment can collect a plurality of images in the moving process, so that the deployment quantity of the fixed cameras in the animal breeding place can be reduced, the deployment cost and the maintenance cost are reduced, and the deployment efficiency is improved.
In some embodiments, an image capture indication may be periodically sent to the inspection device so that the inspection device moves along a preset path and captures images of one or more animal houses.
Fig. 5 is a schematic diagram of the structure of an animal waste inspection device according to some embodiments of the present invention. As shown in fig. 5, the animal waste inspection apparatus 500 of this embodiment includes an animal waste monitoring device 5100, a camera 5200.
The animal waste monitoring device 5100 is configured to input the acquired images of the animal house into a pre-trained target detection model, and obtain animal waste contours in the images determined by the target detection model; the area of animal faeces in the animal housing is determined from the animal faeces profile. Animal waste monitoring device 5100 may be, for example, a computing gateway.
The camera 5200 is used to capture images of one or more animal houses.
In some embodiments, animal waste monitoring device 5100 further includes a moveable component 5300 for carrying animal waste monitoring device 5100 and camera 5200 for movement.
In some embodiments, animal waste monitoring device 5100 is further configured to periodically send an indication of image acquisition to moveable component 5300 and camera 5200. The movable part 5300 moves according to a preset path according to the image acquisition instruction; the camera 5200 captures images of one or more animal houses according to the image capture instructions. For example, the inspection may be performed every half hour. Thus, the efficiency of animal waste monitoring can be improved.
In some embodiments, the animal waste monitoring device 5100 is further configured to instruct the camera 5200 to capture an image in response to detecting that the animal waste inspection apparatus 500 has reached a preset position above the animal pen, such that the image captured by the camera 5200 is an image of the animal pen. The preset position may be calibrated by, for example, providing a sensor or a marker in the shooting position in advance. Therefore, the images of the animal houses can be acquired more accurately and efficiently.
According to needs, animal waste monitoring devices also can set up outside animal waste inspection equipment, and animal waste inspection equipment includes camera, movable part and communication device to animal waste inspection equipment can carry out data interaction through communication device and animal waste monitoring devices, and with carry out image processing and control process outside animal waste inspection equipment.
An embodiment of the animal waste inspection system of the present invention is described below with reference to fig. 6.
Fig. 6 is a schematic structural view of an animal waste inspection system according to some embodiments of the present invention. As shown in fig. 6, the animal waste inspection system of the embodiment includes an inspection rail 610 and an animal waste inspection apparatus, specifically, an inspection vehicle 620.
The inspection rail 610 is mounted above the animal house 640. The inspection vehicle 620 travels along the inspection rail 620.
In some embodiments, the routing inspection rail 620 has one or more hall detection points disposed thereon, each hall detection point corresponding to an animal pen. The animal waste monitoring device in the animal waste inspection device 610 responds to the detection of the hall detection point and indicates the camera in the animal waste inspection device 610 to collect images.
In some embodiments, the animal waste inspection system 60 further includes a management platform 630 configured to obtain the area of animal waste in the animal house transmitted by the inspection vehicle 620. Accordingly, the animal waste inspection apparatus can transmit only the area data to the management platform 630 without transmitting the image, thereby reducing the pressure of the network bandwidth.
In some embodiments, the management platform 630 may determine the proportion of the area of animal waste in the animal house to the area of the animal house; and generating a cleaning prompt under the condition that the proportion is greater than a preset value. The management platform 630 may send the cleaning reminder to the computer client or the mobile terminal client.
Fig. 7 is a schematic top view of an animal litter monitoring scenario in accordance with some embodiments of the invention. As shown in fig. 7, the scene includes a plurality of animal houses 711, 712, 713. An inspection rail 720 is erected above the animal houses 711, 712 and 713, and the inspection vehicle 730 runs on the inspection rail 720. The inspection rail 720 is provided with a plurality of hall detection points 721, 722, 723 which are respectively positioned at the center positions above the animal houses 711, 712, 713. The inspection vehicle 730 may capture images as it travels 711, 712, 713 respectively to obtain images of the animal houses 711, 712, 713 to determine the animal waste areas in the animal houses 711, 712, 713.
An embodiment of the animal faeces monitoring device of the present invention is described below with reference to fig. 8.
Fig. 8 is a schematic view of the structure of an animal litter monitoring device according to the invention. As shown in fig. 8, the animal litter monitoring device 800 of this embodiment includes: the target detection module 8100 is configured to input the acquired images of the animal house into a pre-trained target detection model to detect a target object in the images, wherein the target object is animal manure; a contour determination module 8200 configured to determine a contour of animal stool in the image according to a detection result of the target detection model; an area determination module 8300 configured to determine an area of animal waste in the animal house from the animal waste profile.
In some embodiments, the target detection module 8100 is further configured to input the acquired plurality of images of the same animal house into a pre-trained target detection model, respectively, wherein the plurality of images are acquired at different times and at the same location; the contour determination module 8200 is further configured to determine a contour of animal stool in each image according to a detection result of the target detection model; the area determination module 8300 is further configured to determine an area of animal stool in the animal house from a union of regions within the animal stool contour in each image.
In some embodiments, the area determination module 8300 is further configured to determine the area of animal stool in the animal house based on the number of pixel points in the image that lie in the animal stool outline.
In some embodiments, the images are acquired by inspection equipment; the inspection equipment is provided with a camera and is used for acquiring images of one or more animal houses.
In some embodiments, the animal waste monitoring apparatus 800 further includes an indication module 8400 configured to periodically send an image capture indication to the inspection device so that the inspection device moves along a preset path and captures images of one or more animal houses.
In some embodiments, the animal waste monitoring device 800 further comprises a reminder module 8500 configured to determine a proportion of the area of animal waste in the animal house to the area of the animal house; and generating a cleaning prompt under the condition that the proportion is greater than a preset value.
In some embodiments, the animal waste monitoring device 800 further includes a training module 8600 configured to obtain a sample image of the labeled animal house, wherein the sample image includes animal waste and the area where the animal waste is located is labeled; inputting the obtained sample image into a target detection model to obtain a detection result determined by the target detection model; determining the outline of animal excrement in the sample image according to the detection result of the target detection model; and training the target detection model according to the animal excrement outline in the sample image and the mark of the sample image.
Fig. 9 is a schematic diagram of an animal litter monitoring device according to further embodiments of the invention. As shown in fig. 9, the animal litter monitoring device 90 of this embodiment includes: a memory 910 and a processor 920 coupled to the memory 910, the processor 920 being configured to perform the animal waste monitoring method of any of the preceding embodiments based on instructions stored in the memory 910.
Memory 910 may include, for example, system memory, fixed non-volatile storage media, and the like. The system memory stores, for example, an operating system, an application program, a Boot Loader (Boot Loader), and other programs.
Fig. 10 is a schematic diagram of an animal litter monitoring device according to still further embodiments of the invention. As shown in fig. 10, the animal litter monitoring device 100 of this embodiment includes: the memory 1010 and the processor 1020 may further include an input/output interface 1030, a network interface 1040, a storage interface 1050, and the like. These interfaces 1030, 1040, 1050 and the memory 1010 and the processor 1020 may be connected via a bus 1060, for example. The input/output interface 1030 provides a connection interface for input/output devices such as a display, a mouse, a keyboard, and a touch screen. Network interface 1040 provides a connection interface for various networking devices. The storage interface 1050 provides a connection interface for external storage devices such as an SD card and a usb disk.
Embodiments of the present invention also provide a computer readable storage medium having a computer program stored thereon, wherein the program, when executed by a processor, implements any of the animal waste monitoring methods described above.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable non-transitory storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.