Real-time monitoring method and device for abnormal sick chickens based on cage rearing mode
Through the image collection unit and abnormal feces recognition model, real -time monitoring and positioning the health state of cage and chicken to raise chicken, solve the problems of inconsistent chicken manure monitoring and inaccurate positioning in existing technology, and realize the intelligentization of the breeding industry. develop.
Patent Information
- Application Number
- CN202411398465.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-09
- Publication Date
- 2025-01-21
AI Technical Summary
The existing technology is difficult to monitor the health status of cage chickens in real time through chicken manure, and it is difficult to accurately locate the location of abnormally diseased chickens, affecting the intelligent development of the breeding industry.
The chicken manure images are collected in real time through the pre-built image acquisition unit, and the pre-trained abnormal feces recognition and classification model is used to identify the disease categories and classify the disease levels. The conveyor belt speed is calculated to locate the displacement of abnormal chicken manure, and the source cage of abnormal chicken manure is determined based on the cage length and total number.
The real -time monitoring and abnormal level of the healthy state of cage chicken is realized, the position of the diseased chicken is accurately positioned, and the intelligent development of the poultry breeding industry is promoted.
Smart Images

Figure CN119339326A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of breeding, and in particular to a real-time monitoring method and device for abnormal sick chickens in a cage breeding mode. Background Art
[0002] Disease monitoring of caged chickens is an important part of modern poultry and livestock management. By regularly monitoring the health status and disease occurrence of chickens, potential epidemic risks can be discovered in time, corresponding preventive measures can be taken, the spread of diseases can be effectively controlled, and the stable development of the breeding industry can be guaranteed. This will not only help improve breeding efficiency and reduce breeding costs, but also effectively reduce the impact of epidemics on the health and growth of chickens, and improve the economic benefits of the breeding industry. At the same time, poultry products produced by healthy chickens are safer and more hygienic, which is conducive to ensuring food safety and consumer health. Through scientific disease monitoring and management, the management level of farms can be improved, and the breeding industry can be promoted to develop in the direction of scale, intelligence and sustainable development, laying a solid foundation for the healthy development of the entire breeding industry chain. Therefore, monitoring abnormal chicken manure is an important means of monitoring chicken diseases, which is an urgent problem to be solved. Summary of the invention
[0003] The purpose of the present invention is to provide a real-time monitoring method and device for abnormal sick chickens in a cage-raising mode to solve the deficiencies in the prior art. The method can intelligently monitor the health status of caged chickens in real time through chicken manure and classify the degree of abnormality, and locate the location of sick chickens more accurately and simply, which is of great significance for promoting the intelligent development of the poultry farming industry.
[0004] One embodiment of the present application provides a real-time monitoring method for abnormal sick chickens in a cage-raising mode, the method comprising:
[0005] The pre-built image acquisition unit is used to collect images of chicken manure on the caged chicken manure conveyor belt in real time;
[0006] Using a pre-trained abnormal feces recognition and classification model, the chicken feces image is identified to obtain a chicken feces disease category;
[0007] Classifying the chicken manure image into disease grades;
[0008] Calculating the conveyor belt speed of the chicken manure conveyor belt, and when abnormal chicken manure is identified, calculating the displacement of the abnormal chicken manure according to the synchronous start time of the image acquisition unit and the chicken manure conveyor belt, the time of identifying the abnormal chicken manure, and the conveyor belt speed;
[0009] According to the length of the cages of caged chickens, the total number of cages and the displacement, the source cage position of the abnormal chicken feces is determined to achieve real-time monitoring of abnormal sick chickens.
[0010] Optionally, the image acquisition unit includes:
[0011] A chicken manure conveyor belt placed directly below the chicken cage;
[0012] An industrial camera for collecting chicken manure images;
[0013] Square steel pipes. A conveyor belt movement track is set at the center of the frame of the square steel pipes, and the conveyor belt movement track is used to fix the industrial camera;
[0014] A servo motor for driving the conveyor belt;
[0015] A Raspberry Pi development board for controlling the operation and synchronization of the image acquisition unit.
[0016] Optionally, the abnormal manure recognition and classification model is trained based on the yolov8 network introducing CIoU.
[0017] Optionally, the chicken manure disease categories include: normal chicken manure, synovial mycoplasma disease manure, chicken coccidiosis manure, pullorum disease manure, infectious bursal disease manure, Newcastle disease manure.
[0018] Optionally, the grading of the chicken manure disease for the chicken manure image includes:
[0019] Analyze the color and shape of the chicken manure image according to the color and shape of the chicken manure diseases of different categories;
[0020] According to the analysis results of the chicken manure color and shape, divide the chicken manure into different disease grades, where the disease grades include: normal, slightly abnormal, and severely abnormal.
[0021] Optionally, calculating the displacement of the abnormal chicken manure according to the synchronous start time of the image acquisition unit and the chicken manure conveyor belt, the time when the abnormal chicken manure is recognized, and the conveyor belt rotation speed includes:
[0022]
[0023] Among them, T0 is the start time, T a is the time when the abnormal chicken manure is recognized, and v is the conveyor belt rotation speed.
[0024] Optionally, determining the source cage position of the abnormal chicken manure according to the chicken cage length, the total number of chicken cages of the cage-raised chickens, and the displacement includes:
[0025] When L < Nl, determine that the source cage position of the abnormal chicken manure is:
[0026]
[0027] Wherein, i is the source cage position N of abnormal chicken manure i , i is an integer, l is the length of the chicken cage, and N is the total number of chicken cages;
[0028] When L>Nl, the source cage of abnormal chicken manure is determined as:
[0029]
[0030] When L=Nl, the source cage of the abnormal chicken manure is determined as: i=1, which is determined to be from the first cage.
[0031] Another embodiment of the present application provides a real-time monitoring device for abnormal sick chickens in a cage-raising mode, the device comprising:
[0032] An acquisition module, used to acquire images of chicken manure on a caged chicken manure conveyor belt in real time through a pre-built image acquisition unit;
[0033] A recognition module, used to use a pre-trained abnormal feces recognition and classification model to recognize the chicken feces image and obtain the chicken feces disease category;
[0034] A classification module, used for classifying the chicken manure image into disease grades;
[0035] a calculation module, used for calculating the conveyor belt speed of the chicken manure conveyor belt, and when abnormal chicken manure is identified, calculating the displacement of the abnormal chicken manure according to the synchronous start time of the image acquisition unit and the chicken manure conveyor belt, the time of identifying the abnormal chicken manure, and the conveyor belt speed;
[0036] The determination module is used to determine the source cage position of abnormal chicken feces according to the length of the cages of caged chickens, the total number of cages and the displacement, so as to realize real-time monitoring of abnormal sick chickens.
[0037] Yet another embodiment of the present application provides a storage medium, wherein the storage medium stores a computer program, wherein the computer program is configured to execute any of the above methods when running.
[0038] Yet another embodiment of the present application provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute any of the methods described above.
[0039] Compared with the prior art, the present invention provides a real-time monitoring method for abnormal diseased chickens in a caged mode. The method uses an image acquisition unit to collect chicken manure images on a chicken manure conveyor belt of caged chickens in real time; uses an abnormal manure recognition and classification model to identify the chicken manure images to obtain the chicken manure disease category; classifies the chicken manure images into disease levels; calculates the conveyor belt speed of the chicken manure conveyor belt, and when abnormal chicken manure is identified, calculates the displacement of the abnormal chicken manure according to the synchronous start time of the image acquisition unit and the chicken manure conveyor belt, the time of identifying the abnormal chicken manure, and the conveyor belt speed; determines the source cage position of the abnormal chicken manure according to the length of the chicken cage, the total number of chicken cages and the displacement, so that the health status of caged chickens can be monitored in real time through the chicken manure intelligence and the abnormal degree can be classified, and the location of the sick chicken can be located more accurately and simply, which is of great significance for promoting the intelligent development of the poultry farming industry. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 A hardware structure block diagram of a computer terminal for a real-time monitoring method of abnormal sick chickens in a cage-raising mode provided by an embodiment of the present invention;
[0041] Figure 2 A schematic flow chart of a method for real-time monitoring of abnormal diseased chickens in a cage-raising mode provided by an embodiment of the present invention;
[0042] Figure 3 A three-dimensional diagram of an image acquisition unit provided by an embodiment of the present invention;
[0043] Figure 4 A schematic structural diagram of a real-time monitoring device for abnormal sick chickens in a cage-raising mode provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0044] The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, but should not be construed as limiting the present invention.
[0045] The technology for real-time monitoring of the health status of caged chickens through abnormal chicken manure is not mature enough. Relying solely on algorithms for detection, identification and positioning will increase the inaccuracy of the results. It is impossible to judge the severity of the chicken's disease and thus there are no targeted solutions, which cannot provide more accurate and effective support for the development of the poultry farming industry.
[0046] The present invention mainly solves the following problems:
[0047] 1. Designed a real-time monitoring system for abnormal sick chickens in caged mode, using a conveyor belt device and Raspberry Pi to more accurately locate the position of the sick chicken cage;
[0048] 2. Based on the existing research, the classification and grading of chicken diseases are added at the same time. The yolo-based neural network can classify chicken manure and further grade it according to the characteristics of the species;
[0049] 3. In the classification of chicken disease levels, an algorithm for the proportion of disease characteristics in the total feces volume and an algorithm for the area of abnormal feces appearing per unit time are introduced at the same time.
[0050] The embodiment of the present invention first provides a real-time monitoring method for abnormal sick chickens in a cage-raising mode. The method can be applied to electronic devices, such as computer terminals, specifically ordinary computers, etc.
[0051] The following describes it in detail by taking running on a computer terminal as an example. Figure 1 The hardware structure block diagram of a computer terminal for a real-time monitoring method of abnormal sick chickens in cage mode provided by an embodiment of the present invention. Figure 1 As shown, the computer terminal may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data. Optionally, the computer terminal may also include a transmission device 106 for communication functions and an input and output device 108. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above-mentioned computer terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.
[0052] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / modules corresponding to the real-time monitoring method for abnormal sick chickens in caged mode in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the computer terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0053] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of a computer terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0054] See also Figure 2-Figure 3 The embodiment of the present invention provides a real-time monitoring method for abnormal diseased chickens in a cage-raising mode, and the method may include the following steps:
[0055] S201, collecting chicken manure images on a caged chicken manure conveyor belt in real time through a pre-built image acquisition unit;
[0056] Specifically, the image acquisition unit may include:
[0057] A chicken manure conveyor belt, which is placed directly below the chicken cage and is used to convey the manure dropped by the chickens in the cage;
[0058] Industrial cameras for collecting images of chicken manure;
[0059] A square steel pipe, wherein a conveyor belt motion track is arranged at the center of the frame of the square steel pipe, and the conveyor belt motion track is used to fix the industrial camera;
[0060] A servo motor that drives the conveyor belt and can use its own encoder feedback feature to subsequently determine the displacement of abnormal feces;
[0061] The Raspberry Pi development board is used to control the operation and synchronization of the image acquisition unit and to process image information and position information as a main controller.
[0062] The square steel pipe frame is fixedly mounted at the end of the conveyor belt moving track where the manure removal belt exits. The conveyor belt moving track is set in the center of the square steel pipe frame. The industrial camera is set above the end of the chicken manure conveyor belt and fixed at the center position above the square steel pipe frame. Figure 3 As shown, 1 represents a chicken cage, 2 represents a conveyor belt, 3 represents an industrial camera, 4 represents a Toda servo motor, 5 represents a driving wheel, 6 represents a driven wheel, and 7 represents a square steel pipe.
[0063] Furthermore, if the camera's field of view is α and the conveyor belt width is d, the height setting h of the square steel pipe is determined based on these two parameters, according to the formula:
[0064] h=d / [2tan(α / 2)]
[0065] It can be ensured that the range covered by the camera is slightly larger than the width of the conveyor belt. Auxiliary light sources are provided on both sides of the square steel pipe frame, and the auxiliary light sources are used to provide lighting to facilitate the industrial camera to take pictures of chicken manure.
[0066] S202, using a pre-trained abnormal feces recognition and classification model to identify the chicken feces image and obtain a chicken feces disease category;
[0067] Specifically, the abnormal feces recognition and classification model can be obtained based on the training of the yolov8 network with CIoU introduced. By inputting the chicken manure image into the recognition and classification model, the disease category of the chicken manure can be output.
[0068] During the training process, we can collect images of chicken manure on the conveyor belt, and invite professional veterinarians and breeders to classify and annotate the collected chicken manure images. The main categories include: normal chicken manure, Mycoplasma synoviae feces, coccidiosis feces, pullorum feces, infectious bursal disease feces, Newcastle disease feces, and the disease type is determined according to the abnormal shape and color of the chicken manure. We use the image standard software Labelimg to annotate the data and generate xml tags at the same time. We use Python scripts to convert the xml tags into txt tags and divide the data set into training set, validation set and test set, with a ratio of 8:1:1.
[0069] Build the yolov8 system environment, adjust the parameters in the relevant files, compile the network code, and load the pre-trained model; load the data set for iterative training; when the loss converges to the preset value or the number of iterations reaches the maximum, stop training and obtain the trained abnormal feces recognition and classification model.
[0070] Furthermore, yolov8 introduced CIoU, which adds consideration of aspect ratio on the basis of DIoU, making the predicted box closer to the real box. The calculation formula of CIoU can be expressed as:
[0071]
[0072] R = 1-IoU
[0073] Among them, b is the center point of the prediction box, b gt is the center point of the real box, d is the Euler distance between the two center points, IoU is the intersection over union ratio, α is the weight function, and v is used to measure the consistency of the aspect ratio. The calculation formulas of α and v are as follows:
[0074]
[0075] Among them, w is the width of the prediction box, h is the height of the prediction box, and w gt is the width of the real box, h gt is the height of the real frame.
[0076] Specifically, the categories of chicken manure diseases can include: normal chicken manure, Mycoplasma synoviae disease manure, coccidiosis manure, pullorum manure, infectious bursal disease manure, and Newcastle disease manure. Based on the characteristics of chicken manure, five typical types of chicken diseases are listed as follows:
[0077] (1) Mycoplasma synoviae disease:
[0078] Symptoms: Large amounts of uric acid or green urate deposits can be seen in the excrement of some chickens; Causing factors: seed contamination, vaccine contamination, environmental pollution, etc.
[0079] (2) Chicken coccidiosis:
[0080] Symptoms: dark red or soy sauce-colored feces, sometimes with blood; Causing factors: stocking density, feeding method, temperature and humidity, environmental hygiene, etc.
[0081] (3) Pullorum
[0082] Symptoms: white sticky feces; Causing factors: Salmonella pathogens, hatchery infection, mixed infection of adult chickens and chicks, etc.
[0083] (4) Infectious Bursal Disease of Chickens:
[0084] Symptoms: white watery diarrhea; Causes: highly contagious disease caused by Marek's virus, etc.
[0085] (5) Newcastle disease:
[0086] Symptoms: watery green feces; Causing factors: poor health of the flock, integrity of the respiratory and digestive tract mucosa, stocking density, chicken house environment, feed nutrition, etc.
[0087] S203, classifying the chicken manure image into disease grades;
[0088] Specifically, the chicken manure color and shape analysis can be performed on the chicken manure image according to the color and shape of chicken manure of different categories of chicken manure diseases; and the chicken manure is divided into different disease levels according to the chicken manure color and shape analysis results, wherein the disease levels include: normal, slightly abnormal and seriously abnormal.
[0089] In practical applications, two algorithms can be used for level classification, which will be introduced separately below:
[0090] 1. Calculation of the proportion of disease characteristics in the total feces volume
[0091] (1) Color analysis
[0092] The collected images are preprocessed, including denoising, grayscale and color space conversion. Then, the histogram is calculated. In the HSV color space, the histograms of H (hue), S (saturation) and V (brightness) are calculated respectively, and then the histogram is normalized for easy comparison and analysis. The percentage of color abnormal feature pixels in the disease to the total pixels of abnormal feces can be calculated to quantify it, and a specific percentage threshold is set for comparison. The formula is:
[0093]
[0094] Where P j is the percentage of color abnormal feature pixels in the disease (where j is the abnormal color type in each disease, j can be 1, 2, 3...), S i is the area of abnormal color pixels in abnormal chicken manure, and S is the total area of abnormal chicken manure pixels. The color features of each category can include:
[0095] normal:
[0096] The color is uniform, mainly brown or gray.
[0097] Mycoplasma synoviae Disease:
[0098] Color: green or yellowish or white deposits of large amounts of uric acid;
[0099] Low abnormality: P1 < 20%; P2 < 15%;
[0100] Moderate abnormality: 20% ≤ P1 < 30%; 15% ≤ P2 < 30%;
[0101] High abnormality: P1 ≥ 30%; P2 ≥ 30%
[0102] Chicken coccidiosis:
[0103] Color: dark red or soy sauce color, sometimes with blood streaks;
[0104] Low abnormality: P1 < 20%; P2 < 15%;
[0105] Moderate abnormality: 20% ≤ P1 < 30%; 15% ≤ P2 < 30%;
[0106] High abnormality: P1 ≥ 30%; P2 ≥ 30%
[0107] Pullorum:
[0108] Color: White or off-white viscous; high viscosity.
[0109] Low abnormality: P1 < 20%;
[0110] Moderate abnormality: 20%≤P1<40%;
[0111] High abnormality: P1 ≥ 40%
[0112] Infectious Bursal Disease in Chickens:
[0113] Color: White watery, watery texture.
[0114] Low abnormality: P1 < 10%;
[0115] Moderate abnormality: 10%≤P1<25%;
[0116] High abnormality: P1 ≥ 25%;
[0117] Newcastle disease in chickens:
[0118] Color: Watery green, watery texture.
[0119] Low abnormality: P1 < 20%;
[0120] Moderate abnormality: 20%≤P1<35%;
[0121] High abnormality: P1 ≥ 35%;
[0122] (2) Shape analysis
[0123] Shape Factor (SF) is a quantification of an object. It can be used to determine the complexity, regularity or irregularity of the shape of an object. In the anomaly detection of chicken manure, the calculation of SF can help us determine whether the shape of chicken manure is different from the typical shape of healthy chicken manure. Therefore, the calculation formula of shape factor SF is:
[0124]
[0125] Among them, Perimeter: the length of the chicken manure outline; Area: the average area of chicken manure. When SF = 1, the shape of the chicken manure is circular; when the shape of the object deviates from a circle, the value of the shape factor will be greater than 1.
[0126] Shape features for each category can include:
[0127] Normal: Uniform shape, no obvious deformation.
[0128] Mycoplasma synoviae Disease:
[0129] Shape: Irregular, with heavy deposits.
[0130] Low abnormality: SF <1.2;
[0131] Moderate abnormality: 1.2≤SF<1.5;
[0132] High abnormality: SF ≥ 1.5;
[0133] Chicken coccidiosis:
[0134] Shape: irregular, with blood streaks; thin and long blood streaks detection.
[0135] Low abnormality: SF <1.5;
[0136] Moderately abnormal: 1.5≤SF<2.0;
[0137] High abnormality: SF ≥ 2.0;
[0138] Pullorum:
[0139] Shape: Viscous, piled up into clumps.
[0140] Low abnormality: SF <1.1;
[0141] Moderate abnormality: 1.1≤SF<1.4;
[0142] High abnormality: SF ≥ 1.4;
[0143] Infectious Bursal Disease in Chickens:
[0144] Shape: Watery, highly dispersed.
[0145] Low abnormality: SF <1.3;
[0146] Moderate abnormality: 1.3≤SF<1.7;
[0147] High abnormality: SF ≥ 1.7;
[0148] Newcastle disease in chickens:
[0149] Shape: Water-like, high dispersion.
[0150] Low abnormality: SF <1.4;
[0151] Moderately abnormal: 1.4≤SF<1.8;
[0152] High abnormality: SF ≥ 1.8;
[0153] (3) Abnormal classification
[0154] Combining the color and shape analysis results, chicken manure can be classified into different grades:
[0155] Normal: No abnormal color or shape, all calculated values are below the set threshold;
[0156] Slightly abnormal: color or shape is slightly abnormal, and at least one calculated value is close to the threshold;
[0157] Severe anomalies: The color and shape are obviously abnormal, and multiple calculated values exceed the threshold.
[0158] 2. Calculation of the area of abnormal feces per unit time
[0159] (1), first record the bounding box coordinates and confidence score of each detected abnormal chicken manure. The specific process is to first obtain the real-time video stream through the camera, and then load the saved image for detection. For each frame of video or each image, input it into the target detection model for inference. The model will return the detection results, including the bounding box coordinates of each detected abnormal chicken manure (usually the coordinates of the upper left and lower right corners: x1, y1, x2, y2), the confidence score (confidence), and finally extract the bounding box coordinates and confidence score of each detection result from the output of the model.
[0160] (2) Define the length of the time window as T and accumulate the abnormal stool areas detected within T;
[0161] (3) A series of abnormal chicken manure bounding boxes are detected, and the timestamps are recorded as t1, t2, t3, ..., t n , record the areas corresponding to these bounding boxes, which are area1, area2, ..., area n ;
[0162] (4) Calculate the average area of abnormal feces per unit time T using the formula:
[0163] average_area=(area1+area2+...+area n ) / (t2-t1+t3-t2+...+t n -t (n-1) )
[0164] Among them, average_area represents the average area of abnormal feces in unit time T, (area1+area2+…+area n ) represents the total area of abnormal feces detected within the time window, (t n -t1) indicates the total time length in the time window;
[0165] (5) The severity of the disease is graded according to the area of abnormal stool:
[0166] Slight anomaly: average_area <S1
[0167] Moderate abnormality: S1≤average_area <S2
[0168] Severe exception: average_area ≥ S2
[0169] Among them, S1 and S2 are the set warning thresholds.
[0170] Furthermore, a buzzer and an LED light can be connected through the GPIO port of the Raspberry Pi. When abnormal feces is identified, an alarm is triggered, and the buzzer produces a buzzing sound and the LED light flashes.
[0171] S204, calculating the conveyor belt speed of the chicken manure conveyor belt, and when abnormal chicken manure is identified, calculating the displacement of the abnormal chicken manure according to the synchronous start time of the image acquisition unit and the chicken manure conveyor belt, the time of identifying the abnormal chicken manure, and the conveyor belt speed;
[0172] Specifically, the displacement of abnormal chicken manure can be calculated as:
[0173]
[0174] Wherein, T0 is the start time, T a The moment when abnormal chicken manure is identified, v is the conveyor belt speed.
[0175] In practical applications, marks can be made at the conveyor belt positions just below the two ends of a single chicken cage, and the sequence of the single chicken cages can be recorded as N1, N2, N3, etc. at the beginning of the conveyor belt, and the length of a single chicken cage can be measured and recorded as l;
[0176] Install a servo motor on the chicken manure conveyor belt, set the motor speed to m (r / min), measure the diameter of the conveyor belt drive wheel and record it as D (m), and the diameter of the motor output shaft and record it as d (m). The conveyor belt speed v can be calculated by the formula m = v*60 / (π*D / 1000)*60 / (π*d). Among them, π is 3.14, divided by 1000 to convert the diameter from millimeters to meters.
[0177] Raspberry Pi can realize the simultaneous triggering control of industrial cameras and motors, and record the current startup timestamp T0 at the same time, and use this moment as the benchmark. According to the needs of the monitoring system, set the corresponding detection frequency as f, select the appropriate time window length as Δt, and start from moment T0. The system generates multiple continuous time windows according to the time window length Δt. Every time abnormal chicken manure is detected, the current time is obtained as the timestamp t1, t2, t3, ..., t nRecord it, and the specific calculation process is as follows: First, initialize the counter, n = 1, indicating that this is the timestamp of the first anomaly detection; within each time window length Δt interval, perform detections at the detection frequency f. Each time a detection is made, check if abnormal chicken manure is detected. If abnormal chicken manure is detected, obtain the current system time t n as the timestamp, and record the timestamp t n , increment the counter, and continue with the next detection. Then, encode the timestamps of the detected abnormal time windows t1, t2, t3, ……, t n into a string or other transmissible format, and then send the encoded timestamp string to the encoder through the communication interface. At the encoder end, write a corresponding program to receive these timestamp strings, decode them into the original timestamps, convert them to the corresponding time format, and feedback them to the Raspberry Pi through the same communication interface. Record the last timestamp within the abnormal time window interval as T a , then the displacement of the abnormal chicken manure can be calculated. When abnormal chicken manure is detected each time, the moment T a will be updated once. Therefore, the displacement after each detection of abnormal chicken manure can be deduced from the above formula.
[0178] S205, determine the source cage position of the abnormal chicken manure based on the chicken cage length, total number of chicken cages of the cage - raised chickens, and the said displacement to achieve real - time monitoring of abnormal diseased chickens.
[0179] Specifically, when L < Nl, the source cage position of the abnormal chicken manure is determined as:
[0180]
[0181] where i is the label of the source cage position N of the abnormal chicken manure i of the abnormal chicken manure, i is an integer, l is the chicken cage length, and N is the total number of chicken cages;
[0182] When L > Nl, the source cage position of the abnormal chicken manure is determined as:
[0183]
[0184] When L = Nl, the source cage position of the abnormal chicken manure is determined as: i = 1, determined to come from the first cage position.
[0185] Thus, it can be calculated that the abnormal chicken manure comes from a specific cage position. To reduce errors, considering the feeding regulations of the chicken farm, restart the entire monitoring device every two to three hours, correct the value of the reference time T0 (the timestamp recorded by synchronously triggering the conveyor belt and the industrial camera each time), and refresh the data, and make a comparative analysis with the data on the abnormal degree classification of the previous time.
[0186] In the present invention, image acquisition and motor drive are synchronously triggered, and an alarm function is established while achieving real-time monitoring. When abnormal feces are detected, an alarm is given, and then the abnormal chickens are located by the processing of the controller, which not only improves the accuracy and efficiency of intelligent broiler monitoring in cage mode, but also reduces the workload. In this scheme, the Raspberry Pi development board is used as the main controller, which is responsible for controlling the operation and synchronization of the entire system, and the logic of the alarm function is added to the code for processing image information, and the corresponding program is written to realize the location of abnormal sick chickens. First, the Raspberry Pi is connected to the servo motor to drive and control the motor, and then the industrial camera is connected to the Raspberry Pi so as to be operated by the shooting of the Raspberry Pi camera. A program is written on the Raspberry Pi, and the servo motor is communicated through the GPIO port of the Raspberry Pi, and the connection between the Raspberry Pi and the industrial camera is realized through the USB interface, and the corresponding program is written to realize the synchronous triggering of the motor and the camera. The SDK of the industrial camera is used to set the appropriate frame rate and resolution, and then the collected image information is fed back to the Raspberry Pi. The angle or position of the motor is calculated through the pulse number and resolution of the encoder, and the encoder information is associated with the image information obtained by the industrial camera, so as to achieve reverse calculation of the location of abnormal chicken manure.
[0187] The invention realizes a caged broiler disease monitoring system by combining software with hardware, uses Raspberry Pi as a main controller, uses a yolov8 system environment to realize an image processing part, and realizes the positioning of caged sick chickens by writing corresponding hardware programs. The invention comprises a chicken disease classification and grading algorithm, a chicken manure type recognition algorithm and a chicken disease grading algorithm, and provides a new positioning method in a positioning system for judging sick chickens through abnormal chicken manure. The invention also realizes giving an alarm when an abnormal situation is detected, realizes more accurate and efficient health status monitoring of caged chickens, is suitable for long-term stable operation, and provides more efficient production for the breeding industry, which is of great significance.
[0188] It can be seen that the chicken manure images on the chicken manure conveyor belt of caged chickens are collected in real time through the image acquisition unit; the chicken manure images are identified by using the abnormal feces recognition and classification model to obtain the chicken manure disease category; the chicken manure images are classified into disease levels; the conveyor belt speed of the chicken manure conveyor belt is calculated, and when abnormal chicken manure is identified, the displacement of the abnormal chicken manure is calculated based on the synchronous start time of the image acquisition unit and the chicken manure conveyor belt, the time of identifying the abnormal chicken manure, and the conveyor belt speed; the source cage position of the abnormal chicken manure is determined based on the length of the chicken cage, the total number of chicken cages and the displacement, so that the health status of caged chickens can be monitored in real time through intelligent chicken manure and the degree of abnormality can be classified, and the location of sick chickens can be located more accurately and simply, which is of great significance for promoting the intelligent development of the poultry farming industry.
[0189] Another embodiment of the present invention provides a real-time monitoring device for abnormal sick chickens in a cage-raising mode, see Figure 4 , the device may include:
[0190] The acquisition module 401 is used to acquire chicken manure images on a caged chicken manure conveyor belt in real time through a pre-built image acquisition unit;
[0191] The recognition module 402 is used to use a pre-trained abnormal feces recognition and classification model to recognize the chicken feces image and obtain the chicken feces disease category;
[0192] A classification module 403 is used to classify the chicken manure image into disease levels;
[0193] A calculation module 404 is used to calculate the conveyor belt speed of the chicken manure conveyor belt. When abnormal chicken manure is identified, the displacement of the abnormal chicken manure is calculated according to the synchronous start time of the image acquisition unit and the chicken manure conveyor belt, the time of identifying the abnormal chicken manure, and the conveyor belt speed;
[0194] The determination module 405 is used to determine the source cage of abnormal chicken feces according to the length of the cages of caged chickens, the total number of cages and the displacement, so as to achieve real-time monitoring of abnormal sick chickens.
[0195] It can be seen that the chicken manure images on the chicken manure conveyor belt of caged chickens are collected in real time through the image acquisition unit; the chicken manure images are identified by using the abnormal feces recognition and classification model to obtain the chicken manure disease category; the chicken manure images are classified into disease levels; the conveyor belt speed of the chicken manure conveyor belt is calculated, and when abnormal chicken manure is identified, the displacement of the abnormal chicken manure is calculated based on the synchronous start time of the image acquisition unit and the chicken manure conveyor belt, the time of identifying the abnormal chicken manure, and the conveyor belt speed; the source cage position of the abnormal chicken manure is determined based on the length of the chicken cage, the total number of chicken cages and the displacement, so that the health status of caged chickens can be monitored in real time through intelligent chicken manure and the degree of abnormality can be classified, and the location of sick chickens can be located more accurately and simply, which is of great significance for promoting the intelligent development of the poultry farming industry.
[0196] An embodiment of the present invention further provides a storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.
[0197] Specifically, in this embodiment, the above storage medium may be configured to store a computer program for performing the following steps:
[0198] S201, collecting chicken manure images on a caged chicken manure conveyor belt in real time through a pre-built image acquisition unit;
[0199] S202, using a pre-trained abnormal feces recognition and classification model to identify the chicken feces image and obtain a chicken feces disease category;
[0200] S203, classifying the chicken manure image into disease grades;
[0201] S204, calculating the conveyor belt speed of the chicken manure conveyor belt, and when abnormal chicken manure is identified, calculating the displacement of the abnormal chicken manure according to the synchronous start time of the image acquisition unit and the chicken manure conveyor belt, the time of identifying the abnormal chicken manure, and the conveyor belt speed;
[0202] S205, determining the source cage of the abnormal chicken feces according to the length of the cages of the caged chickens, the total number of cages and the displacement, so as to achieve real-time monitoring of abnormal sick chickens.
[0203] Specifically, in this embodiment, the above-mentioned storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store computer programs.
[0204] It can be seen that the chicken manure images on the chicken manure conveyor belt of caged chickens are collected in real time through the image acquisition unit; the chicken manure images are identified by using the abnormal feces recognition and classification model to obtain the chicken manure disease category; the chicken manure images are classified into disease levels; the conveyor belt speed of the chicken manure conveyor belt is calculated, and when abnormal chicken manure is identified, the displacement of the abnormal chicken manure is calculated based on the synchronous start time of the image acquisition unit and the chicken manure conveyor belt, the time of identifying the abnormal chicken manure, and the conveyor belt speed; the source cage position of the abnormal chicken manure is determined based on the length of the chicken cage, the total number of chicken cages and the displacement, so that the health status of caged chickens can be monitored in real time through intelligent chicken manure and the degree of abnormality can be classified, and the location of sick chickens can be located more accurately and simply, which is of great significance for promoting the intelligent development of the poultry farming industry.
[0205] An embodiment of the present invention further provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0206] Specifically, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0207] Specifically, in this embodiment, the processor may be configured to perform the following steps through a computer program:
[0208] S201, collecting chicken manure images on a caged chicken manure conveyor belt in real time through a pre-built image acquisition unit;
[0209] S202, using a pre-trained abnormal feces recognition and classification model to identify the chicken feces image and obtain a chicken feces disease category;
[0210] S203, classifying the chicken manure image into disease grades;
[0211] S204, calculating the conveyor belt speed of the chicken manure conveyor belt, and when abnormal chicken manure is identified, calculating the displacement of the abnormal chicken manure according to the synchronous start time of the image acquisition unit and the chicken manure conveyor belt, the time of identifying the abnormal chicken manure, and the conveyor belt speed;
[0212] S205, determining the source cage of the abnormal chicken feces according to the length of the cages of the caged chickens, the total number of cages and the displacement, so as to achieve real-time monitoring of abnormal sick chickens.
[0213] Specifically, the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be described in detail here.
[0214] It can be seen that the chicken manure images on the chicken manure conveyor belt of caged chickens are collected in real time through the image acquisition unit; the chicken manure images are identified by using the abnormal feces recognition and classification model to obtain the chicken manure disease category; the chicken manure images are classified into disease levels; the conveyor belt speed of the chicken manure conveyor belt is calculated, and when abnormal chicken manure is identified, the displacement of the abnormal chicken manure is calculated based on the synchronous start time of the image acquisition unit and the chicken manure conveyor belt, the time of identifying the abnormal chicken manure, and the conveyor belt speed; the source cage position of the abnormal chicken manure is determined based on the length of the chicken cage, the total number of chicken cages and the displacement, so that the health status of caged chickens can be monitored in real time through intelligent chicken manure and the degree of abnormality can be classified, and the location of sick chickens can be located more accurately and simply, which is of great significance for promoting the intelligent development of the poultry farming industry.
[0215] The above describes in detail the structure, features and effects of the present invention based on the embodiments shown in the drawings. The above is only a preferred embodiment of the present invention, but the present invention is not limited to the scope of implementation shown in the drawings. Any changes made according to the concept of the present invention, or modifications to equivalent embodiments with equivalent changes, which still do not exceed the spirit covered by the description and drawings, should be within the protection scope of the present invention.
Claims
1. A real-time monitoring method for abnormal sick chickens in cage mode, characterized in that: The method includes: Real-time collecting chicken manure images on the chicken manure conveyor belt of caged chickens through a pre-built image acquisition unit; Using a pre-trained abnormal manure recognition and classification model to recognize the chicken manure images and obtain the chicken manure disease categories; Dividing the disease levels of the chicken manure images; Calculating the conveyor belt speed of the chicken manure conveyor belt. When abnormal chicken manure is recognized, calculate the displacement of the abnormal chicken manure according to the synchronous start time of the image acquisition unit and the chicken manure conveyor belt, the time when the abnormal chicken manure is recognized, and the conveyor belt speed; Determining the source cage position of the abnormal chicken manure according to the length of the chicken cages of caged chickens, the total number of chicken cages, and the displacement, so as to realize the real-time monitoring of abnormal diseased chickens.
2. The method according to claim 1, characterized in that The image acquisition unit includes: A chicken manure conveyor belt placed directly below the chicken cages; An industrial camera for collecting chicken manure images; Square steel pipes. The conveyor belt movement track is set at the center of the frame of the square steel pipes, and the conveyor belt movement track is used to fix the industrial camera; A servo motor for driving the conveyor belt; A Raspberry Pi development board for controlling the operation and synchronization of the image acquisition unit.
3. The method according to claim 2, characterized in that The abnormal manure recognition and classification model is trained based on the yolov8 network introducing CIoU.
4. The method according to claim 3, characterized in that The chicken manure disease categories include: normal chicken manure, synovitis mycoplasma disease manure, coccidiosis manure, pullorum disease manure, infectious bursal disease manure, Newcastle disease manure.
5. The method according to claim 4, characterized in that The dividing the disease levels of the chicken manure images includes: Analyzing the chicken manure color and shape of the chicken manure images according to the chicken manure color and shape of different categories of chicken manure diseases; Dividing the chicken manure into different disease levels according to the chicken manure color and shape analysis results, where the disease levels include: normal, slightly abnormal, and severely abnormal.
6. The method according to claim 5, characterized in that The calculating the displacement of the abnormal chicken manure according to the synchronous start time of the image acquisition unit and the chicken manure conveyor belt, the time when the abnormal chicken manure is recognized, and the conveyor belt speed includes: Wherein, T0 is the start time, T a The moment when abnormal chicken manure is identified, v is the conveyor belt speed.
7. The method according to claim 6, characterized in that The determining the source cage position of the abnormal chicken manure according to the length of the chicken cages of caged chickens, the total number of chicken cages, and the displacement includes: When L < Nl, determine the source cage position of the abnormal chicken manure as: Wherein, i is the source cage position M of abnormal chicken manure i , i is an integer, l is the length of the chicken cage, and M is the total number of chicken cages; When L > Nl, determine the source cage position of the abnormal chicken manure as: When M = Nl, determine the source cage position of the abnormal chicken manure as: i = 1, determined to come from the first cage position.
8. A real-time monitoring device for abnormal sick chickens in cage-raising mode, characterized in that: The device includes: A collection module for real-time collecting chicken manure images on the chicken manure conveyor belt of caged chickens through a pre-built image acquisition unit; An identification module for using a pre-trained abnormal manure recognition and classification model to recognize the chicken manure images and obtain the chicken manure disease categories; A division module for dividing the disease levels of the chicken manure images; A calculation module for calculating the conveyor belt speed of the chicken manure conveyor belt. When abnormal chicken manure is recognized, calculate the displacement of the abnormal chicken manure according to the synchronous start time of the image acquisition unit and the chicken manure conveyor belt, the time when the abnormal chicken manure is recognized, and the conveyor belt speed; A determination module for determining the source cage position of the abnormal chicken manure according to the length of the chicken cages of caged chickens, the total number of chicken cages, and the displacement, so as to realize the real-time monitoring of abnormal diseased chickens.
9. A storage medium, characterized in that: The storage medium stores a computer program, wherein the computer program is configured to execute the method according to any one of claims 1 to 7 when executed.
10. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to perform the method according to any one of claims 1 to 7.