A camera effective detection distance estimation method for poultry target detection

By collecting poultry video data and using target detection and depth estimation models to calculate the effective detection distance of cameras, the problem of unreasonable camera deployment in poultry farming has been solved, improving the accuracy of poultry monitoring and the effectiveness of the smart farming system.

CN117765052BActive Publication Date: 2026-11-27SHENZHEN UNIV +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202311785633.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-22
Publication Date
2026-11-27
Estimated Expiration
2043-12-22

AI Technical Summary

Technical Problem

In poultry farming, how to rationally deploy cameras based on different camera equipment parameters and poultry characteristics to ensure the effectiveness and accuracy of the smart farming system is a challenge.

Method used

By collecting video data of poultry, the target detection model is used for labeling and tracking identification. The effective detection distance of the camera is calculated by combining focal length parameters, poultry parameters and depth estimation models. Self-supervision and optimization are then performed to generate camera deployment suggestions.

Benefits of technology

It improved the accuracy of real-time monitoring and identification of poultry, ensured the reliability of hardware deployment strategies and algorithm feasibility of the smart farming system, and optimized the spatial deployment of cameras.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117765052B_ABST
    Figure CN117765052B_ABST
Patent Text Reader

Abstract

The present application belongs to the technical field of poultry breeding, and specifically relates to a camera effective detection distance estimation method for poultry target detection. The present application obtains image, video, identification information and position information and other data of the poultry in the breeding farm, and adds three types of parameters of the camera, the poultry and the algorithm provided by the breeder. After the data is preprocessed, the distance is preliminarily estimated, and then the estimated distance is sent into a depth estimation model for calculation to obtain a distance with higher confidence. Then, the distance that cannot be recognized and the maximum distance of the effective detection are notified to the breeder through a message. The estimated detection distance can provide data support for the reasonable deployment of the camera in the same detection range in the scene with a large number and a wide space, effectively optimize the spatial deployment of the camera, and improve the real-time monitoring, recognition and tracking accuracy of the poultry, and the judgment effect, so as to ensure the reliability of the hardware deployment strategy of the intelligent breeding system and the feasibility of the related algorithm.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of poultry farming technology, specifically relating to a method for estimating the effective detection distance of a camera for poultry target detection. Background Technology

[0002] With the development of science and technology, artificial intelligence has been gradually applied to various industries. To solve various problems such as monitoring difficulties and limited output in traditional artificial poultry farming, some smart farming systems based on artificial intelligence algorithms have been designed, developed and deployed in various poultry farming scenarios. These systems have achieved core functions such as real-time detection, tracking and identification of various poultry in videos, and automated management such as automated feeding and disease monitoring.

[0003] However, for farmers who are unfamiliar with the relevant computer technology, how to correctly and effectively deploy monitoring equipment such as cameras according to different camera device parameters and different types of poultry, so as to maximize the effectiveness of the smart farming system, remains a challenge. Summary of the Invention

[0004] The purpose of this invention is to provide a method for estimating the effective detection distance of cameras for poultry target detection, which is used to test the rationality of the current deployment of various monitoring devices, and at the same time to provide a highly feasible solution that passes the correctness test, so as to ensure the high availability of the smart farming system and its related algorithms, and to solve the problems mentioned in the background art.

[0005] To achieve the above objectives, the present invention adopts the following technical solution: a method for estimating the effective detection distance of a camera for poultry target detection, comprising: collecting video data of poultry through monitoring equipment installed in the farm; identifying and marking various poultry species in the video data using a preset target detection model; tracking and identifying each poultry species in the video data based on the markings, calculating the distance based on the estimation model, and performing self-supervision, optimization, and correctness verification on the estimated distance, thereby providing suggestions for camera deployment in specific farms; evaluating the correctness of the estimation results and generating a message to notify the user.

[0006] Preferably, the process involves tracking and identifying each type of poultry in the video data based on the markers, calculating distances based on an estimation model, and performing self-supervised optimization and accuracy verification on the estimated distances. Based on this, recommendations for camera deployment in specific farms are provided, including:

[0007] Tracking algorithms are used to track and identify birds in video data;

[0008] Obtain the focal length parameters of the cameras deployed in the farm;

[0009] Obtain poultry parameters within the farm;

[0010] Obtain the minimum pixel resolution of the object detection algorithm;

[0011] Preliminary calculations of the parameters yielded the theoretical maximum distance at which the camera can effectively detect birds;

[0012] The theoretical maximum distance calculated in the preliminary calculation is corrected using a depth estimation model to obtain a more accurate estimated distance.

[0013] The estimated distance is self-supervised and optimized, and the detection device periodically reacquires video data to update the effective distance that the device can detect.

[0014] The accuracy of the estimation results for the farm is verified, the farm is evaluated and modeled, and the minimum number of effective cameras and the spatial deployment location of the cameras are evaluated based on the estimation results.

[0015] Preferably, the step of using a tracking algorithm to track and identify birds in video data includes: taking a marked bird as a target, finding the current position of the marked bird in the video data; acquiring the next frame of video data, finding a target with the same mark in the next frame of video data; comparing the information of the target in the two frames of data, and if all the information is the same, confirming that they are the same target and associating them to achieve target tracking.

[0016] Preferably, obtaining the focal length parameters of the cameras deployed in the farm includes: obtaining the focal length parameters of the cameras deployed in the farm through the camera focal length calibration calculation formula, and obtaining the focal length values ​​in the horizontal and vertical coordinate directions; the camera focal length calibration calculation formula includes: obtaining the parameters of the camera imaging geometric model through camera calibration; transforming the world coordinate system into the camera coordinate system through rigid body transformation, obtaining the image coordinate system through perspective projection of the camera coordinate system, obtaining the pixel coordinate system through affine transformation of the image coordinate system, and obtaining the transformation relationship from the world coordinate system to the pixel coordinate system through the comprehensive formula.

[0017] Preferably, obtaining poultry parameters in the farm includes: obtaining the length and width of the smallest cube in a three-dimensional space occupied by a type of poultry from the database; obtaining data for poultry not in the database by manual measurement and entering the data into the database; and using a set of length and width of a smallest cube corresponding to each type of farmed poultry as a constant in the calculation.

[0018] Preferably, obtaining the minimum pixel resolution of the target detection algorithm includes: using the YOLOv5 target detection algorithm to detect birds in the image, returning the smallest search box when the algorithm confidence and accuracy are higher than a threshold, and the corresponding resolution is regarded as the minimum pixel resolution.

[0019] Preferably, the step of using a depth estimation model to correct the theoretical maximum distance calculated in the preliminary calculation to obtain a more accurate estimated distance includes: using a depth estimation model to correct the preliminary estimated distance, and inputting the image captured in the preliminary calculation into the depth estimation model for further distance estimation.

[0020] Preferably, the self-supervised and optimized process for estimating the distance, wherein the detection device periodically reacquires video data and updates the effective distance that the device can detect, includes: the camera reacquires video data every certain period of time; reporting distances where poultry cannot be effectively detected to the farmers, and simultaneously updating the estimated maximum effective detection distance.

[0021] Preferably, the process of verifying the accuracy of the estimation results for the farm, evaluating and modeling the farm, and assessing the minimum number of effective cameras and their spatial deployment locations based on the estimation results includes:

[0022] The actual farm is evaluated and modeled. If the estimated maximum effective detection distance satisfies the expectation E of the detection accuracy of all objects within a certain time period being greater than the algorithm accuracy threshold, then the estimated maximum distance is considered to be the maximum acceptable camera placement spacing for the farm area.

[0023] On a two-dimensional plane, draw arcs with the estimated maximum effective detection distance as the radius, ensuring that all arc coverage areas can fill the aquaculture area, thereby constructing a camera deployment model in the aquaculture space; if height is taken into account, the estimated maximum effective detection distance is further corrected according to the camera deployment height.

[0024] Preferably, the step of evaluating the accuracy of the estimation results and generating a message to notify the user includes:

[0025] The final estimated maximum effective detection distance, minimum camera requirements, and recommended camera deployment locations will be communicated to farmers via real-time messages from products such as mini-programs.

[0026] During the self-monitoring process, farmers will be notified via message of newly detected distances that cannot be effectively detected for poultry, as well as the updated maximum effective detection distance.

[0027] Technical effects and advantages of the present invention: The effective detection distance estimation method for cameras for bird target detection proposed in this invention has the following advantages compared with the prior art:

[0028] This invention acquires data such as images, videos, identification information, and location information of poultry in farms, and adds three types of parameters—camera, poultry, and algorithms—provided by farmers. After preprocessing this data, a preliminary distance is estimated. The estimated distance is then fed into a depth estimation model for calculation to obtain a distance with higher confidence. The undetectable distance and the estimated maximum effective detection distance are then communicated to the farmers via message. This estimated detection distance can provide data support for the rational deployment of cameras within the same detection range in scenarios with a large number of cameras and vast areas, effectively optimizing camera spatial deployment and improving the accuracy of real-time monitoring, identification, and tracking of poultry. This ensures the reliability of hardware deployment strategies for various smart farming systems and the feasibility of their related algorithms. Attached Figure Description

[0029] Figure 1 This is a flowchart of the effective detection distance estimation method for cameras for bird target detection according to the present invention;

[0030] Figure 2 This is a flowchart illustrating the implementation and verification of the estimation model of this invention;

[0031] Figure 3 This is a block diagram of the camera effective detection distance estimation system for poultry target detection according to the present invention. Detailed Implementation

[0032] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The specific embodiments described herein are merely used to explain the present invention and are not intended to limit the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0033] This invention provides a method for estimating the effective detection distance of cameras for poultry target detection. By acquiring video data of poultry from a farm, preprocessing it, and then feeding it into a target detection model and tracking algorithm, various types of poultry are identified. After steps such as estimation model, self-supervision and optimization, and accuracy assessment, an effective detection distance based on user input parameters and a highly feasible modeling or optimization scheme for monitoring equipment deployment are provided. This distance data and scheme are then promptly pushed to the user via a client, thereby avoiding a decrease in the accuracy of the target detection algorithm due to unreasonable camera deployment and ensuring that various smart farming systems based on artificial intelligence algorithms achieve maximum efficiency.

[0034] like Figure 1 As shown, Figure 1This is a flowchart of the effective detection distance estimation method for cameras for bird target detection according to the present invention.

[0035] In this embodiment, the method for estimating the effective detection distance of a camera for bird target detection includes the following steps:

[0036] Step 1: Collect video data of poultry using monitoring equipment installed in the farm.

[0037] In this step, video data of poultry is collected by cameras installed in the farm. The video data is a frame of the farm's monitoring screen at a real time point, and the monitoring screen includes poultry, feeding equipment and equipment in the farm.

[0038] In practical applications, the monitoring screen in this video data can display the identification information and body temperature data of each type of poultry. The identification information is collected by tags with positioning functions, such as Bluetooth positioning tags, RFID tags, GPS positioning tags, etc. The body temperature data is obtained based on thermal imaging technology. In this case, the monitoring screen is not only a high-definition image, but also includes a heat map. The heat map displays the body temperature data of each type of poultry, and the identification information, such as the type and number of the poultry, is displayed in the detection box of each type of poultry.

[0039] Step 2: Use a preset target detection model to identify and mark the various birds in the video data.

[0040] In this step, the target detection model is a target detection algorithm built based on deep learning neural network training. By inputting the video data collected above into the target detection model, the model extracts the monitoring footage containing poultry, then identifies the identification information in the monitoring footage, extracts the content of the identification information to generate a marker, generates a tracking box for the poultry corresponding to the identification information, adds the marker to the monitoring footage, and obtains the target profile.

[0041] Step 3: Based on the markers, track and identify each type of poultry in the video data, calculate the distance based on the estimation model, and perform self-supervised optimization and accuracy verification on the estimated distance. Based on this, provide suggestions on camera deployment for specific farms.

[0042] The specific method is as follows:

[0043] 1: Use tracking algorithms to track and identify birds in video data;

[0044] 1.1: Using the marked birds as targets, find the current location of the marked birds in the video data;

[0045] 1.2: Obtain the next frame of video data and search for targets with the same marker in the next frame of video data;

[0046] 1.3: Compare the target information in the two frames of data. If all information is the same, it is confirmed that they are the same target. Then, they are associated to achieve target tracking.

[0047] 2: Obtain the focal length parameters of the cameras deployed in the farm;

[0048] 2.1: The focal length parameters of the cameras deployed in the farm are obtained through the focal length calibration calculation formula of the cameras, and the focal length values ​​in the horizontal and vertical coordinate directions are obtained;

[0049] 2.2: The formula for calculating the focal length calibration of the camera includes: obtaining the parameters of the camera imaging geometry model by calibrating the camera;

[0050] 2.3: The world coordinate system is transformed into the camera coordinate system through rigid body transformation. The perspective projection of the camera coordinate system yields the image coordinate system. The image coordinate system can be transformed into the pixel coordinate system through affine transformation. Combining these formulas, the transformation relationship from the world coordinate system to the pixel coordinate system is obtained. This relationship can also be realized by two matrices. One of these matrices depends on the camera's intrinsic parameters, and the other depends on the positions of the camera coordinate system and the world coordinate system. These two matrices can be solved for during camera calibration.

[0051] 3: Obtain poultry parameters within the farm;

[0052] 3.1: Retrieve the length and width of the smallest cube in three-dimensional space occupied by a bird species from the database;

[0053] 3.2: Data for poultry species not in the database were obtained through manual measurement and then entered into the database;

[0054] 3.3: Each type of farmed poultry corresponds to a set of minimum cube lengths and widths, and this set of data is used as a constant in the calculation.

[0055] 4. Obtain the minimum pixel resolution of the object detection algorithm, including: using the YOLOv5 object detection algorithm to detect birds in an image, returning the smallest search box when the algorithm's confidence and accuracy are higher than a threshold; the corresponding resolution is considered the minimum pixel resolution. Here, YOLOv5 is used as an example. This parameter can also be measured during actual deployment. The threshold 'a' is a threshold set by the user.

[0056] 5: Preliminary calculations of the parameters yielded the theoretical maximum distance at which the camera can effectively detect poultry.

[0057] 6: Correct the theoretical maximum distance calculated in the preliminary calculation using a depth estimation model to obtain a more accurate estimated distance, including: correcting the preliminary estimated distance using a depth estimation model, and inputting the images captured in the preliminary calculation into the depth estimation model for further distance estimation.

[0058] The initial distance estimate is corrected using a depth estimation model. The images captured in the initial calculation are input into the depth estimation model for further distance estimation.

[0059] In practical applications, the location of the poultry is selected in advance as the ROI (Region of Interest), and the actual distance to the poultry area is estimated. Based on the actual distance, the estimated maximum effective detection distance is corrected. The initial value of the correction coefficient is 0.001, which can be changed later as needed.

[0060] 7: Perform self-supervision and optimization on the estimated distance. The detection device periodically reacquires video data and updates the effective distance that the device can detect. This includes: the camera reacquires video data every certain period of time; reporting the distances where poultry cannot be effectively detected to the farmers, and at the same time updating the estimated maximum effective detection distance.

[0061] 8: Verify the accuracy of the estimation results for the farm, evaluate and model the farm, and assess the minimum number of effective cameras and their spatial deployment locations based on the estimation results.

[0062] 8.1: Evaluate and model the actual farm. If the estimated maximum effective detection distance satisfies the expectation E of the detection accuracy of all objects within a certain time period being greater than the algorithm accuracy threshold, then the estimated maximum distance is considered to be the maximum acceptable camera placement spacing for the farm area.

[0063] 8.2: Draw arcs on a two-dimensional plane with the estimated maximum effective detection distance as the radius, ensuring that all arc coverage areas can fill the aquaculture area, thereby constructing a camera deployment model in the aquaculture space; if height is taken into account, further correct the estimated maximum effective detection distance according to the camera deployment height.

[0064] The expected detection accuracy E for all objects is greater than the algorithm's accuracy threshold a. The calculation of E includes:

[0065] E is the sum of the products of the probability of the target being identified as Ground Truth and the frequency of this probability in all samples. For example, in a poultry farm, if 90% of the poultry are identified as having a 95% probability of being the target, and 10% of the poultry are identified as having an 80% probability of being the target, then the value of E is 90%*95%+10%*80%.

[0066] It also includes calculating the minimum effective area, obtaining the maximum effective shooting area through the tracking model; obtaining the minimum effective area using the shooting machine parameters and poultry characterization parameters; calculating the farthest effective shooting distance using a formula; updating the shooting and identification area based on the new effective distance, and performing the above actions to obtain a new effective range; and based on the above process until the update range is reduced to a set threshold, obtaining the final modification suggestion.

[0067] Furthermore, given a basic effective detection distance, the recognition accuracy within the set area is periodically recalculated; if the distance dmax satisfies the expected accuracy E of all object detection within 48 hours (E>0.9), then dmax is considered to be the maximum acceptable camera placement interval distance for the breeding area.

[0068] The expected value E is calculated as follows: E = ∑p i q i ;

[0069] Where p i q represents the probability of identifying the target as Ground Truth. i This indicates the percentage of a specified probability number.

[0070] In addition, methods for calculating the farthest detection distance include:

[0071] f calculated from camera calibration x ,f y

[0072] Returns the smallest search box whose algorithm confidence / accuracy is higher than (a user-defined threshold) 'a', with the corresponding resolution considered as the minimum value. This is denoted as Area.

[0073] Based on the above parameters, preliminary calculations yield the theoretical maximum distance at which the camera can detect birds:

[0074] Where w and h are the length and width of the space actually occupied by the poultry, respectively.

[0075] Step 4: Evaluate the accuracy of the estimation results and generate a message to notify the user. The final estimated maximum effective detection distance, minimum camera requirements, and recommended camera deployment locations will be communicated to farmers via messages from products such as mini-programs. During the self-monitoring process, newly detected distances that cannot effectively detect poultry, as well as the updated maximum effective detection distance, will be communicated to farmers via messages.

[0076] The system tracks and identifies various bird species in the video data based on tags, and calculates distances based on an estimation model.

[0077] In this step, the markers in step 120 are used as targets, and the video data of the next frame is obtained. The video data of the next frame is also processed based on the target detection model described above. Then, the markers in the video data of the previous frame are used as search conditions to find targets with the same markers in the video data of the next frame. After the target is found, the image of the marker is extracted and compared. When all the information is the same, it is determined to be the same target and associated to achieve tracking. Information is added to the tracked bird targets, including the target type and number.

[0078] The implementation method of the estimation model and the core process of subsequent correctness verification and scheme generation are as follows: Figure 2 As shown, the specific implementation process of distance estimation is as follows:

[0079] Camera parameter acquisition: The focal length parameters of the cameras deployed in the farm are obtained through the camera focal length calibration calculation formula. The focal length values ​​in the horizontal and vertical directions of the camera are denoted as: f x ,f y .

[0080] Poultry Length and Width Acquisition: The length and width of the smallest cube actually occupied by the target poultry species in three-dimensional space are retrieved from the database, denoted as w and h respectively. Each type of farmed animal in the database corresponds to a set of length and width data. If the corresponding poultry species cannot be found in the database, the results obtained through manual measurement are entered into the database.

[0081] Minimum Pixel Resolution: Obtain the minimum pixel resolution of the object detection algorithm (using YOLOv5 as an example below; this parameter can also be measured during actual deployment). Using the YOLOv5 object detection algorithm to detect birds in an image, return the smallest search box whose algorithm confidence / accuracy is higher than 'a' (a user-defined threshold ranging from 0 to 1, such as 0.9). The corresponding resolution is considered the minimum value. This is denoted as Area.

[0082] Distance estimation: Based on the above parameters, preliminary calculations are performed to obtain the theoretical maximum distance at which the camera can detect birds:

[0083] Distance Correction: Considering the coarseness of the above formula and its low accuracy in practical situations, the image captured during the calculation is input into the depth estimation model for further distance estimation. The location of the birds is pre-selected as the distance ROI, and the actual distance to this area is estimated to obtain distance d'. Based on d', d is corrected. The initial correction coefficient η is 0.001, which can be changed according to different situations. The correction value is defined as: η||d′-d||2. After correction, the estimated distance d changes to:

[0084] Self-supervision and optimization: The maximum distance for initially identifying effective detections satisfies d. max =d. Considering that birds move freely within a certain space, the camera needs to reacquire data after a certain time interval t. If the distance of birds cannot be effectively identified, the value of d needs to be updated promptly.

[0085] In this embodiment, the estimation result is an estimated value d of the distance between the poultry and the camera in the monitoring image. However, whether d conforms to the actual effective detection distance of the camera still needs to be evaluated for accuracy. The specific evaluation method is as follows:

[0086] If the expected accuracy E for all object detections within the time interval t mentioned in section 130 is greater than the accuracy threshold a mentioned in section 130, then d is considered to be the maximum acceptable camera placement interval distance for the breeding area. The expected accuracy E is calculated as follows: E = ∑p i q i , where p i q represents the probability of identifying the target as Ground Truth. i This indicates the frequency of this probability across all samples.

[0087] To generate a deployment plan, it is necessary to model the camera deployment, as follows:

[0088] Draw arcs with radius d on a 2D plane, ensuring that all arcs cover the aquaculture area (ideally), thus constructing a camera deployment model in the aquaculture space. If height (z-axis) is considered, and the camera deployment height is h, then d is further modified as follows:

[0089] The estimated distance d that has passed the correctness verification and the corresponding deployment plan will be sent to farmers via notification messages through actual products such as mini-programs.

[0090] This implementation demonstrates that by acquiring data such as images, videos, identification information, and location information of poultry in the farm, and adding three types of parameters—camera, poultry, and algorithm—provided by the farmers, the data is preprocessed to initially estimate the distance. This estimated distance is then fed into a depth estimation model for calculation, yielding a distance with higher confidence. The undetectable distances and the assessed maximum effective detection distance are then communicated to the farmers via messages. This estimated detection distance provides data support for the rational deployment of cameras within the same detection range in scenarios with a large number of cameras and vast areas. It effectively optimizes camera spatial deployment and improves the accuracy of real-time poultry monitoring, identification, and tracking, ensuring the reliability of hardware deployment strategies for each smart farming system and the feasibility of its related algorithms.

[0091] On the other hand, the present invention proposes a camera effective detection distance estimation system for bird target detection, comprising: a data acquisition module, a marking module, an estimation module, and an evaluation module.

[0092] For example, the data acquisition module is used to collect video data of poultry through monitoring equipment installed in the farm;

[0093] For example, the tagging module is used to identify and tag various birds in the video data using a preset target detection model;

[0094] For example, the estimation module is used to track and identify each type of poultry in the video data based on the marker, calculate the distance based on the estimation model, and perform self-supervision, optimization and correctness verification on the estimated distance, thereby providing suggestions on camera deployment for specific farms.

[0095] For example, the evaluation module is used to assess the correctness of the estimation results and generate a message to notify the user.

[0096] In addition, the data acquisition module, labeling module, estimation module, and evaluation module mentioned above are also used to implement other functions of the aforementioned camera effective detection distance estimation method for poultry target detection when executed on the terminal device.

[0097] In addition, the present invention also provides a terminal device. The effective detection distance estimation method for camera targeting poultry in this embodiment is mainly applied in the terminal device, which can be a PC, portable computer, mobile terminal or other device with display and processing functions.

[0098] Specifically, the terminal device may include a processor (e.g., CPU), a communication bus, a user interface, a network interface, and memory. The communication bus is used to enable communication between these components; the user interface may include a display screen or an input unit such as a keyboard; the network interface may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface); the memory may be high-speed RAM or stable non-volatile memory, such as disk storage, and may also optionally be a storage device independent of the aforementioned processor.

[0099] The memory stores a readable storage medium, which in turn stores an estimation program. The processor can call the estimation program stored in the memory and execute the effective detection distance estimation method for avian target detection provided in this embodiment of the invention.

[0100] Understandably, a readable storage medium can be a tangible device capable of holding and storing instructions for use by an instruction execution device. A computer-readable storage medium can be, for example—but not limited to—an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital multifunction disc (DVD), memory sticks, floppy disks, mechanical encoding devices, such as punch cards or recessed protrusions storing instructions thereon, and any suitable combination thereof. The computer-readable storage medium as used herein is not to be construed as a transient signal itself, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., light pulses through fiber optic cables), or electrical signals transmitted through wires.

[0101] The computer-readable program instructions described herein can be downloaded from computer-readable storage media to various computing / processing devices, or downloaded via a network, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to the computer-readable storage media in the respective computing / processing device.

[0102] Computer program instructions used to perform operations of this disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, status setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Smalltalk, C++, etc., and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuitry, such as programmable logic circuitry, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), is personalized by utilizing the status information of the computer-readable program instructions to implement various aspects of this disclosure.

[0103] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for estimating the effective detection distance of a camera for bird target detection, characterized in that, include: Video data of poultry is collected through monitoring equipment installed in the farm; The video data is used to identify and mark various birds using a preset target detection model. Based on the markers, the system tracks and identifies each type of poultry in the video data, calculates the distance based on the estimation model, and performs self-supervision, optimization, and accuracy verification on the estimated distance. Based on this, suggestions are given for camera deployment in specific farms. Specifically, this includes: tracking and identifying poultry in video data using tracking algorithms; obtaining the focal length parameters of cameras deployed at the farm; obtaining poultry parameters within the farm; obtaining the minimum pixel resolution of the target detection algorithm; performing preliminary calculations on the parameters to obtain the theoretical maximum distance at which the camera can effectively detect poultry; using a depth estimation model to correct the theoretical maximum distance obtained from the preliminary calculations to obtain a more accurate estimated distance; performing self-supervised optimization on the estimated distance, with the detection device periodically re-acquiring video data and updating the effective detectable distance; verifying the correctness of the estimated results at the farm; evaluating and modeling the farm; and based on... The estimation results assess the minimum number of effective cameras and their spatial deployment locations. Specifically, this includes: evaluating and modeling the actual farm; if the estimated maximum effective detection distance satisfies the expectation E of the detection accuracy for all objects within a certain time period being greater than the algorithm's accuracy threshold, then the estimated maximum distance is considered the maximum acceptable camera spacing for the farming area; drawing arcs on a two-dimensional plane with the estimated maximum effective detection distance as the radius, ensuring that all arc coverage areas fill the farming area, thereby constructing a camera deployment model in the farming space; if height is considered, further refining the estimated maximum effective detection distance based on the camera deployment height. The accuracy of the estimation results is assessed, and a message is generated to notify the user.

2. The method for estimating the effective detection distance of a camera for bird target detection according to claim 1, characterized in that, The method of tracking and identifying birds in video data using a tracking algorithm includes: Using the marked birds as targets, locate the current position of the marked birds in the video data; Obtain the next frame of video data and search for targets with the same marker in the next frame of video data; By comparing the target information in two frames of data, if all information is the same, it is confirmed that they are the same target, and they are associated to achieve target tracking.

3. The method for estimating the effective detection distance of a camera for bird target detection according to claim 2, characterized in that, The process of obtaining the focal length parameters of the cameras deployed in the farm includes: The focal length parameters of the cameras deployed in the farm are obtained by using the camera focal length calibration calculation formula, and the focal length values ​​in the horizontal and vertical coordinate directions are obtained. The formula for calculating the focal length calibration of the camera includes: obtaining the parameters of the camera imaging geometric model by calibrating the camera; transforming the world coordinate system into the camera coordinate system by rigid body transformation; obtaining the image coordinate system by perspective projection of the camera coordinate system; obtaining the pixel coordinate system by affine transformation of the image coordinate system; and obtaining the transformation relationship from the world coordinate system to the pixel coordinate system by combining the formulas.

4. The method for estimating the effective detection distance of a camera for bird target detection according to claim 3, characterized in that, The acquisition of poultry parameters within the farm includes: Retrieve the length and width of the smallest cube in a three-dimensional space occupied by a bird species from the database; Data for poultry species not in the database were obtained through manual measurement and then entered into the database. Each type of farmed poultry corresponds to a set of minimum cube lengths and widths, and this set of data is used as a constant in the calculation.

5. The method for estimating the effective detection distance of a camera for bird target detection according to claim 4, characterized in that, The method for obtaining the minimum pixel resolution of the target detection algorithm includes: The YOLOv5 object detection algorithm is used to detect birds in the image. The smallest search box that is higher than the algorithm's confidence and accuracy thresholds is returned, and the corresponding resolution is regarded as the minimum pixel resolution.

6. The method for estimating the effective detection distance of a camera for bird target detection according to claim 5, characterized in that, The process of using a depth estimation model to correct the initially calculated theoretical maximum distance to obtain a more accurate estimated distance includes: The initial distance estimate is corrected using a depth estimation model. The images captured in the initial calculation are input into the depth estimation model for further distance estimation. The next step is to perform further distance estimation, including distance estimation and distance correction: Distance estimation: focal length values ​​in the horizontal and vertical directions of the camera. Preliminary calculations were performed using the dimensions (w, h) of the bird and the minimum pixel resolution area to obtain the theoretical maximum distance at which the camera can detect birds. ; Distance Correction: The location of the poultry is selected as the distance ROI. The actual distance to the region is estimated to obtain the distance d'. Based on d', d is corrected. The initial value of the correction coefficient η is 0.001, and the correction value is defined as: After correction, the estimated distance d changes to: .

7. The method for estimating the effective detection distance of a camera for bird target detection according to claim 6, characterized in that, The self-supervised and optimized process for the estimated distance, involving the detection device periodically reacquiring video data and updating the effective distance that the device can detect, includes: The camera reacquires video data periodically. Distances where poultry cannot be effectively detected will be reported to farmers, and the estimated maximum effective detection distance will be updated at the same time.

8. The method for estimating the effective detection distance of a camera for bird target detection according to claim 7, characterized in that, The step of evaluating the accuracy of the estimation results and generating a message to notify the user includes: The final estimated maximum effective detection distance, minimum camera requirements, and recommended camera deployment locations will be communicated to farmers via a mini-program. During the self-monitoring process, farmers will be notified via message of newly detected distances that cannot be effectively detected for poultry, as well as the updated maximum effective detection distance.

Citation Information

Patent Citations

  • Animal image-based identification method and device, terminal and medium

    CN112560621A

  • Camera coverage area detection method and device thereof, equipment and storage medium

    CN113516703A

  • Shooting method of tower footing spherical camera in high space coverage range

    CN114268736A