Dead chicken detection method based on image fusion and improved YOLOv9

Through image fusion and improvement of the YOLOv9 model, combined with the EMA attention mechanism and the Rep-DCNv3 module, the uneven light and occlusion problems of dead chicken detection in high-density breeding scenarios are solved, achieving higher detection accuracy and robustness.

CN119251865AActive Publication Date: 2025-01-03CHINA UNIV OF MINING & TECH

Patent Information

Application Number
CN202411239415.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-05
Publication Date
2025-01-03
Estimated Expiration
2044-09-05

AI Technical Summary

Technical Problem

The existing dead chicken detection technology has insufficient recognition accuracy under high-density breeding scenarios, complex backgrounds and occlusion, resulting in high false recognition and missed detection rates, especially in multi-layer cage mode.

Method used

The thermal infrared image is fused with visible light images by using a progressive image fusion method based on illumination perception, and the EMA attention mechanism and Rep-DCNv3 module are introduced into the YOLOv9 object detection algorithm, combined with the MPDIoU loss function, enhance the adaptability of the model to complex environments and detection accuracy.

Benefits of technology

It significantly improves the accuracy and robustness of dead chicken detection, reduces the misidentification and missed detection rates, and can accurately identify dead chickens under complex lighting and occlusion, improving the real-time and reliability of detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119251865A_ABST
    Figure CN119251865A_ABST
Patent Text Reader

Abstract

The invention discloses a dead chicken detection method based on image fusion and improved YOLOv9, and the method comprises the steps: firstly achieving the fusion of a thermal infrared image and a visible light image through a PIAFusion technology, so as to improve the significance of a dead chicken target feature, and eliminate the influence of uneven illumination; secondly, an EMA attention mechanism is introduced into the neck of the YOLOv9 to effectively distinguish a target and a dead chicken target in a low-light environment, so that the accuracy and generalization ability of the model are improved; a Rep-DCNv3 module is introduced to enhance a trunk feature extraction network, and dead chicken features under the condition of partial shielding are better extracted; and finally, replacing a loss function of YOLOv9 with MPDIOU, and evaluating the overlapping degree between the targets more accurately. The dead chicken detection method provided by the invention solves the problems of low automation degree of dead chicken inspection, time and labor waste of manual inspection and the like in a large-scale breeding environment, not only ensures high-efficiency detection speed, but also remarkably improves the precision of target detection, and can meet the requirement for real-time detection of dead chickens in actual production.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of dead chicken detection and computer deep learning technology, and in particular to a dead chicken detection method based on image fusion and improved YOLOv9. Background Art

[0002] Chicken is the second largest meat consumption product in my country after pork. With the continuous improvement of people's requirements for food safety and quality, my country's broiler industry is gradually transforming and upgrading towards intelligence and greenness. At present, most domestic farms adopt a multi-layer cage model with high stocking density. Most of them still rely on manual inspections to find and remove dead chickens. There are problems such as high work intensity and strong subjectivity. There will also be visual fatigue caused by long working hours of breeding staff, which will lead to the retention of dead chickens. If dead poultry is not handled in time, a large number of pathogens will be generated, and it may cause serious risks of disease transmission, such as large-scale influenza epidemics.

[0003] In recent years, non-contact dead chicken identification technology has made significant progress, mainly including sound monitoring methods and machine vision methods. The sounds made by poultry can reflect their health and emotional state, and thus identify dead chickens, but the recognition accuracy of the sound monitoring method is relatively low due to the influence of the noise of the chicken flock. The machine vision method identifies the behavior or state of chickens through image analysis, which is highly efficient and accurate. Infrared imaging technology combined with neural networks has realized a dead chicken self-identification system based on machine vision; the research on poultry posture estimation systems and the combination of morphological features and machine learning algorithms has significantly improved the accuracy of dead chicken identification. Despite this, the complexity of the breeding environment and technical limitations are still challenges to improving the current recognition accuracy.

[0004] In multi-layer cage chicken monitoring, the fusion of infrared and visible light images is the key to improving the accuracy of dead chicken detection. Infrared images capture temperature distribution, while visible light images provide morphological and color details. The fused image can significantly enhance the integrity of the model input and improve the robustness of detection. Image fusion technology is divided into traditional methods and deep learning methods. Traditional methods are mainly divided into pixel operations, transform domains, image decomposition, and energy functions. Although they are effective in specific situations, they are limited by artificial strategies and have limited adaptability. Deep learning methods, such as the image fusion framework of generative adversarial networks, the image fusion framework of convolutional neural networks, and the image fusion framework of autoencoders, can provide more flexible fusion strategies. The complex lighting, multi-layer structures and obstacles in the farm, as well as the occlusion between chickens, lead to uneven lighting, which affects the accuracy of dead chicken recognition. The progressive image fusion technology based on illumination perception (PIAFusion) dynamically adjusts the fusion parameters to adapt to different lighting conditions, effectively reduces the impact of uneven lighting, and better adapts to complex lighting environments, providing a progressive and adaptable image fusion solution for dead chicken detection.

[0005] In the field of target detection, algorithms are mainly divided into two categories: single-stage and dual-stage. The representative of the dual-stage target detection algorithm is the region-based convolutional neural network (R-CNN) and its derivative algorithms. The single-stage algorithm has an advantage in real-time applications with its fast and accurate detection capabilities. Since its launch in 2015, the YOLO series has continuously optimized its structure and performance through continuous iterations. YOLOv9, released in February 2024, contains four main structures: Backbone, Neck, Head, and auxiliary branches. Through the innovation of key structures, it solves the information bottleneck problem in deep learning and significantly improves the detection speed and performance.

[0006] The current dead chicken detection technology faces many challenges, mainly including: 1. Existing dead chicken identification technology mainly relies on images from a single source, such as thermal infrared imaging or visible light images. In high-density breeding scenarios, the presence of structures such as multi-layer chicken cages, baffles and water troughs has a significant impact on the distribution of light, which may make it difficult for the target detection algorithm to distinguish between actual dead chickens and visual errors caused by the environment, greatly increasing the risk of misidentification of dead chickens. 2. Traditional dead chicken detection methods have high false positive and missed detection rates when dead chickens are occluded by other live chickens. Traditional dead chicken detection methods usually rely on morphological features and texture information in images. When dead chickens are occluded by other live chickens, these features cannot be effectively captured. They are not robust enough when dealing with occlusion and complex backgrounds, resulting in a significant increase in false positive and missed detection rates. 3. When the target detection algorithm generates overlapping regression boxes for multiple dead chickens, the false positive and missed detection rates are high. Especially in high-density breeding environments, there is a large amount of mutual occlusion or partial overlap between the target dead chickens, which causes the detection algorithm to generate overlapping regression frames and cannot accurately cover the entire body of each dead chicken, thus affecting the accuracy and reliability of the detection. Summary of the invention

[0007] The problem to be solved by the present invention is to provide a dead chicken detection method based on image fusion and improved YOLOv9, taking broiler farming in a stacked cage mode as the research object, using image fusion technology to align and fuse thermal infrared images with visible light images, and realizing the identification of dead chickens through a target detection algorithm, thereby achieving higher efficiency and accuracy.

[0008] The present invention adopts the following technical solution: a dead chicken detection method based on image fusion and improved YOLOv9, comprising the following steps:

[0009] S1. Collect chicken cage image data, use a progressive image fusion method based on lighting perception to fuse visible light with infrared light, improve the significance of dead chicken target features, and eliminate the impact of uneven lighting caused by multi-layer chicken cages, baffles, and water tank structures;

[0010] S2. Build a dead chicken detection model based on the YOLOv9 target detection algorithm, introduce the EMA attention mechanism into the YOLOv9 neck, perform exponential smoothing on the model parameters, distinguish between low-light environments and dead chicken targets, and fuse targets of different sizes;

[0011] S3, introduce the Rep-DCNv3 module into the dead chicken detection model, enhance the backbone feature extraction network, and extract the features of dead chickens under partial occlusion;

[0012] S4. MPDIoU is used to replace the loss function of YOLOv9. By evaluating the degree of overlap between targets, it provides more fine-grained error feedback and improves the detection accuracy of the dead chicken detection model.

[0013] Specifically, in step S1, the progressive image fusion method based on illumination perception, the backbone network is constructed in an end-to-end CNN framework, including a feature extractor and an image reconstructor;

[0014] The feature extractor is used to mine the complementary and common features of infrared images and visible light images. The structure includes five convolutional layers. The first layer uses a 1×1 convolutional layer to process the infrared image and the visible light image respectively to reduce the difference between images of different modalities. The second to fifth layers use four convolutional layers with shared weights to extract the deep features of the infrared and visible light images respectively.

[0015] The deep features extracted from the infrared image and the visible light image are aggregated and connected and input into the image reconstructor. The image reconstructor consists of five convolutional layers without introducing downsampling. The size of the fused image is consistent with the source image. It is used to integrate common and complementary information to generate a fused image to adapt to the complex lighting environment caused by multi-layer chicken cages, baffles, and sinks.

[0016] Furthermore, a CMDAF module is introduced after the second layer, the third layer and the fourth layer of the feature extractor respectively to comprehensively extract the features of the infrared and visible light images and realize the exchange of modal complementary features.

[0017] Specifically, in step S2, the EMA attention mechanism is used to enrich the feature extraction and attention weight allocation of the dead chicken detection model at different scales, and the specific method is as follows:

[0018] S2.1. When the live chicken occludes the dead chicken, convolution operations are performed by using convolution kernels of different sizes to adapt to semantic information at different levels and capture multi-scale features. Smaller convolution kernels are used to extract edge and texture detail features, while larger convolution kernels are used to identify large-scale patterns and shapes in the image.

[0019] S2.2, introduce the attention module, learn and evaluate the contribution of each scale feature through a lightweight network architecture, and realize dynamic weighting of features;

[0020] S2.3, integrated subsampling method, reduces feature dimensions by downsampling, reduces the amount of computation and ensures the integrity and accuracy of feature representation;

[0021] S2.4. In the feature fusion stage, the weighted multi-scale features are integrated, the multi-scale features are retained, and the model's recognition ability of key information is strengthened through the weighting mechanism to form the final feature representation, thereby reducing the missed detection of dead chicken targets caused by live chickens, reducing the interference of live chickens and chicken cage backgrounds on the dead chicken detection model, and improving the accuracy and robustness of detection;

[0022] S2.5. Reduce information loss and confusion in the feature extraction process by optimizing information processing, and enhance the model to extract and utilize key information to improve adaptability to complex environments and the accuracy of detection results.

[0023] Specifically, in step S3, the Rep-DCNv3 module replaces the convolution kernel in the RepNCSPELAN module of the YOLOv9 algorithm by DCNv3 in the Backbone feature extraction network to capture the features of the dead chicken detection model when processing heavily occluded targets;

[0024] The DCNv3 dynamically adjusts to adapt to the target shape through an adaptive convolution kernel. When a dead chicken is occluded by a live chicken, it can accurately capture the target features and improve the recognition ability of the occluded target. Through the DCNv3 offset prediction network, the adaptability to the target position and shape changes is enhanced, and the detection accuracy is improved. By optimizing the bilinear interpolation to linear interpolation on the axis, the amount of calculation is reduced and information distortion caused by interpolation is avoided.

[0025] Furthermore, the Rep-DCNv3 module has a network structure including LN, FFN and GELU components, and convolutional and downsampling layers for obtaining hierarchical feature maps.

[0026] First, the input multi-scale feature data is subjected to preliminary feature extraction through convolution, and then dynamically adjusted through the adaptive convolution kernel in Rep-DCNv3 to adapt to the target shape and accurately capture the target features, especially when the dead chicken is occluded by the live chicken.

[0027] Subsequently, the feature map is processed by FFN and GELU to enhance the nonlinear expression ability and is normalized by LN to stabilize the training process.

[0028] Finally, the spatial dimension of the feature map is gradually reduced through the downsampling layer, while the depth of the feature map is increased to capture more abstract feature representations for visual task processing, thus obtaining high-dimensional feature representations for target detection. These features are then used for the accurate identification and positioning of dead chicken targets.

[0029] Furthermore, the Rep-DCNv3 module involves an offset prediction network and a deformable convolution operation, which first predicts the offset of the input position and then performs an adaptive convolution operation based on the offset. The principles are as follows:

[0030]

[0031] Where H represents the total number of aggregation groups; k h represents the position-independent projection weight of the hth group; q hm represents the modulation scalar of the mth sampling point in the hth group; x h represents the input feature map of the slice; Δr hm Represents the grid sampling position r in the mth group m The corresponding offset; y(r0) represents the output.

[0032] Specifically, in step S4, the MPDIoU is an improved IoU measurement method, which is used to accurately evaluate the degree of overlap between targets in a high-density farming environment, balance the detection performance between different categories, and reduce overfitting of the majority class, including the following sub-steps;

[0033] S4.1. By considering the partial overlap and distance information between the target dead chickens, the matching degree MPDIoU of the target box is evaluated and calculated as follows:

[0034]

[0035] Where w and h are the width and height of the input image; A and B are two arbitrary convex shapes, d1 is the Euclidean distance from the upper left corner of shape B to the upper left corner of shape A, and d2 is the Euclidean distance from the lower right corner of shape B to the lower right corner of shape A; are the upper left corner coordinates and lower right corner coordinates of A respectively, They are the upper left corner coordinates and lower right corner coordinates of B respectively;

[0036] S4.2. Based on MPDIoU, the loss function is defined as follows:

[0037] L MPDIoU =1-MPDIoU

[0038] S43. During the dead chicken detection model training process, by introducing MPDIoU loss, we learn a more accurate target box positioning strategy, generate more accurate detection results, and enhance the dead chicken detection model’s adaptability to complex scenarios.

[0039] The technical solution of the present invention also provides: an electronic device, comprising:

[0040] one or more processors;

[0041] a storage device having one or more programs stored thereon;

[0042] When the one or more programs are executed by the one or more processors, the one or more processors implement any of the above-mentioned dead chicken detection methods based on image fusion and improved YOLOv9.

[0043] The technical solution of the present invention also provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps in any of the above-mentioned dead chicken detection methods based on image fusion and improved YOLOv9 are implemented.

[0044] Compared with the prior art, the present invention adopts the above technical solution and has the following technical effects:

[0045] 1. The present invention is based on a dead chicken detection method based on image fusion and improved YOLOv9. It takes broiler farming in a stacked cage mode as the research object. Aiming at the dead chicken detection task of caged chickens, the existing technology has the shortcomings of low dead chicken recognition accuracy, and designs a dead chicken detection method based on multi-source information fusion.

[0046] 2. The method of the present invention adopts PIA Fusion to fuse visible light images and infrared images, effectively solving problems such as uneven illumination and complex background. At the same time, the EMA (Exponential Moving Average) attention mechanism is integrated into the target detection algorithm to distinguish low-light targets such as chicken cage baffles and waterers from dead chicken targets, and realize the fusion of targets of different sizes.

[0047] 3. The method of the present invention introduces the Rep-DCNv3 module in the feature extraction stage of target detection to effectively extract the features of dead chickens occluded by live chickens. This innovative module solves the problem that traditional methods are difficult to accurately detect dead chickens when they are occluded, and significantly improves detection accuracy and robustness.

[0048] 4. The method of the present invention adopts MPDIoU (Modified Partial Distance-IoU) technology as the loss function of the target detection algorithm, which can more accurately evaluate the degree of overlap between targets, balance the detection performance between different categories, reduce the overfitting of the model to the majority class, and improve the detection ability of the minority class (such as dead chickens). BRIEF DESCRIPTION OF THE DRAWINGS

[0049] Figure 1 This is a structural diagram of the dead chicken detection model framework of the present invention;

[0050] Figure 2 This is a structural diagram of the image fusion module of the present invention;

[0051] Figure 3 This is a GELAN network structure diagram in the YOLOv9 algorithm of the present invention;

[0052] Figure 4 This is a diagram of the Rep-DCNv3 network structure of the present invention;

[0053] Figure 5 This is a structural diagram of the improved YOLOv9 target detection module of the present invention;

[0054] Figure 6 This is a comparison result diagram of three evaluation indicators in the embodiment;

[0055] Figure 7 Improved YOLOv9 model heat map result diagram for the embodiment;

[0056] Figure 8 This is the heat map result of the original YOLOv9 model in the embodiment. DETAILED DESCRIPTION

[0057] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the application is further elaborated in detail below in conjunction with the accompanying drawings. The described embodiments are only a part of the embodiments involved in the present invention. All non-innovative embodiments of other researchers in the field on this embodiment belong to the protection scope of the present invention. At the same time, for the step numbering in the embodiment of the present invention, it is only set for the convenience of explanation, and the order between the steps is not limited in any way. The execution order of each step in the embodiment can be adaptively adjusted according to the understanding of those skilled in the art.

[0058] Aiming at the task of detecting dead chickens in cages, the present invention proposes an innovative improved YOLOv9 model, which uses multi-source information fusion technology to solve the problem of uneven lighting in farms.

[0059] First, the PIA Fusion (Progressive Image Fusion Based on Illumination) method is used to fuse visible light with infrared light to improve the saliency of the target features of dead chickens, so as to overcome the problem of uneven lighting caused by structures such as multi-layer chicken cages, baffles, and water tanks. This fusion enhances the overall brightness and contrast of the image by comprehensively utilizing information from multiple light sources, thereby improving the robustness and detection accuracy of the model under complex lighting conditions.

[0060] Secondly, based on the YOLOv9 target detection algorithm, a dead chicken detection model was built. In order to further enhance the model performance, the EMA attention mechanism was introduced into the neck of YOLOv9. By performing exponential smoothing on the model parameters, it effectively distinguished low-light targets such as chicken cage baffles and waterers from dead chicken targets, and achieved the fusion of targets of different sizes. This technology not only optimized the stability of the model, but also improved the detection capabilities of various targets.

[0061] Then, the Rep-DCNv3 module was introduced into the feature extraction network of the dead chicken detection model to enhance the backbone feature extraction network to ensure that the features of dead chickens can be effectively extracted even if they are occluded by live chickens. This solves the problem that traditional methods are difficult to accurately detect dead chickens when they are occluded, and significantly improves the accuracy of dead chicken detection.

[0062] Finally, in the selection of loss function, the MPDIoU loss function is used as the core loss function of the algorithm to replace the loss function of YOLOv9. The MPDIoU loss function provides more fine-grained error feedback by more accurately evaluating the degree of overlap between targets, thereby improving the detection accuracy of the model.

[0063] The dead chicken detection model of the present invention has an overall framework as follows: Figure 1 As shown in the figure, the innovation and superiority of the caged chicken dead chicken detection task are demonstrated. By introducing the Rep-DCNv3 module and the EMA attention mechanism, it shows significant advantages in processing occluded targets and fusing targets of different sizes, bringing a new solution to the caged chicken dead chicken detection task. It not only improves the accuracy of dead chicken detection, but also provides a new technical approach for the caged chicken dead chicken detection task. The specific method is as follows:

[0064] (1) The present invention adopts the PIA Fusion (Progressive Image Fusion Based on Illumination) method for image processing, aiming to improve the quality and usability of images in environments with uneven lighting conditions.

[0065] In the task of detecting dead caged chickens, PIA Fusion technology achieves efficient fusion of visible light and infrared light images by comprehensively considering scene lighting characteristics and image content, significantly enhancing the robustness of the detection system.

[0066] The core advantage of PIAFusion technology lies in its progressive fusion strategy, which first comprehensively evaluates the lighting conditions of the input image, identifies areas with uneven lighting, and optimizes them in a targeted manner. PIAFusion uses a multi-scale analysis method to decompose the image into different scale levels and implements a customized fusion strategy for each level to adapt to the complex lighting environment caused by multi-layer chicken cages, baffles, sinks, etc.

[0067] The image fusion module of the present invention is as follows Figure 2 As shown in the figure, the PIAFusion backbone network is built on an end-to-end CNN-based framework and mainly consists of two key components: feature extractor and image reconstructor.

[0068] The feature extractor aims to deeply mine the complementary and common features of infrared images and visible light images, and its structure includes five convolutional layers. In order to mitigate the differences between images of different modalities, a 1×1 convolutional layer is used in the initial stage to process infrared images and visible light images respectively. Secondly, four convolutional layers with shared weights are used to extract the deep features of infrared and visible light images respectively.

[0069] In particular, the present invention introduces CMDAF modules after the second layer, the third layer and the fourth layer respectively to realize the exchange of modal complementary features.

[0070] The introduction of the CMDAF module enables the network to gradually integrate complementary information in the feature extraction stage, thereby comprehensively extracting the features of infrared and visible light images.

[0071] Subsequently, the deep features extracted from the two images are pooled and concatenated as the input of the image reconstructor. The image reconstructor consists of five convolutional layers, whose task is to fully integrate common and complementary information to generate the final fused image. To avoid information loss during the image fusion process, no downsampling is introduced in the network, and the size of the fused image is kept consistent with the source image.

[0072] (2) The present invention constructs a dead chicken detection model based on the YOLOv9 target detection algorithm, and performs dead chicken detection mainly based on the color information difference between dead chickens and live chickens in the fused image.

[0073] First, the YOLOv9 target detection algorithm, based on YOLOv8 and YOLOv5, has made in-depth innovations and optimizations to the information bottleneck problem in deep learning, effectively solving the loss of inter-layer data transmission and alleviating the problems of slow convergence and unstable results. YOLOv9 introduces the Generalized Efficient Layer Aggregation Network (GELAN) and Programmable Gradient Information (PGI) control framework based on YOLOv8.

[0074] The GELAN inherits and optimizes the advantages of CSPNet and ELAN. The network structure is as follows: Figure 3 As shown in the figure, by integrating various computing modules, the flexibility and accuracy of the model are significantly improved. The design of GELAN optimizes the inference time and significantly improves the overall detection accuracy of the model.

[0075] As an auxiliary structure, the PGI control framework optimizes the information flow path through the synergy of three sub-units, alleviates the impact of information bottlenecks, and thus improves the reasoning efficiency of the algorithm.

[0076] The YOLOv9 target detection algorithm not only solves the convergence problem in deep learning, but also significantly improves the operating efficiency and accuracy of the model. YOLOv9's decoupled head architecture and anchor-free strategy simplify the target detection process, reduce unnecessary calculations, and speed up target detection; at the same time, it uses task-specific loss functions designed for object classification and bounding box regression estimation, such as distribution focus loss (DFL) and complete IoU loss (CIoU), which further improves the accuracy of detection.

[0077] Then, the present invention makes important improvements in the Neck part of the YOLOv9 model through EMA (Efficient Multi-scale Attention Mechanism), which significantly enhances the model's ability to perceive and recognize multi-scale targets. The EMA attention mechanism effectively improves the model's ability to capture information of different scales in the image by combining multi-scale feature extraction and attention weight allocation, while maintaining the optimization of computational efficiency and resource consumption.

[0078] In the actual fusion image of the present invention, since low-dark targets such as chicken cage baffles and waterers are prone to misidentification of dead chicken targets, the heavy occlusion of dead chickens by live chickens and the overlap of multiple dead chickens reduce the detection accuracy of the model.

[0079] The introduction of the EMA attention mechanism not only enriches the model's feature extraction at different scales, but also provides the model with a more comprehensive and detailed understanding of image content through the fusion of multi-scale information. This multi-dimensional feature integration strategy enables the model to more keenly capture local changes when dealing with complex scenes, such as when live chickens occlude dead chickens, thereby significantly improving the accuracy of target positioning.

[0080] The local and global attention mechanisms in the EMA module work together to finely perceive local features and integrate global contextual understanding, achieving precise focus on the target area. The introduction of this dual attention mechanism greatly reduces the problem of missed detection of dead chickens due to occlusion by live chickens, while also reducing the interference of live chickens and chicken cage backgrounds on model decision-making, further improving the accuracy and robustness of detection.

[0081] Furthermore, during the testing phase, the improved YOLOv9 model, with the help of the enhanced generalization capability of the EMA module, can effectively cope with changes in various scenes and target postures. This improvement in generalization performance is not only reflected in the accurate recognition of known samples, but also in the adaptability to unknown or rare samples, ensuring the stability and reliability of the model in practical applications.

[0082] In addition, the EMA module optimizes the information processing flow and effectively reduces information loss and confusion during feature extraction. This optimization strategy not only avoids misjudgment caused by feature confusion, but also further improves the model's adaptability to complex environments and the accuracy of detection results by strengthening the model's extraction and utilization of key information.

[0083] The EMA attention mechanism of the present invention first performs convolution operations through a series of convolution kernels of different sizes to capture multi-scale features. These convolution kernels are specially designed to adapt to semantic information at different levels, where smaller convolution kernels are used to extract detailed features such as edges and textures, while larger convolution kernels are used to recognize large-scale patterns and shapes in images.

[0084] Subsequently, a series of carefully designed attention modules were introduced. These modules learn and evaluate the contribution of features at each scale through a lightweight network architecture, and dynamically weight the features. This weighting strategy not only enhances the model's sensitivity to significant features, but also effectively reduces the need to process redundant information, further improving computational efficiency.

[0085] Next, in order to further reduce computational complexity and memory consumption, subsampling technology is integrated. This is a technology that reduces feature dimensions by downsampling, which ensures the integrity and accuracy of feature representation while reducing the amount of computation.

[0086] In the feature fusion stage, the EMA mechanism integrates the weighted multi-scale features to form the final feature representation. This fusion not only retains the advantages of multi-scale features, but also strengthens the model's ability to identify key information through the weighting mechanism.

[0087] (3) The present invention introduces an improved solution of Rep-DCNv3 to address the limitations of traditional convolution when dealing with heavily occluded targets. When detecting dead chickens in an automated breeding environment, the problem of heavy occlusion has always been a key bottleneck for improving algorithm performance. When dealing with such problems, traditional convolutional neural networks are often limited by their fixed-shape convolution kernels and find it difficult to effectively capture the features of occluded targets. In order to solve this problem, the present invention proposes an improved solution of Rep-DCNv3, which aims to improve the performance of the YOLOv9 algorithm when dealing with heavily occluded targets.

[0088] In the YOLOv9 algorithm, on the one hand, the DCN (Deformable Convolutional Networks) based on the design of deformable convolution has brought revolutionary improvements to the traditional convolutional neural network. The flexibility of deformable convolution enables the network to learn the shape and position of input features more adaptively, thereby better capturing the relationship between features. On the other hand, the RepNCSPELAN module plays an important role in feature processing and fusion. However, in the face of the occlusion of dead chickens by live chickens, traditional convolution kernels have great limitations. This limitation is mainly manifested in the inaccurate feature extraction of the occluded target, resulting in a decrease in detection accuracy.

[0089] To address this problem, the present invention replaces the common convolution kernel in the RepNCSPELAN module with DCNv3, such as Figure 4 As shown in the figure, by integrating the Rep-DCNv3 module in the Backbone feature extraction network, advanced components such as LN, FFN and GELU are used, as well as convolutional stem and downsampling layers are used to obtain hierarchical feature maps, the network performance is improved, and the best solution is provided for the processing of visual tasks. Compared with the traditional central neural network, the basic block is closer to ViTs and is equipped with more advanced components. This design has shown excellent performance and flexibility in various visual tasks, so that the dead chicken detection model of the present invention can more effectively extract the features of occluded dead chickens to achieve more accurate feature capture of occluded targets.

[0090] Specifically, the adaptive convolution kernel of DCNv3 is one of its core advantages. By dynamically adjusting the convolution kernel to adapt to the shape of the target, it can more accurately capture the target features in complex environments. This adaptability significantly improves the model's ability to recognize occluded targets, especially when a dead chicken is occluded by a live chicken.

[0091] In addition, the offset prediction network of DCNv3 further enhances the model's adaptability to changes in target position and shape, thereby improving detection accuracy.

[0092] Furthermore, in order to improve the processing speed while maintaining high detection accuracy, the DCNv3 of the present invention introduces an innovative optimization strategy, which optimizes the network structure of the YOLOv9 algorithm by optimizing the bilinear interpolation to linear interpolation on the axis, and achieves a significant improvement in computational efficiency. It not only reduces the amount of calculation, but also avoids information distortion caused by interpolation, ensures the accuracy of the detection results, and significantly improves the performance of the model when dealing with heavily occluded targets.

[0093] The present invention introduces the Rep-DCNv3 module into the feature extraction network, involving an offset prediction network and a deformable convolution operation. By first predicting the offset of the input position and then performing an adaptive convolution operation based on these offsets, a more sophisticated processing of the input features is achieved, with better performance and robustness. The principles are as follows:

[0094]

[0095] Where H represents the total number of aggregation groups; k h represents the position-independent projection weight of the hth group; q hm represents the modulation scalar of the mth sampling point in the hth group; x h represents the input feature map of the slice; Δr hm Represents the grid sampling position r in the mth group m The corresponding offset; y(r0) represents the output.

[0096] (4) The MPDIoU loss function used in the present invention is used for bounding box regression. The core idea is to optimize the accuracy and efficiency of bounding box regression by considering the distance between the upper left corner and the lower right corner of the predicted bounding box and the true bounding box. This method comprehensively considers factors such as the position, size and shape of the bounding box, thereby more comprehensively evaluating the results of object detection.

[0097] The MPDIoU loss function independently calculates the average IoU of each category, which helps reduce the overfitting of the model to the training data and improves the generalization ability of the model. By introducing the MPDIoU loss function, the training process becomes more stable, the model can learn features more comprehensively, and thus achieve better detection results in complex environments.

[0098] In high-density farming environments, dead chickens often block each other or partially overlap, which poses a challenge to traditional target detection algorithms, making it difficult to accurately distinguish and locate each dead chicken. Traditional regression frames often cannot accurately cover the entire body of each dead chicken, especially when targets overlap, and detection algorithms are prone to misjudgment or omission. This overlapping phenomenon not only affects the accuracy of detection, but also reduces the interpretability of the results, making subsequent data processing and analysis more complicated.

[0099] To solve this problem, the present invention adopts MPDIoU technology as the loss function of the YOLOv9 algorithm. MPDIoU is an improved IoU measurement method that more accurately evaluates the matching degree of the target frame by considering the partial overlap and distance information between targets.

[0100] The advantage of MPDIoU technology lies in its sensitivity to overlapping targets and its ability to balance when dealing with targets of different categories. It can not only reduce the overfitting of the model to the majority category, but also improve the detection ability of the minority category (such as dead chickens). This balancing mechanism makes the model more robust and reliable when dealing with multi-target detection tasks in complex environments.

[0101] In the YOLOv9 algorithm, the traditional IoU loss function is replaced by the MPDIoU loss function, which significantly improves the model's detection performance for overlapping targets. By introducing the MPDIoU loss, the model can learn a more accurate target box positioning strategy during training, thereby generating more accurate detection results. This improvement not only improves the accuracy of detection, but also enhances the model's ability to adapt to complex scenes.

[0102] In summary, the improved YOLOv9 target detection module structure of the present invention is as follows: Figure 5 As shown in the figure, in the feature extraction network, the Rep-DCNv3 module is introduced to ensure that the features of the occluded dead chicken can also be effectively extracted. In addition, the EMA mechanism is introduced after the RepNCSPELAN4 module in the Neck part to better distinguish the target from the background. In terms of the choice of loss function, this study selects the MPDIoU loss function in view of the limitations of the traditional IoU loss function in dealing with overlapping or occluded targets. The MPDIoU loss function can more accurately evaluate the degree of overlap between targets, balance the detection performance between different categories, reduce overfitting of the majority class, and improve the detection ability of the minority class (such as dead chicken).

[0103] In one embodiment of the present invention, at the broiler promotion and demonstration base in Luji Village, Daxing Town, Suyu District, Suqian City, Jiangsu Province, a dead chicken detection test was conducted using the white-feathered broiler cage chicken industry as the test object. The cage chicken cage has four layers from top to bottom. The second layer of chicken cages was used to collect data during the test. The test data was collected in March 2024.

[0104] The images after registration and fusion were screened, and the images with poor quality were eliminated. Finally, 1,348 valid images were obtained. The annotated images were randomly divided into training set, validation set, and test set in a ratio of 8:1:1. According to the uncertainty of the position of the dead chicken target in the image, the image was scaled, flipped, and spliced ​​using Mosaic data enhancement, which enriched the training data and improved the robustness and generalization ability of the model.

[0105] In this embodiment, the hardware equipment and its configuration used in the experiment are as follows: Intel (R) Xeon (R) Bronze 3106 CPU, 62GB running memory, maximum frequency 1.7GHz; RTX 2080Ti graphics card (three), 36GB video memory. The experimental operating system is Ubuntu 20.04, the model framework is built based on PyTorch 1.8, and the Python version is 3.9.

[0106] We further use three indicators, namely, precision P (Precision), recall R (Recall) and mean average precision mAP@0.5 (mean average precision), to evaluate model performance. In addition, we use FPS to measure the model detection speed. FPS represents how many frames of images the algorithm can process in a unit of time (seconds). The higher the frame rate, the better the real-time performance of the algorithm.

[0107] This embodiment evaluates the detection speed by measuring the time required to process a single image, evaluates the model's ability to accurately identify dead chickens through the accuracy P, evaluates the model's coverage of dead chicken identification through the recall R, and the mean average precision mAP comprehensively processes P and R, and becomes a comprehensive indicator of model performance by considering the balance between detection accuracy and recall. mAP@0.5 refers to the average accuracy of each category at the intersection of Union (IoU of 0.5) threshold, and the calculation formula is as follows:

[0108]

[0109] Among them, TP is the number of true samples (true positives); FP is the number of false positive samples (false positives); FN is the number of false negative samples (false negatives); and C is the number of categories.

[0110] In order to comprehensively evaluate the performance of the algorithm proposed in the present invention, this embodiment selects a series of representative benchmark models for comparative experiments. These models include the original YOLOv9 model, YOLOv8 and YOLOv7, the classic target detection algorithms Faster-RCNN and SSD, and the EfficientDet model that realizes efficient convolutional neural network architecture through compound scaling method and network structure optimization. In addition, the large-scale model RT-DETR model with excellent performance in terms of the number of parameters and the DAMOYOLO model that can handle dynamically changing scenes and provide real-time target detection and tracking capabilities are also considered. In particular, Zhao Yiming et al. introduced the SE attention module and applied CIoU_Loss and DIoU_NMS to the original YOLOv5 model to construct an improved YOLOv5-SE model.

[0111] All these algorithm models are comprehensively compared with the algorithm proposed in this invention, and the experimental results are shown in Table 1 below:

[0112] Table 1: COMPARATIVE EXPERIMENTS OF DIFFERENT METHODS

[0113]

[0114] It can be seen that the dead chicken detection model of the present invention has achieved the highest performance in both mAP@0.5 value and P value, and is only slightly lower than the YOLOv5-SE model in R value. Compared with the initial YOLOv9 model, the proposed algorithm improves mAP@0.5, R and P values ​​by 3.4%, 6% and 4.8% respectively.

[0115] Through the analysis of Table 1, the FPS of EfficientDet, SSD, Faster-RCNN, and RT-DETR are significantly lower than those of other algorithms, and they also fail to reach the level of other evaluation models in mAP@0.5, which indicates that these models are difficult to meet the requirements of real-time detection speed and accuracy for real-time detection tasks. Compared with the YOLOv5-SE model, the proposed algorithm has higher mAP@0.5 value and P value than the YOLOv5-SE model. Although the R value is slightly lower by 0.3%, the FPS is slightly higher. Considering the detection accuracy and speed, the proposed model performs better. In addition, compared with YOLOv9, YOLOv8, and YOLOv7, the algorithm introduced in this study provides an improved trade-off between detection speed and detection accuracy. It is worth noting that although the FPS value of YOLOv8 is higher than that of the proposed algorithm, the proposed method improves the mAP value by 0.5% and the P value by 4.3%, which confirms the superior performance of the proposed algorithm in object detection.

[0116] Furthermore, in order to compare the impact of different structures on the detection performance, ablation experiments were conducted on the collected fusion data set. The experiments all used YOLOv9 as the basic model, added Rep-DCNv3 only to the backbone of YOLOv9 (YOLOv9+Rep-DCNv3), added EMA only to the NECK part of YOLOv9, used only MPDIoU technology as the loss function, used Rep-DCNv3 and EMA modules at the same time, and used Rep-DCNv3 and MPDIoU loss functions at the same time. The experimental results are shown in Table 2 below.

[0117] Table 2: ABLATION RESULTS

[0118]

[0119] From the analysis of Table 2, by comparing the experimental results of Group 7 (basic YOLOv9 model) and Group 6 (YOLOv9+Rep-DCNv3), it can be observed that adding the Rep-DCNv3 module alone significantly improves the mAP@0.5, R, and P values ​​of the model from 96.5%, 93.1%, and 94.4% to 97.4%, 96.3%, and 97.8%, respectively. This comparison shows that the Rep-DCNv3 module has a positive effect on improving detection accuracy. Further, by comparing the results of Group 6 with those of Group 1 (Ours), it is noted that when the Rep-DCNv3 module is used in combination with the EMA module and the MPDIoU loss function, the performance is further improved.

[0120] Specifically, mAP@0.5, R, and P values ​​increased from 97.4%, 96.3%, and 97.8% to 98.9%, 97.4%, and 99.2%, respectively. This shows that the combined use of the Rep-DCNv3 module with the EMA module and the MPDIoU loss function can achieve a complementary effect and further improve the detection performance. In addition, by comparing the results of Group ③ (YOLOv9+RepDCNv3+MPDIoU) and Group ④ (YOLOv9+MPDIoU), it is found that although the use of the MPDIoU loss function alone has a certain effect on performance improvement, it is not as significant as the Rep-DCNv3 module. The addition of the Rep-DCNv3 module has increased the mAP@0.5 and P values ​​from 96.8% and 95.4% to 97.7% and 98.1%, respectively, and the R value has also increased.

[0121] Finally, the comparison results of Group ② (YOLOv9+Rep-DCNv3+EMA) and Group ⑤ (YOLOv9+EMA) show that the addition of the Rep-DCNv3 module also improves the performance in the presence of the EMA module, with mAP@0.5, R and P values ​​increasing from 97.1%, 94.7%, 96.9% to 98.2%, 95.7%, 98.3%, respectively. The Rep-DCNv3 module shows its significant effect in improving detection performance in various combinations. Whether used alone or in combination with other improved components, the Rep-DCNv3 module can effectively improve the accuracy and robustness of target detection.

[0122] Furthermore, this embodiment quantifies the performance difference between the EMA attention mechanism and other advanced attention mechanisms in the target detection algorithm through a strict evaluation framework. To this end, YOLOv9 is selected as the benchmark model, and the selected attention mechanisms include Channel Attention (CA), Squeeze and-Excitation (SE), Convolutional Block Attention Module (CBAM), Efficient Channel Attention (ECA) and Normalization-based Attention Module (NAM). In the experimental design, all attention mechanisms are integrated into the position of the EMA mechanism to ensure the consistency and fairness of the evaluation. The relevant experimental results are listed in detail in Table 3 below:

[0123] Table 3: Experimental results of different attention mechanisms

[0124]

[0125] Among them, the CA mechanism aims to optimize the channel-level representation of features by emphasizing the importance and interdependence between channels; the SE mechanism further enhances the channel-level expression of features by recalibrating channel weights; the CBAM mechanism strengthens the cross-dimensional information of local features by combining spatial and channel attention, thereby improving the model's sensitivity to local features; the ECA mechanism uses global average pooling to capture the global spatial information between channels, providing strong support for channel-level reconstruction of features; the NAM mechanism dynamically adjusts the allocation of attention by adjusting the degree of standardization of features.

[0126] Experimental results show that although the CA module has a slight improvement in P value, its performance in mAP@0.5 is 0.3% lower than that of the original YOLOv9 model and 0.9% lower than that of the EMA module. The CBAM and SE modules are better than the EMA module in R value, but fail to surpass EMA in mAP and P value, further highlighting the advantages of the EMA mechanism in comprehensive performance. The ECA and NAM modules have not reached the performance level of the EMA module in many evaluation indicators.

[0127] Based on the experimental data, the integration of YOLOv9 and EMA shows excellent performance under the specific settings of the method of the present invention, achieving a mAP@0.5 value of 97.1% and a P value of 96.9%.

[0128] Furthermore, in the performance study of verifying the MPDIoU loss function, this embodiment selected two variants of the YOLOv9 model: the basic YOLOv9 model and the YOLOv9 model integrated with the proven effective EMA module. The two models applied the MPDIoU loss function respectively and were trained on the fused image dataset. The results are shown in Figure 2. Figure 6 shown.

[0129] Figure 6 The comparison results of three key evaluation indicators of the two models and their variants on the validation set are shown. Figure 6 (a) shows the mAP@0.5 indicator results. Figure 6 (b) shows the P index results. Figure 6 (c) in Figure 1 shows the Loss indicator results. By comparing curve 1 with curve 3, and curve 2 with curve 4, it can be observed that the use of MPDIoU loss function not only reduces the loss value, such as Figure 6 As shown in (c) in the figure, it also shows significant effects in improving mAP@0.5 and accuracy. This result shows that the MPDIoU loss function can more accurately quantify the degree of overlap between targets, thereby enhancing the overall performance of the detection algorithm. In addition, by comparing curve 1 with curve 2, and curve 3 with curve 4, it is further verified that the combination of this algorithm and the EMA module can improve the target detection performance under specific experimental settings.

[0130] Finally, in order to comprehensively evaluate the performance of this method in target detection, especially its ability to detect dead chicken targets in complex backgrounds, this example experiment uses a heat map visualization, such as Figure 7 and Figure 8 shown.

[0131] Figure 7 and Figure 8 The heat map results of the method of the present invention and the original YOLOv9 model are respectively displayed, which intuitively reflects the detection effects of the two models under different occlusion conditions.

[0132] exist Figure 7 and Figure 8 Figure (a) shows the heat map results of multiple dead chickens in the improved YOLOv9 model of the present invention and the original YOLOv9 model when the dead chickens are not severely occluded. It can be seen that the heat map of the method of the present invention, i.e. Figure 7 (a) in Figure 1 clearly highlights the dead chicken target area, which is highly consistent with the expected result, indicating that the model can accurately identify and locate the target. This is due to the integration of the EMA module, which significantly improves the model's ability to capture key features and reduces the interference of complex backgrounds through effective local and global attention mechanisms. In contrast, the heat map of the original YOLOv9 model, i.e. Figure 8 (a) in the figure shows excessive focus on the background, resulting in inaccurate detection of the dead chicken object. This shows that even when the occlusion is not severe, the original YOLOv9 model is still significantly disturbed by background factors.

[0133] exist Figure 7 and Figure 8 Figure (b) shows the heat map result in the case of severe occlusion by multiple dead chickens. In this more challenging scenario, the heat map of the method of the present invention, i.e. Figure 7 The middle image (b) still performs well, accurately identifying and locating each dead chicken, and the confidence level is over 0.9. This result is attributed to the introduction of the Rep-DCNv3 module, which accurately captures target features through adaptive convolution kernels, effectively solves the occlusion problem, and enhances the recognition ability of occluded targets. In contrast, the heat map of the original YOLOv9 model in the same scene, that is, Figure 8 (b) in Fig. 3 fails to achieve such a high confidence level, showing its inadequacy in handling scenes with severe occlusion.

[0134] In addition, this method uses the MPDIoU loss function in the case of multiple dead chickens, which further improves the accuracy of the regression box. The design of the MPDIoU loss function takes into account the partial overlap and distance information between objects, and more accurately evaluates the degree of overlap between objects, thereby providing a more effective training signal for the model. This is reflected in the heat map of this method. Even when multiple dead chickens occlude each other, the regression box can still accurately cover the entire body of each dead chicken. In summary, this method significantly improves the accuracy and robustness of dead chicken detection through the synergy of the EMA module and the Rep-DCNv3 module. At the same time, the application of the MPDIoU loss function further improves the accuracy of the regression box. These improvements enable this method to show significant performance advantages over the original YOLOv9 model in complex backgrounds and severe occlusions.

[0135] In summary, the present invention aims at the automation demand of dead chicken detection in large-scale breeding environments, and develops an efficient dead chicken detection method based on image fusion and improved YOLOv9 model. By adopting PIAFusion technology to fuse thermal infrared and visible light images, this method effectively improves the significance of dead chicken target features and solves the impact of uneven lighting on detection results. In addition, the introduction of the EMA attention mechanism significantly improves the model's ability to distinguish dead chicken targets in low-light environments, and enhances the accuracy and generalization of the model. Furthermore, the integration of the Rep-DCNv3 module strengthens the backbone feature extraction network, enabling the model to more accurately extract dead chicken features under partial occlusion.

[0136] Most importantly, the present invention uses the MPDIoU loss function to replace the original loss function of YOLOv9, which is more accurate in evaluating the degree of target overlap and further improves the detection performance. The accuracy of the experimental results reached 99.2%, and the mAP@0.5 value was as high as 98.9%, which is significantly better than other current advanced algorithms, verifying the superiority of the method of the present invention in the dead chicken detection task. Therefore, the proposed dead chicken detection method not only ensures efficient detection speed, but also greatly improves the demand for real-time detection of dead chickens in actual production. These results show that the proposed method has wide application potential in large-scale breeding environments and provides a reliable solution for automated dead chicken inspections.

[0137] The dead chicken detection model proposed in the present invention has shown excellent detection results in a multi-layer caged broiler chicken environment, providing a solid theoretical basis for automated dead chicken inspections. This achievement not only promotes the practice of welfare farming of caged chickens, but also provides technical support for large-scale farming management. In order to cope with more complex situations of occlusion between chickens, subsequent work will explore more advanced image registration and fusion technologies. Considering that the growth cycle of broilers is about 21 days, future research will be extended to the data set of chickens throughout their life cycle in order to obtain a more comprehensive performance evaluation. At the same time, in order to improve the overall performance of the monitoring system, future research will also consider synchronous detection of multi-layer chicken cages to achieve more efficient automated inspections. This research direction will provide new perspectives and solutions for improving the automatic detection method of dead chickens.

[0138] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A dead chicken detection method based on image fusion and improved YOLOv9, characterized in that: The steps include: S1. Collect chicken cage image data, use a progressive image fusion method based on lighting perception to fuse visible light with infrared light, improve the significance of dead chicken target features, and eliminate the impact of uneven lighting caused by multi-layer chicken cages, baffles, and water tank structures; S2. Build a dead chicken detection model based on the YOLOv9 target detection algorithm, introduce the EMA attention mechanism into the YOLOv9 neck, perform exponential smoothing on the model parameters, distinguish between low-light environments and dead chicken targets, and fuse targets of different sizes; S3, introduce the Rep-DCNv3 module into the dead chicken detection model, enhance the backbone feature extraction network, and extract the features of dead chickens under partial occlusion; S4. MPDIoU is used to replace the loss function of YOLOv9. By evaluating the degree of overlap between targets, it provides more fine-grained error feedback and improves the detection accuracy of the dead chicken detection model.

2. The dead chicken detection method based on image fusion and improved YOLOv9 according to claim 1 is characterized in that: In step S1, the progressive image fusion method based on illumination perception has a backbone network constructed in an end-to-end CNN framework, including a feature extractor and an image reconstructor; The feature extractor is used to mine the complementary and common features of infrared images and visible light images. The structure includes five convolutional layers. The first layer uses a 1×1 convolutional layer to process the infrared image and the visible light image respectively to reduce the difference between images of different modalities. The second to fifth layers use four convolutional layers with shared weights to extract the deep features of the infrared and visible light images respectively. The deep features extracted from the infrared image and the visible light image are aggregated and connected and input into the image reconstructor. The image reconstructor consists of five convolutional layers without introducing downsampling. The size of the fused image is consistent with the source image. It is used to integrate common and complementary information to generate a fused image to adapt to the complex lighting environment caused by multi-layer chicken cages, baffles, and sinks.

3. The dead chicken detection method based on image fusion and improved YOLOv9 according to claim 2 is characterized in that: A CMDAF module is introduced after the second, third and fourth layers of the feature extractor to comprehensively extract the features of infrared and visible light images and realize the exchange of modal complementary features.

4. The dead chicken detection method based on image fusion and improved YOLOv9 according to claim 1, characterized in that: In step S2, the EMA attention mechanism is used to enrich the feature extraction and attention weight allocation of the dead chicken detection model at different scales. The specific method is as follows: S2.

1. When the live chicken occludes the dead chicken, convolution operations are performed by using convolution kernels of different sizes to adapt to semantic information at different levels and capture multi-scale features. Smaller convolution kernels are used to extract edge and texture detail features, while larger convolution kernels are used to identify large-scale patterns and shapes in the image. S2.2, introduce the attention module, learn and evaluate the contribution of each scale feature through a lightweight network architecture, and realize dynamic weighting of features; S2.3, integrated subsampling method, reduces feature dimensions by downsampling, reduces the amount of computation while ensuring the integrity and accuracy of feature representation; S2.

4. In the feature fusion stage, the weighted multi-scale features are integrated, the multi-scale features are retained, and the model's recognition ability of key information is strengthened through the weighting mechanism to form the final feature representation, thereby reducing the missed detection of dead chicken targets caused by live chickens, reducing the interference of live chickens and chicken cage backgrounds on the dead chicken detection model, and improving the accuracy and robustness of detection; S2.

5. Reduce information loss and confusion in the feature extraction process by optimizing information processing, and enhance the model to extract and utilize key information to improve adaptability to complex environments and the accuracy of detection results.

5. The dead chicken detection method based on image fusion and improved YOLOv9 according to claim 1 is characterized in that: In step S3, the Rep-DCNv3 module replaces the convolution kernel in the RepNCSPELAN module of the YOLOv9 algorithm by DCNv3 in the Backbone feature extraction network to capture the features of the dead chicken detection model when processing heavily occluded targets; The DCNv3 dynamically adjusts to adapt to the target shape through an adaptive convolution kernel. When a dead chicken is occluded by a live chicken, it can accurately capture the target features and improve the recognition ability of the occluded target. Through the DCNv3 offset prediction network, the adaptability to the target position and shape changes is enhanced, and the detection accuracy is improved. By optimizing the bilinear interpolation to linear interpolation on the axis, the amount of calculation is reduced and information distortion caused by interpolation is avoided.

6. The dead chicken detection method based on image fusion and improved YOLOv9 according to claim 5 is characterized in that: The Rep-DCNv3 module has a network structure including LN, FFN and GELU components, as well as convolutional and downsampling layers for obtaining hierarchical feature maps. The processing method of the Rep-DCNv3 module is as follows: S3.1, the input multi-scale feature map is subjected to preliminary feature extraction through convolution, and then dynamically adjusted through the adaptive convolution kernel in Rep-DCNv3 to adapt to the target shape and capture the target features; S3.2, the feature map is sequentially processed by FFN and GELU to enhance the nonlinear expression ability, and is normalized by LN to stabilize the training process; S3.

3. The spatial dimension of the feature map is gradually reduced through the downsampling layer, and the depth of the feature map is increased to capture more abstract feature representations for visual task processing, thereby obtaining high-dimensional feature representations for target detection, which are used for accurate identification and positioning of dead chicken targets.

7. The dead chicken detection method based on image fusion and improved YOLOv9 according to claim 6 is characterized in that: The Rep-DCNv3 module involves an offset prediction network and a deformable convolution operation. It first predicts the offset of the input position and then performs an adaptive convolution operation based on the offset. The principles are as follows: Where H represents the total number of aggregation groups; k h represents the position-independent projection weight of the hth group; q hm represents the modulation scalar of the mth sampling point in the hth group; x h represents the input feature map of the slice; Δr hm Represents the grid sampling position r in the mth group m The corresponding offset; y(r0) represents the output.

8. The dead chicken detection method based on image fusion and improved YOLOv9 according to claim 1, characterized in that: In step S4, the MPDIoU is an improved IoU measurement method, which is used to accurately evaluate the degree of overlap between targets in a high-density farming environment, balance the detection performance between different categories, and reduce overfitting of the majority class, including the following sub-steps; S4.

1. By considering the partial overlap and distance information between the target dead chickens, the matching degree MPDIoU of the target box is evaluated and calculated as follows: Where w and h are the width and height of the input image; A and B are two arbitrary convex shapes, d1 is the Euclidean distance from the upper left corner of shape B to the upper left corner of shape A, and d2 is the Euclidean distance from the lower right corner of shape B to the lower right corner of shape A; are the coordinates of the upper left corner and lower right corner of A respectively, They are the upper left corner coordinates and lower right corner coordinates of B respectively; S4.

2. Based on MPDIoU, the loss function is defined as follows: L MPDIoU =1-MPDIoU S43. During the training process of the dead chicken detection model, by introducing the MPDIoU loss, a more accurate target box positioning strategy is learned to generate more precise detection results, thereby enhancing the adaptability of the dead chicken detection model to complex scenes.

9. An electronic device, characterized in that: include: one or more processors; a storage device having one or more programs stored thereon; When the one or more programs are executed by the one or more processors, the one or more processors implement the dead chicken detection method based on image fusion and improved YOLOv9 as described in any one of claims 1 to 8.

10. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the program is executed by a processor, the steps in the dead chicken detection method based on image fusion and improved YOLOv9 described in any one of claims 1 to 8 are implemented.

Citation Information

Patent Citations

  • Method for identifying dead chicken in infrared image cage based on improved YOLOv5 model

    CN115527234A

  • Visible light infrared image matching target detection method based on improved YOLOv7

    CN117292258A

  • Dead cage chicken detection method based on deep learning

    CN117831074A

  • Method for improving YOLOv8 network and application of method in strip steel surface defect detection

    CN118365599A

  • Substation equipment defect detection method and system based on improved YOLOv9

    CN118469986A

Cited By

  • Plant growth condition monitoring method, system and equipment and storage medium

    CN119478708A

  • Chicken sound recognition method under heat stress condition based on multi-domain feature fusion

    CN119920260A

  • Dead chicken detection method based on multi-scale reconstruction layer aggregation and feature compensation progressive fusion

    CN120412027A

  • Dead chicken detection method based on multi-scale reconstruction layer aggregation and feature compensation progressive fusion

    CN120412027B

  • Wild animal detection method fusing unmanned aerial vehicle thermal infrared image and visible light image

    CN121305621A