CN116682147B - Identification device for animal diarrhea - Google Patents

Identification device for animal diarrhea Download PDF

Info

Publication number
CN116682147B
CN116682147B CN202310962856.6A CN202310962856A CN116682147B CN 116682147 B CN116682147 B CN 116682147B CN 202310962856 A CN202310962856 A CN 202310962856A CN 116682147 B CN116682147 B CN 116682147B
Authority
CN
China
Prior art keywords
image
animal
diarrhea
fecal
buttock
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202310962856.6A
Other languages
Chinese (zh)
Other versions
CN116682147A (en
Inventor
李斌
纪宝锋
赵宇亮
王海峰
朱君
周孟创
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Intelligent Equipment Technology Research Center of Beijing Academy of Agricultural and Forestry Sciences
Original Assignee
Intelligent Equipment Technology Research Center of Beijing Academy of Agricultural and Forestry Sciences
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Intelligent Equipment Technology Research Center of Beijing Academy of Agricultural and Forestry Sciences filed Critical Intelligent Equipment Technology Research Center of Beijing Academy of Agricultural and Forestry Sciences
Priority to CN202310962856.6A priority Critical patent/CN116682147B/en
Publication of CN116682147A publication Critical patent/CN116682147A/en
Application granted granted Critical
Publication of CN116682147B publication Critical patent/CN116682147B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/56Extraction of image or video features relating to colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/82Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02ATECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
    • Y02A40/00Adaptation technologies in agriculture, forestry, livestock or agroalimentary production
    • Y02A40/70Adaptation technologies in agriculture, forestry, livestock or agroalimentary production in livestock or poultry

Abstract

The invention provides an identification device for animal diarrhea, which relates to the technical field of animal breeding, wherein an image acquisition module detects the excretion state of animals and shoots an aerial excretion image, a ground fecal image and an animal buttock image of the animals; the excretion state identification module identifies an aerial excretion image, judges whether the animal diarrhea exists according to the fecal sewage surface area and the fecal sewage parabola in the aerial excretion image, and obtains a first identification result; the fecal state identification module identifies the ground fecal image, and verifies the first identification result according to the shape and the color of the fecal in the ground fecal image; the buttock fecal adhesion recognition module recognizes an animal buttock image, and determines diarrhea animals according to the fecal adhesion state of the buttocks of the animals in the animal buttock image. The invention realizes the intelligent identification of the animal excretion status, verifies the excrement status and the buttock excrement adhesion status, has higher detection accuracy, saves manpower and labor, and has guiding significance for actual feeding.

Description

Identification device for animal diarrhea
Technical Field
The invention relates to the technical field of animal breeding, in particular to an identification device for animal diarrhea.
Background
In the animal breeding process, animal health is extremely important, and taking cattle breeding as an example, the health of calves is more easily damaged compared with adult calves, so that breeding personnel need to pay more attention to the health of calves.
Calf diarrhea is a common digestive tract disease of calves with dyspepsia and diarrhea as main symptoms. In large-scale breeding, the incidence rate of calf diarrhea is up to 90% -100%, the death rate is up to more than 50%, and the calf diarrhea is one of the most serious diseases endangering calves, and causes huge economic loss for the cattle breeding industry.
In recent years, the animal breeding industry is transformed from a traditional breeding mode to a large-scale, intensive and intelligent mode, and a large amount of energy is required to be consumed by breeding personnel every day to monitor the gastrointestinal health condition of each animal, so that the efficient production of the animal is seriously affected.
Disclosure of Invention
The invention provides an animal diarrhea identification device, which is used for solving the problem that in the prior art, economic loss is caused by untimely discovery of diarrhea of farmed animals, and a large amount of manpower is consumed for daily monitoring of gastrointestinal health of animals.
The invention provides an identification device for animal diarrhea, comprising: the image acquisition module is used for detecting the excretion state of the animal and shooting an aerial excretion image, a ground fecal image and an animal buttock image of the animal; the excretion state identification module is used for identifying an aerial excretion image, judging whether the animal diarrhea is caused according to the fecal sewage surface area and the fecal sewage parabola in the aerial excretion image, and obtaining a first identification result; the fecal state identification module is used for identifying the ground fecal image and verifying the first identification result according to the shape and the color of the fecal in the ground fecal image; and the buttock fecal adhesion recognition module is used for recognizing the animal buttock image and determining diarrhea animals according to the fecal adhesion state of the animal buttocks in the animal buttock image.
According to the animal diarrhea identification device provided by the invention, the image acquisition module judges whether the animal is excreted by using a YOLOv5 algorithm, and when the animal is excreted, an aerial excretion image, a ground faeces image and/or an animal buttock image are shot; the excretion state identification module is used for generating a first instruction when animal diarrhea is determined; the fecal status recognition module is used for recognizing the ground fecal image in response to the first instruction; the fecal state identification module is used for generating a second instruction when the first identification result passes the verification; the buttock fecal adhesion recognition module recognizes an animal buttock image in response to the second instruction.
According to the identification device for animal diarrhea provided by the invention, the excretion status identification module comprises an excretion identification module; the excrement recognition module is used for judging whether excrement is excrement or urine according to the excrement color, and determining that the excrement is excrement when the excrement color meets a preset color threshold value.
According to the animal diarrhea recognition device provided by the invention, the excretion state recognition module further comprises a background separation module, a fecal sewage surface area judgment module and a fecal sewage parabolic judgment module; the defecation identification module is used for generating a third instruction when the excrement is determined to be excrement; the background separation module is used for responding to the third instruction and clipping the aerial drainage image so as to reserve a drainage area in the aerial drainage image; setting a distance threshold range for the cut aerial drainage image by using the depth image to perform background separation to obtain a target image; the target image is an image only comprising fecal sewage in excretion; the fecal sewage surface area judging module is used for determining the fecal sewage surface area according to the number and the depth value of the pixel points occupied by the fecal sewage in the target image; wherein the depth value characterizes a relationship between the target image and the real size; if the fecal sewage surface area is larger than a preset area threshold, judging that the animal diarrhea; the animal diarrhea judgment module is used for judging whether the animal diarrhea is common diarrhea or severe diarrhea according to the animal diarrhea parabola when the animal diarrhea judgment module judges the animal diarrhea.
According to the identification device for animal diarrhea provided by the invention, the fecal sewage parabolic judgment module is used for: converting the target image into a 3D point cloud image; performing curve fitting on a 3D point cloud in the 3D point cloud chart by using a least square method to obtain a fecal sewage parabola, wherein the fecal sewage parabola is expressed as:yxthe ordinate and the abscissa in the 3D point cloud plot, respectively;abcrespectively the curve coefficients of the manure parabolas, wherein the curve coefficients areaCharacterizing the parabolic degree; coefficient of curveaComparing with a preset threshold value, if the curve coefficientaIf the animal diarrhea is smaller than the preset threshold value, determining that the animal is severe diarrhea; if the curve coefficient a is greater than or equal to a preset threshold value, the animal is determined to be ordinary diarrhea.
According to the identification device for animal diarrhea provided by the invention, the fecal status identification module is used for: detecting feces in the ground feces image by using a Faster RCNN algorithm; and when the shape of the excrement is water-like and the color of the excrement is the preset diarrhea color, determining that the first recognition result passes verification.
According to the identification device for animal diarrhea provided by the invention, the buttock fecal adhesion identification module is used for: marking animals with feces adhered to buttocks according to the buttocks image of the animals to obtain marked animals; judging whether the buttock patterns of the marked animals between the front frame and the rear frame of the buttock image of the animals have differences or not by using an interframe difference method; if there is a difference, the animal is marked as diarrhea; if there is no difference, the animals are marked as healthy animals.
According to the identification device for animal diarrhea provided by the invention, the buttock fecal adhesion identification module is used for: carrying out differential calculation on the front and rear animal buttock images, subtracting pixel points corresponding to the images, and judging the absolute value of gray level difference to obtain a differential image, wherein the differential calculation formula is as follows:;/>is a differential image;x’pixel point abscissa values of the animal buttock image;y’the vertical coordinate value of the pixel point of the animal buttock image; />An image of buttocks of an animal in an nth frame; />Is an n-1 frame animal buttock image; the marked animal with gray level difference in the buttock pattern in the differential image is determined as diarrhea animal.
According to the identification device for animal diarrhea provided by the invention, the image acquisition module comprises a first depth camera and a second camera, and the first depth camera is arranged at the outer side of an animal fence; the second camera is arranged on the top of the animal shed; the aerial excretion image is obtained through shooting by a first depth camera; the ground fecal image is obtained by shooting by a second camera; an image of the buttocks of the animal is obtained by photographing with a first depth camera or a second camera.
The invention provides an animal diarrhea identification device, which also comprises a report sending module; the report sending module is used for finishing the first recognition result of the excretion state recognition module, the fecal image recognition result of the fecal state recognition module and the diarrhea animal determined by the buttock fecal adhesion recognition module into an animal diarrhea report, and sending the animal diarrhea report to the user terminal.
The invention provides an animal diarrhea identification device, wherein an image acquisition module is used for shooting an aerial excretion image, a ground fecal image and an animal buttock image of an animal; the excretion state identification module is used for identifying an aerial excretion image, judging whether the animal diarrhea is caused according to the fecal sewage surface area and the fecal sewage parabola in the aerial excretion image, and obtaining a first identification result; the fecal state identification module is used for identifying the ground fecal image and verifying the first identification result according to the shape and the color of the fecal in the ground fecal image; the buttock fecal adhesion recognition module is used for recognizing animal buttock images, and determining diarrhea animals according to the fecal adhesion state of animal buttocks in the animal buttock images. The invention can detect the diarrhea of large-scale animals in time by means of computer vision, is beneficial to reflecting the intestinal health of calves, and reduces the loss caused by adverse effects caused by animal diarrhea; the detection efficiency can be improved, and the labor force is liberated; has important significance for guiding actual production and realizes welfare cultivation.
Drawings
In order to more clearly illustrate the invention or the technical solutions of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are some embodiments of the invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram showing the structure of an embodiment of an animal diarrhea identification apparatus according to the present invention;
FIG. 2 is a schematic diagram of one embodiment of the first depth camera and second camera mounting position of the present invention;
FIG. 3 is a flow chart of the frame-to-frame difference method in the buttock stool adhesion recognition module of the present invention;
FIG. 4 is a schematic view of the structure of another embodiment of the identification device for diarrhea in animals according to the invention;
FIG. 5 is a flow chart of an embodiment of a method for identifying diarrhea in animals according to the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
In order to realize intelligent identification of diarrhea conditions of the cultured animals, the diarrhea animals are found in time and the cultured personnel are informed, the invention provides an animal diarrhea identification device based on a depth camera and a deep learning algorithm. The identification device can intelligently identify diarrhea animals on a large scale, and can reduce the loss of animals caused by diarrhea in economy; in the manual aspect, the detection efficiency can be improved, and the labor force is liberated; in the aspect of cultivation, the method has important significance for guiding actual production, and welfare cultivation is realized.
Referring to fig. 1, fig. 1 is a schematic structural diagram of an embodiment of an apparatus for identifying animal diarrhea according to the present invention, in which the apparatus for identifying animal diarrhea includes: an image acquisition module 110, a voiding status recognition module 120, a fecal status recognition module 130, and a buttock fecal adhesion recognition module 140.
The image acquisition module 110 is used for detecting the excretion state of the animal and shooting an aerial excretion image, a ground fecal image and an animal buttock image of the animal.
The excretion status recognition module 120 is configured to recognize the aerial excretion image, and determine whether the animal diarrhea is detected according to the fecal sewage area and the fecal sewage parabola in the aerial excretion image, so as to obtain a first recognition result.
The stool state recognition module 130 is configured to recognize a ground stool image, and verify the first recognition result according to the shape and color of the stool in the ground stool image.
The buttock stool adhesion recognition module 140 is used for recognizing the buttock image of the animal and determining diarrhea animals according to the stool adhesion state of the buttocks of the animal in the buttock image of the animal.
In some embodiments, the identification device of animal diarrhea further comprises a report sending module; the report sending module is used for finishing the first recognition result of the excretion state recognition module, the fecal image recognition result of the fecal state recognition module and the diarrhea animal determined by the buttock fecal adhesion recognition module into an animal diarrhea report, and sending the animal diarrhea report to the user terminal.
In some embodiments, the image acquisition module includes a first depth camera and a second camera. Referring to fig. 2, fig. 2 is a schematic diagram of an embodiment of the first depth camera and the second camera mounting position according to the present invention. The first depth camera is arranged on the outer side of the animal fence; the second camera is positioned at the roof of the animal.
The aerial excretion image is obtained through shooting by a first depth camera; the ground fecal image is obtained by shooting by a second camera; an image of the buttocks of the animal is obtained by photographing with a first depth camera or a second camera. The second camera may be a depth camera or a normal camera.
Taking calf cultivation in a cattle farm as an example, the calf island technology is an outdoor calf independent fence feeding technology, and consists of a box-type cattle shed and fences, wherein one surface is open, three surfaces are closed, and the calves are placed on a sunward and dry open field outside the shed. The single calf rail feeding is convenient for workers to clean and disinfect calves and living environments thereof, so that the calves are prevented from sucking each other, the living environments of the calves can be improved, the incidence rate of diarrhea and gastroenteritis is reduced, and the survival rate of the calves is improved. The embodiment is diarrhea calf intelligent recognition device based on calf island environment, uses first depth camera to monitor the calf in the calf island from the periphery, uses the second camera at calf island top to detect subaerial calf excrement.
The identification device for animal diarrhea provided by the embodiment can detect the diarrhea of large-scale animals in time by means of computer vision, is favorable for reflecting calf intestinal health, and reduces loss caused by adverse effects caused by animal diarrhea; the detection efficiency can be improved, and the labor force is liberated; has important significance for guiding actual production and realizes welfare cultivation.
In some embodiments, the image acquisition module uses the YOLOv5 algorithm to determine whether the animal is excreting, and when the animal is excreting, captures an aerial excretion image, a ground faecal image, and/or an animal buttock image; the excretion state identification module is used for generating a first instruction when animal diarrhea is determined; the fecal status recognition module is used for recognizing the ground fecal image in response to the first instruction; the fecal state identification module is used for generating a second instruction when the first identification result passes the verification; the buttock fecal adhesion recognition module recognizes an animal buttock image in response to the second instruction.
In some embodiments, the voiding status identification module comprises a voiding identification module; the excrement recognition module is used for judging whether excrement is excrement or urine according to the excrement color, and determining that the excrement is excrement when the excrement color meets a preset color threshold value.
In some embodiments, the drainage state identification module further comprises a background separation module, a fecal sewage surface area judgment module, and a fecal sewage parabolic judgment module; the defecation identification module is used for generating a third instruction when the excrement is determined to be excrement; the background separation module is used for responding to the third instruction and clipping the aerial drainage image so as to reserve a drainage area in the aerial drainage image; setting a distance threshold range for the cut aerial drainage image by using the depth image to perform background separation to obtain a target image; the target image is an image only comprising fecal sewage in excretion; the fecal sewage surface area judging module is used for determining the fecal sewage surface area according to the number and the depth value of the pixel points occupied by the fecal sewage in the target image; wherein the depth value characterizes a relationship between the target image and the real size; if the fecal sewage surface area is larger than a preset area threshold, judging that the animal diarrhea; the animal diarrhea judgment module is used for judging whether the animal diarrhea is common diarrhea or severe diarrhea according to the animal diarrhea parabola when the animal diarrhea judgment module judges the animal diarrhea.
Optionally, the process of acquiring the distance threshold range in background separation includes: first, depth and color images are loaded and the depth image is converted into an array of distance values. The threshold for the segmentation process is obtained by looking up the smallest non-zero value in the array and adding a constant to this value. By creating a binary mask (mask) it is used to indicate which pixels in the depth image belong to the fecal sewage part and which belong to the background part.
The depth value of the depth image can calculate the relation between the image and the real size, so that the actual area occupied by one pixel point in the depth image is obtained, the area of the fecal sewage in the image can be calculated according to the number of the pixel points occupied by the bottom surface of the fecal sewage, and the area threshold is set to preliminarily judge whether the excretion state of the animal is diarrhea.
In some embodiments, the fecal sewage parabolic judgment module is configured to: converting the target image into a 3D point cloud image; performing curve fitting on a 3D point cloud in the 3D point cloud chart by using a least square method to obtain a fecal sewage parabola, wherein the fecal sewage parabola is expressed as:yxthe ordinate and the abscissa in the 3D point cloud plot, respectively;abcrespectively the curve coefficients of the manure parabolas, wherein the curve coefficients areaCharacterizing the parabolic degree; coefficient of curveaComparing with a preset threshold value, if the curve coefficientaIf the animal diarrhea is smaller than the preset threshold value, determining that the animal is severe diarrhea; if the curve coefficient a is greater than or equal to a preset threshold value, the animal is determined to be ordinary diarrhea.
After the animal excretion state detection is finished, the preliminary judgment of diarrhea is finished, and the detection is carried out by using the fecal state identification module for verifying the detection result. Optionally, the fecal status recognition module is configured to: detecting feces in the ground feces image by using a Faster RCNN algorithm; and when the shape of the excrement is water-like and the color of the excrement is the preset diarrhea color, determining that the first recognition result passes verification.
It should be noted that healthy feces are in the form of relatively soft pellets, diarrhea feces are mainly in the form of a feces water sample, and the colors of healthy feces and diarrhea feces are also greatly different. Therefore, the stool state identification module can verify the primarily judged diarrhea result by the shape and the color of the stool.
Because diarrhea and feces become strong in viscosity and are often adhered to the buttocks of animals, after animal diarrhea is detected, feces adhesion detection is carried out on the detected buttocks of diarrhea animals. Specifically, buttock excrement adhesion recognition module is used for: marking animals with feces adhered to buttocks according to the buttocks image of the animals to obtain marked animals; judging whether the buttock patterns of the marked animals between the front frame and the rear frame of the buttock image of the animals have differences or not by using an interframe difference method; if there is a difference, the animal is marked as diarrhea; if there is no difference, the animals are marked as healthy animals.
Referring to fig. 3, fig. 3 is a flow chart of the frame-to-frame difference method in the buttock stool adhesion recognition module of the present invention.
The buttock feces adhesion recognition module performs differential calculation on the buttock images of the front frame and the rear frame of animals, subtracts pixel points corresponding to the images, judges the absolute value of gray level difference, and obtains a differential image, wherein the differential calculation formula is as follows:;/>is a differential image;x’pixel point abscissa values of the animal buttock image;y’the vertical coordinate value of the pixel point of the animal buttock image; />An image of buttocks of an animal in an nth frame; />Is the firstn-1 animal buttock images; the marked animal with gray level difference in the buttock pattern in the differential image is determined as diarrhea animal.
Referring to fig. 4-5, fig. 4 is a schematic structural diagram of another embodiment of the apparatus for identifying animal diarrhea according to the present invention, and fig. 5 is a schematic flow chart of an embodiment of the method for identifying animal diarrhea according to the present invention.
In this embodiment, calf diarrhea recognition in a calf island is taken as an example for explanation, and the recognition device includes an image acquisition module, a excretion status recognition module, a fecal status recognition module, a buttock fecal adhesion recognition module and a report transmission module. The excretion state identification module comprises an excretion identification module, a background separation module, a fecal sewage surface area judgment module and a fecal sewage parabolic judgment module.
As shown in fig. 5, the identification method of calf diarrhea includes: detecting calf drainage conditions; when calf drainage is detected, filtering a background by combining the depth image; further judging whether the excretion is urination, if so, returning to the previous step to continuously detect the calf excretion condition; if the excretion is not urination, calculating the air fecal sewage surface area, and if the fecal sewage surface area is larger than a threshold value, primarily judging that the calf diarrhea; if the surface area of the fecal sewage is not greater than the threshold value, returning to the previous step to continuously detect the calf discharging condition. Further, a curve is fitted to the air feces, whether the parabolic line of the feces is too far or not is judged, and if yes, severe diarrhea is judged. After the calves are primarily judged to be diarrhea, the fecal condition is judged again, whether diarrhea feces is determined, if yes, the adhesion condition of the buttocks of the calves is detected, if adhesion is carried out, the calves are judged to be diarrhea, and the identification result is reported to the breeding personnel.
In the embodiment, a depth camera is used for detecting the calf discharging state, and whether the calf diarrhea occurs or not is judged according to the calf feces aerial image; then, detecting the ground fecal sewage state by utilizing a camera at the upper part in the calf island and combining a deep learning algorithm, and further judging whether the calf is diarrhea; and finally, detecting whether the buttocks of the calves are adhered before and after discharging by combining an interframe difference method, and combining three detection results to obtain a calf diarrhea detection result.
Because diarrhea calf excrement is more dilute, the excretion process is similar to liquid, and healthy calf excrement is in a lump in the excretion process, so that whether the calf diarrhea is primarily judged according to the excrement condition in calf excretion. The present embodiment detects a calf drainage state in a calf island using a first depth camera. Firstly, a depth camera is used for monitoring calves in a calf island from the periphery, and a YOLOv5 algorithm is combined to judge whether the calves are excreted. In order to distinguish calf urination and defecation, a color threshold is set for identification. The calf urine color is usually colorless and biased to yellow, while the feces are deeper at night, mostly earthy yellow. In the HSV color space, the range of the yellow color component Hue is shown in the following formula (1). Therefore, the color threshold is set to filter the urination of calves.
(1)
When the excretion behaviors of calves are found, the detected excretion areas are cut, and the cut images are subjected to background separation by setting a distance threshold value by using a depth image. In this embodiment, a binary mask (mask) is created to indicate which pixels in the depth image belong to the fecal sewage portion and which pixels belong to the background portion, and the discrimination formula is shown in (2):
(2)
wherein, the liquid crystal display device comprises a liquid crystal display device,representing the coordinates +.>Pixel value of>Indicating the distance constant after determining the fecal soil distance.
The method uses thresholding and dilation operations to remove background and fill gaps. The color image is then converted to the HSV color space and a mask is applied to the HSV image to remove the background.
After the background segmentation is completed, an image with only fecal sewage in excretion is obtained, and calf diarrhea can be judged according to the fecal sewage area in the calf excretion process image. According to the number of the pixel points occupied by the bottom surface of the excrement, the excrement area in the image can be calculated, and the area threshold value is set to preliminarily judge whether the calf discharging state is diarrhea.
In order to further judge the specific calf excretion condition, the fecal sewage image in excretion is converted into a 3D point cloud image, and the conversion formula is shown as the following formula (3).
(3)
In the middle of,/>Focal lengths of the lens in the horizontal direction and the vertical direction, respectively, < >>,/>The horizontal coordinate value and the vertical coordinate value of the optical center (projection of the lens center point on the imaging plane) under the image coordinate system (origin is located at the upper left corner of the image), respectively, < >>,/>,/>For the point cloud coordinates, ++>,/>For the pixel coordinates of the image points, < >>For image points->Is a depth of (c).
After the fecal 3D point cloud image is obtained, curve fitting is carried out on the 3D point cloud by using a least square method, and a curve similar to a parabola can be obtained. The specific method is that for all points (x [ i ], y [ i ], z [ i ]) in the point cloud, a 3×3 symmetric matrix A is calculated:
simultaneously calculating vectors containing three elementsb
The equation ax=b is then solved, and the three components of the solution vector are the coefficients of the least squares fit curve { a, b, c }. The parabolic equation obtained is shown in formula (4):
(4)
in the middle ofaThe degree of the parabola may be expressed,athe smaller the value of (2) the farther the parabola is, the more severe the diarrhea is, thus according to the fit of the parabola equationaIf the value of (2) is compared with the set threshold value thetaaIf the value of (2) is smaller than the threshold value theta, the calf is judged to be severely diarrhea.
After the calf drainage state detection is finished, preliminary judgment on diarrhea is finished, and for verifying the detection result, the calf feces on the ground are detected by using a calf island top camera. The healthy calf manure is in the form of a relatively soft mass, usually yellow or earthy yellow in colour. The calf diarrhea feces have the main appearance form of a feces water sample, are thinner, and have the colors of yellowish green, lemon and off-white.
Based on this, the calf diarrhea stool was detected using the fast RCNN algorithm. When the calf discharging state is detected to be in a diarrhea state and the ground excrement is detected to be diarrhea excrement, the calf can be considered to be diarrhea calf.
Because diarrhea calf excrement viscosity becomes strong, often the adhesion is at calf buttock, consequently detects the calf diarrhea after, carries out excrement adhesion detection to the diarrhea calf buttock that detects. In order to avoid the condition that patterns exist on the buttocks of calves to influence the identification of the feces adhesion, an inter-frame difference method is used for checking whether the detected front frames and the detected rear frames marked as the feces adhesion buttocks have differences or not.
The inter-frame difference method is to perform differential calculation on two frames of images, subtract pixel points corresponding to the images, judge the absolute value of gray level difference, and obtain a differential image, wherein the calculation formula of the inter-frame difference method is shown as (5):
(5)
in the middle ofIs a differential image; />Is the abscissa value of the image pixel point; />Is the ordinate value of the pixel point of the image;is the nth frame image; />Is the n-1 frame image.
If the gray level difference exists in the calf buttocks in the differential image, judging that diarrhea and feces are adhered, otherwise, judging that patterns are formed; if the calf buttocks marked as diarrhea are judged to be diarrhea and fecal adhesion through an interframe difference method, the diarrhea information of the target calf is reported to breeding staff.
Above, the intelligent identification device for the diarrhea calves, provided by the embodiment, realizes the identification of the calf discharging condition and the calf excrement condition, reflects the calf intestinal health condition, and has guiding significance for actual feeding; the diarrhea calves are identified by combining a depth camera and a deep learning algorithm with the calf discharging condition, and the diarrhea calves are verified by utilizing the calf manure and the manure adhesion condition of the calf buttocks, so that the detection accuracy is high; the intelligent identification of the large-scale diarrhea calves can be finished without manual operation of farm breeders, so that the detection efficiency is improved, and the labor force is liberated; provides an identification scheme for the calf diarrhea detection system of the intelligent cattle farm.
In the description of the present specification, a description referring to terms "one embodiment," "some embodiments," "examples," "specific examples," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the embodiments of the present invention. In this specification, schematic representations of the above terms are not necessarily directed to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, the different embodiments or examples described in this specification and the features of the different embodiments or examples may be combined and combined by those skilled in the art without contradiction.
The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course may be implemented by means of hardware. Based on this understanding, the foregoing technical solution may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the respective embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (5)

1. An identification device for diarrhea in an animal, comprising:
the image acquisition module is used for detecting the excretion state of the animal and shooting an aerial excretion image, a ground fecal image and an animal buttock image of the animal;
the excretion state identification module is used for identifying the aerial excretion image, judging whether the animal diarrhea is caused according to the fecal sewage surface area and the fecal sewage parabola in the aerial excretion image, and obtaining a first identification result;
the fecal state identification module is used for identifying the ground fecal image and verifying the first identification result according to the shape and the color of the fecal in the ground fecal image;
the buttock fecal adhesion recognition module is used for recognizing the animal buttock image and determining diarrhea animals according to the fecal adhesion state of the animal buttocks in the animal buttock image;
the excretion state identification module comprises an excretion identification module, a background separation module, a fecal sewage surface area judgment module and a fecal sewage parabolic judgment module;
the excrement recognition module is used for judging whether excrement is excrement or urine according to the excrement color, and determining that the excrement is excrement when the excrement color meets a preset color threshold value;
the defecation identification module is used for generating a third instruction when the excrement is determined to be excrement;
the background separation module cuts the aerial drainage image in response to the third instruction to preserve drainage areas in the aerial drainage image; setting a distance threshold range for the cut aerial drainage image by using the depth image to perform background separation to obtain a target image; the target image is an image only comprising fecal sewage in excretion;
the fecal sewage surface area judging module is used for determining the fecal sewage surface area according to the number and the depth value of the pixel points occupied by the fecal sewage in the target image; wherein the depth value characterizes a relationship between the target image and the real size; if the fecal sewage surface area is larger than a preset area threshold, judging that the animal diarrhea;
the animal diarrhea judgment module is used for judging whether the animal diarrhea is common diarrhea or severe diarrhea according to the animal diarrhea parabola when the animal diarrhea is judged by the animal diarrhea surface area judgment module;
the fecal sewage parabolic judgment module is used for:
converting the target image into a 3D point cloud image;
performing curve fitting on the 3D point cloud in the 3D point cloud image by using a least square method to obtain the fecal sewage parabola, wherein the fecal sewage parabola is expressed as:
yxrespectively the ordinate and the abscissa in the 3D point cloud;abcRespectively the curve coefficients of the manure parabolas, wherein the curve coefficients areaCharacterizing the parabolic degree;
coefficient of curveaComparing with a preset threshold value, if the curve coefficientaIf the animal diarrhea is smaller than the preset threshold value, determining that the animal is severe diarrhea; if the curve coefficient a is greater than or equal to the preset threshold value, determining that the animal is common diarrhea;
the buttock fecal adhesion recognition module is used for: marking animals with feces adhered to buttocks according to the buttocks image of the animals to obtain marked animals; judging whether the buttock patterns of the marked animals are different between the front frame and the rear frame of the buttock image of the animals by using an interframe difference method; if there is a difference, the animal is marked as diarrhea; if there is no difference, marking as a healthy animal;
the buttock fecal adhesion recognition module is used for:
carrying out differential calculation on the front and rear animal buttock images, subtracting pixel points corresponding to the images, and judging the absolute value of gray level difference to obtain a differential image, wherein the differential calculation formula is as follows:
is a differential image; />Pixel point abscissa values of the animal buttock image;y'the vertical coordinate value of the pixel point of the animal buttock image; />An image of buttocks of an animal in an nth frame; />Is an n-1 frame animal buttock image;
and determining the marked animal with gray level difference of the buttock pattern in the differential image as the diarrhea animal.
2. The device for identifying diarrhea in animals according to claim 1, wherein,
the image acquisition module judges whether an animal excretes or not by using a YOLOv5 algorithm, and when the animal excretes, the aerial excretion image, the ground faeces image and/or the animal buttock image are shot;
the excretion status identification module is configured to generate a first instruction upon determining that the animal is diarrhea; the fecal status recognition module is used for recognizing the ground fecal image in response to the first instruction;
the fecal state identification module is used for generating a second instruction when the first identification result passes the verification; the buttock fecal adhesion recognition module recognizes the animal buttock image in response to the second instruction.
3. The apparatus for identifying diarrhea in animals according to claim 1, wherein said fecal status identification module is configured to:
detecting feces in the ground feces image by using a Faster RCNN algorithm;
and when the shape of the excrement is water-like and the color of the excrement is a preset diarrhea color, determining that the first identification result passes verification.
4. A device for identifying diarrhea in an animal as in any one of claims 1-3 wherein the image acquisition module comprises a first depth camera and a second camera, the first depth camera positioned outside of the animal enclosure; the second camera is arranged on the top of the animal shed;
the aerial drainage image is obtained through shooting by the first depth camera; the ground faeces image is obtained through shooting by the second camera; the animal buttock image is obtained by shooting through the first depth camera or the second camera.
5. An animal diarrhea identification device as claimed in any one of claims 1 to 3 further comprising a report transmission module;
the report sending module is used for finishing the first recognition result of the excretion state recognition module, the fecal image recognition result of the excretion state recognition module and the diarrhea animal determined by the buttock fecal adhesion recognition module into an animal diarrhea report, and sending the animal diarrhea report to a user terminal.
CN202310962856.6A 2023-08-02 2023-08-02 Identification device for animal diarrhea Active CN116682147B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310962856.6A CN116682147B (en) 2023-08-02 2023-08-02 Identification device for animal diarrhea

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310962856.6A CN116682147B (en) 2023-08-02 2023-08-02 Identification device for animal diarrhea

Publications (2)

Publication Number Publication Date
CN116682147A CN116682147A (en) 2023-09-01
CN116682147B true CN116682147B (en) 2023-10-31

Family

ID=87782230

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310962856.6A Active CN116682147B (en) 2023-08-02 2023-08-02 Identification device for animal diarrhea

Country Status (1)

Country Link
CN (1) CN116682147B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111183917A (en) * 2019-11-14 2020-05-22 北京海益同展信息科技有限公司 Animal abnormity monitoring and image processing method and device
CN112544491A (en) * 2020-12-11 2021-03-26 北京享云智汇科技有限公司 Method and system for identifying diarrhea of captive animals
KR20210106773A (en) * 2020-02-21 2021-08-31 엘지전자 주식회사 Defecation device, server and system including the same
CN113329622A (en) * 2018-11-30 2021-08-31 惠托斯饲料添加剂股份有限公司 System for analyzing animal waste images
CN114092378A (en) * 2020-08-04 2022-02-25 中移(成都)信息通信科技有限公司 Animal health detection method, device, equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113329622A (en) * 2018-11-30 2021-08-31 惠托斯饲料添加剂股份有限公司 System for analyzing animal waste images
CN111183917A (en) * 2019-11-14 2020-05-22 北京海益同展信息科技有限公司 Animal abnormity monitoring and image processing method and device
KR20210106773A (en) * 2020-02-21 2021-08-31 엘지전자 주식회사 Defecation device, server and system including the same
CN114092378A (en) * 2020-08-04 2022-02-25 中移(成都)信息通信科技有限公司 Animal health detection method, device, equipment and storage medium
CN112544491A (en) * 2020-12-11 2021-03-26 北京享云智汇科技有限公司 Method and system for identifying diarrhea of captive animals

Also Published As

Publication number Publication date
CN116682147A (en) 2023-09-01

Similar Documents

Publication Publication Date Title
CN108830144B (en) Lactating sow posture identification method based on improved Faster-R-CNN
Chen et al. Detection of aggressive behaviours in pigs using a RealSence depth sensor
CN109766856B (en) Method for recognizing postures of lactating sows through double-current RGB-D Faster R-CNN
Wu et al. Using a CNN-LSTM for basic behaviors detection of a single dairy cow in a complex environment
Zion et al. In-vivo fish sorting by computer vision
WO2007107987A2 (en) A method and a system for measuring an animal&#39;s height
CN111178197A (en) Mass R-CNN and Soft-NMS fusion based group-fed adherent pig example segmentation method
CN108491807B (en) Real-time monitoring method and system for oestrus of dairy cows
Xu et al. Automatic scoring of postures in grouped pigs using depth image and CNN-SVM
CN107578408B (en) A kind of simulated measurement apparatus and method of milk cattle cultivating Ground urine area
CN112544491A (en) Method and system for identifying diarrhea of captive animals
CN111767794A (en) Cage-rearing poultry abnormal behavior detection method and detection system based on machine vision
CN104994347A (en) Intelligent security video monitoring system and detection processing method thereof
CN114092378A (en) Animal health detection method, device, equipment and storage medium
Wang et al. Towards re-identification for long-term tracking of group housed pigs
CN116682147B (en) Identification device for animal diarrhea
CN114898405B (en) Portable broiler chicken anomaly monitoring system based on edge calculation
Yang et al. A defencing algorithm based on deep learning improves the detection accuracy of caged chickens
CN111680587A (en) Multi-target tracking-based chicken flock activity real-time estimation method and system
CN113180640B (en) Size measuring method and system for livestock breeding
CN113920138A (en) Cow body size detection device based on RGB-D camera and detection method thereof
CN110532854B (en) Live pig crawling and crossing behavior detection method and system
CN111814698A (en) Method for detecting calf-protecting behavior of cows in pasturing area based on artificial intelligence and aerial images
Deng et al. Detection of behavior and posture of sheep based on YOLOv3.
CN111931766B (en) Artificial intelligence and BIM-based self-water-storage multi-view processing method for cattle drinking water tank

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant