A dead chicken detection method for a cage chicken house, an electronic device and a storage medium

By constructing an RGB image dead chicken detection model without supplementary light source, the problem of insufficient detection stability in caged chicken houses was solved, realizing low-cost, low-interference automated dead chicken detection and improving the stability and reliability of detection results.

CN122676317BActive Publication Date: 2026-11-10ZHEJIANG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202611177736.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-08-05
Publication Date
2026-11-10
Estimated Expiration
2046-08-05

Smart Images

  • Figure CN122676317B_ABST
    Figure CN122676317B_ABST
Patent Text Reader

Abstract

The application discloses a kind of dead chicken detection methods and electronic equipment and storage medium for cage chicken house, comprising: under the condition of no supplementary light source, the RGB image or RGB video of the chicken cage to be measured is collected, the image is labeled after screening, and a dataset is obtained;Dead chicken detection model is constructed;According to the dataset, the dead chicken detection model is trained to obtain a teacher model, and the student model is obtained by channel compression and mask-based generative feature distillation method on the teacher model;The continuous video frames of the collected chicken cage to be measured are input into the student model, the state information of each frame image is obtained, and the state information is matched, tracked and accumulated to confirm the detection result of dead chicken target by using the dead chicken detection result time sequence confirmation algorithm based on target ID tracking.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent inspection and machine vision detection technology in livestock and poultry farming, and particularly to a method, electronic equipment and storage medium for detecting dead chickens in caged chicken houses. Background Technology

[0002] With the increasing scale and intensification of egg-laying hen farming, the number of chickens in caged chicken houses is large and the stocking density is high. The timely detection and handling of dead chickens is of great significance for reducing the risk of disease transmission, ensuring the health of the flock, and improving the efficiency of farming management. Traditional dead chicken inspection mainly relies on manual labor, which has problems such as high labor intensity, low inspection efficiency, and untimely detection, making it difficult to meet the needs of modern farms for automated and intelligent inspection.

[0003] Existing methods for detecting dead chickens typically employ ordinary RGB cameras, thermal infrared cameras, depth cameras, or multimodal sensor fusion. However, ordinary RGB images are prone to issues such as weak target texture, blurred boundaries, and low contrast in low-light environments, usually requiring supplementary lighting to improve image quality; however, supplementary lighting may cause additional interference to the flock. While thermal infrared, depth camera, or multimodal fusion methods can mitigate the effects of low light to some extent, they suffer from high hardware costs, complex system structures, and significant challenges in calibration, deployment, and maintenance. Furthermore, obstructions from cage wires, egg strips, eggs, feed troughs, and the bodies of live chickens, coupled with the irregular postures of dead chickens, further complicate the detection process. Summary of the Invention

[0004] The purpose of this invention is to provide a method, electronic device and storage medium for detecting dead chickens in caged chicken houses, in order to solve the problems of insufficient detection stability of ordinary RGB image detection methods under conditions of low illumination, uneven lighting, target occlusion and irregular posture of dead chickens in caged chicken houses, the possibility that supplementary light sources may cause additional interference to the flock, and the high system cost, complex structure and difficult calibration, deployment and maintenance of thermal infrared cameras, depth cameras or multimodal sensor fusion methods.

[0005] A method for detecting dead chickens in caged chicken houses includes the following steps:

[0006] S1: Acquire RGB images or RGB videos of the chicken cage under test without supplementary light source conditions, filter the images and label them to obtain the dataset;

[0007] S2: Construct a dead chicken detection model;

[0008] The dead chicken detection model includes:

[0009] Light-sensing gated downsampling module;

[0010] The feature extraction backbone network is connected to the light-sensing gated downsampling module;

[0011] A cross-layer scale-interactive fusion network connected to the feature extraction backbone network;

[0012] The detection head is connected to the cross-scale interactive fusion network;

[0013] S3: Train a dead chicken detection model based on the dataset to obtain a teacher model. Then, use channel compression and a mask-based generative feature distillation method to obtain a student model from the teacher model.

[0014] S4: Input the continuous video frames of the chicken cage to be tested into the student model to obtain the state information of the chicken target in each frame. Use the dead chicken detection result temporal confirmation algorithm based on target ID tracking to match, track and accumulate the state information with the continuous video frames to obtain the detection result of the dead chicken target.

[0015] The method of this invention improves the adaptability to weak textures in dark areas, complex occlusions, and changes in the posture of dead chickens by using a dead chicken detection model suitable for low-light caged chicken house scenarios without relying on supplementary light sources, depth images, thermal infrared images, or multimodal sensor fusion. This enables low-cost, low-interference, and automated detection of dead chicken targets in caged chicken houses.

[0016] In step S2, the dead chicken detection model processes the input image in the following order: light-sensing gated downsampling, backbone feature extraction, cross-scale interactive fusion, and multi-scale detection output. Specifically, light-sensing gated downsampling enhances the effective response of dead chicken targets in low-light areas at the model's front end; the feature extraction backbone network extracts the spatial structural features of the chicken targets; the cross-scale interactive fusion network fuses texture, structural, and semantic information from different levels; and the detection head outputs the chicken target's bounding box, category, and confidence score based on the fused multi-scale features. Through this processing, the dead chicken detection model can improve the detection stability of weakly textured targets in dark areas, occluded targets, and targets with irregular postures in unlit caged chicken coop scenarios.

[0017] In step S2, the light-sensing gated downsampling module includes: a dual-exposure fusion module and a gated downsampling unit;

[0018] The dual exposure fusion module is used to perform dual exposure guidance processing on the input image to obtain light-perceived guidance features containing bright part structure information and dark part detail information;

[0019] The gated downsampling unit generates gate weights based on the light-sensing guided features, and applies the gate weights to the downsampling features of the input image to obtain light-sensing guided downsampling features.

[0020] The light-sensing gated downsampling module generates light-sensing guidance features that take into account both bright area structure information and dark area detail information through a dual-exposure fusion module. The gated downsampling unit then adaptively modulates the downsampling features of the input image based on these light-sensing guidance features. Through this processing, the light-sensing gated downsampling module can enhance the weak texture and boundary response of targets in dark areas during the early downsampling stage, reducing the loss of target information caused by low illumination, uneven lighting, and background noise.

[0021] In step S2, the feature extraction backbone network is a feature extraction backbone network with embedded spatial branches;

[0022] The spatial branch comprises an input downsampling layer, a deformable feature enhancement unit, and an output downsampling layer connected in sequence.

[0023] The spatial branch performs scale transformation on the features through the input downsampling layer, and adaptively adjusts the feature sampling position and response region according to the changes in the shape and spatial position of the chicken target through the deformable feature enhancement unit. Finally, it outputs the enhanced spatial features through the output downsampling layer. Through the above processing, the spatial branch can improve the adaptability of the feature extraction backbone network to dead chicken posture deformation, local occlusion and target overlap, and enhance the expression effect of the spatial structural features of dead chicken targets in complex cage rearing environments.

[0024] In step S2, the cross-scale interactive fusion network includes a feature channel alignment unit, a cross-scale interactive unit, and a multi-scale feature output unit connected in sequence.

[0025] The feature channel alignment unit is connected to the feature extraction backbone network and is used to receive backbone features at different levels and perform channel mapping on the backbone features at different levels to obtain detail features and semantic features.

[0026] The cross-scale interaction unit, after embedding semantic branches, is connected to the feature channel alignment unit to establish an interaction relationship between detail features and semantic features, thereby obtaining fused multi-scale features.

[0027] The multi-scale feature output unit is connected to the cross-layer scale interaction unit and is used to receive and output the fused multi-scale features.

[0028] The semantic branch comprises an input downsampling layer, a dynamic semantic feature enhancement unit, and an output downsampling layer connected in sequence.

[0029] The described cross-scale interactive fusion network maps backbone features at different levels through a feature channel alignment unit, placing features of different scales in a unified channel space. Cross-scale interaction units establish interaction relationships between detail features and semantic features, enabling shallow texture information, mid-level structural information, and deep semantic information to complement each other. A multi-scale feature output unit outputs the fused multi-scale features, thereby enhancing the model's ability to represent weakly textured dead chicken targets, partially occluded dead chicken targets, and chicken targets at different scales, improving the stability of dead chicken detection in low-light caged chicken coop scenarios.

[0030] The semantic branch performs scale transformation on the features through the input downsampling layer, adaptively adjusts the semantic response based on the contextual information of the input features through the dynamic semantic feature enhancement unit, and outputs the enhanced semantic features through the output downsampling layer. Through the above processing, the semantic branch can enhance the ability of the cross-layer scale interaction fusion network to distinguish the relevant regions of dead chicken targets and reduce the impact of interference information such as cage nets, egg strips, eggs, and live chicken background on the detection results.

[0031] In step S2, the detection head is a YOLO11n detection head, which is connected to the multi-scale feature output unit.

[0032] In step S4, the status information includes the location box, category, and confidence level.

[0033] In step S4, a dead chicken detection result temporal confirmation algorithm based on target ID tracking is used to match, track, and cumulatively confirm the state information and continuous video frames to obtain the detection result of the dead chicken target. Specifically, this includes:

[0034] The location bounding box of the chicken target in each frame image and the chicken features in consecutive video frames are assigned and associated with target IDs to establish the temporal trajectory of the same chicken target in multiple frames. The category and confidence of the chicken target in each image corresponding to the same target ID are accumulated and statistically analyzed. The final category of the target is determined by combining the number of consecutively appearing frames or the confirmation threshold, and finally the detection result of the dead chicken target is obtained.

[0035] The dead chicken detection result temporal confirmation algorithm based on target ID tracking integrates single-frame detection results belonging to the same chicken target in consecutive video frames into a temporal trajectory through target ID allocation and association. The final category is determined based on the cumulative category and confidence results of the same target ID across multiple frames. This process reduces the impact of misjudgments caused by low light, occlusion, pose changes, or fluctuations in detection confidence during single-frame detection, thus improving the stability and reliability of dead chicken target detection results.

[0036] In step S4, the confidence level includes the confidence level for live chickens and the confidence level for dead chickens.

[0037] In step S4, the detection result of the dead chicken target includes the dead chicken target's bounding box, category, confidence level, target ID, and corresponding video frame or image record.

[0038] An electronic device includes a processor and a memory, wherein the memory stores a computer program, and when the processor executes the computer program, it implements the aforementioned method for detecting dead chickens in caged chicken houses.

[0039] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the aforementioned method for detecting dead chickens in caged chicken houses.

[0040] Firstly, this application provides a method for constructing a lightweight dead-chicken detection model based on RGB images without supplemental lighting, including:

[0041] An initial dead chicken detection model based on an improved YOLO11 is constructed. The initial dead chicken detection model is used to receive an RGB image without supplemental lighting and output the bounding box, category, and confidence score of the chicken target. The category includes at least the live chicken category and the dead chicken category.

[0042] The initial dead chicken detection model includes an input layer, a backbone network, a feature fusion network, and a multi-scale detection output head; wherein, in the front-end downsampling stage of the backbone network, a DE-LGD light perception gated downsampling module is set to extract low-light perception features from RGB images without supplemental lighting and enhance the effective response of targets in dark areas;

[0043] A cross-scale interactive fusion module SCFM is set in the feature fusion network to perform channel alignment and cross-scale interactive fusion of features at different levels, so that shallow texture information and deep semantic information can interact within a short path.

[0044] A DDAE spatial-semantic dual-dimensional adaptive enhancement module is set in the initial dead chicken detection model. The DDAE spatial-semantic dual-dimensional adaptive enhancement module includes a DCNC3k2 structure and a DCC3k2 structure. The DCNC3k2 structure is set in the backbone network to enhance the model's spatial adaptability to dead chicken pose deformation, local occlusion, and target overlap. The DCC3k2 structure is set in the feature fusion network to enhance the model's semantic discrimination ability against cage nets, egg strips, eggs, and live chicken interference backgrounds.

[0045] The trained initial dead-chicken detection model is used as the teacher model, and channel compression is performed on the initial dead-chicken detection model to obtain the student model; wherein, during the channel compression process, the number of channels of the DE-LGD optical perception gated downsampling module remains unchanged, and channel compression is performed on the subsequent scalable feature extraction layer and feature fusion layer;

[0046] The student model is trained using a mask-based generative feature distillation method. Specifically, the intermediate feature layers corresponding to the teacher and student models are selected as distillation supervision layers. The intermediate features of the student model are randomly masked, and the masked student features are reconstructed using generative reconstruction units. The distillation loss is constructed based on the difference between the reconstructed student features and the corresponding layer features of the teacher model, enabling the student model to learn the feature representation ability of the teacher model under low light, occlusion, and weak texture target conditions.

[0047] After training, the teacher model and the generative reconstruction unit are removed, and only the trained student model is retained as a lightweight dead chicken detection model, which is used to detect live and dead chicken targets in RGB images without supplemental lighting.

[0048] In one possible implementation, the mask-based generative feature distillation method employs Masked Generative Distillation (MGD).

[0049] Secondly, this application provides a time-series verification method for dead chicken detection results based on target ID tracking, including:

[0050] An unlit RGB video of the chicken coop to be tested is acquired, and frames are extracted from the unlit RGB video at preset frame intervals to obtain a sequence of extracted images. Each extracted image in the sequence is input into a dead chicken detection model to obtain a single-frame dead chicken detection result for each extracted image. The single-frame dead chicken detection result includes the bounding box, category, and confidence score of the chicken target, and the category includes at least live chickens and dead chickens. The single-frame dead chicken detection result is input into a target tracking module, and based on the bounding box, category confidence score, and image features of the chicken target, the same chicken target in adjacent or consecutive extracted images is associated, and a target ID is assigned to the same chicken target. A trajectory record is established for each target ID, and the trajectory record includes at least the target ID. The system calculates the number of occurrence frames, current matching status, number of unmatched frames, cumulative confidence score for live chicken category, and cumulative confidence score for dead chicken category. When a target ID is successfully matched in the current frame, the system updates the occurrence frame number and current matching status of the target ID, and updates the cumulative confidence score for live chicken category or dead chicken category corresponding to the target ID based on the category and confidence score in the current frame. When a target ID is not successfully matched in the current frame, the system updates the number of unmatched frames for the target ID. When the number of unmatched frames exceeds the preset maximum number of frames to retain, the corresponding trajectory record is deleted. Based on the cumulative confidence scores for live chicken category and dead chicken category corresponding to the same target ID, the system determines the final category of the chicken target corresponding to the same target ID.

[0051] When the final category is the dead chicken category, and the cumulative confidence or average confidence corresponding to the dead chicken category meets the preset threshold, the dead chicken detection result is output; the dead chicken detection result includes target ID, dead chicken category, location box, confidence, first occurrence frame, sampling frame number, number of consecutive occurrence frames, and corresponding image record.

[0052] Thirdly, this application provides a low-interference, light-free dead chicken detection system for caged chicken houses, including an RGB camera, a processor, and a result output module;

[0053] The RGB camera is used to acquire RGB images or RGB videos of the chicken cage under test without supplementary light source conditions.

[0054] The Jetson Orin processor is equipped with a dead chicken detection model and a target tracking module. The dead chicken detection model is used to detect dead chickens in the RGB image or frame-by-frame images of the RGB video to obtain a single-frame dead chicken detection result. The target tracking module is used to associate the same chicken target in consecutive frames or frame-by-frame images, and to perform temporal confirmation based on the detection results of the same target ID in multiple frames.

[0055] The result output module is used to output the dead chicken detection results, which include target ID, dead chicken category, location box, confidence level, current sampling frame number, number of consecutive occurrence frames, and corresponding image records.

[0056] Compared with the prior art, the present invention, employing the above technical solution, has the following technical effects:

[0057] (1) The present invention uses RGB images or RGB videos acquired under conditions without supplementary light source as input, without relying on depth images, thermal infrared images or multimodal sensor fusion, which can reduce hardware costs, calibration complexity and deployment and maintenance difficulty, and reduce the additional interference that supplementary light source may cause to chicken flocks.

[0058] (2) This invention constructs a lightweight dead chicken detection model based on the improved YOLO11. It enhances the effective response of dead chicken targets in low-light areas through the light-sensing gated downsampling module, promotes the fusion of shallow texture information and deep semantic information through the cross-layer scale interaction fusion module, and improves the model's adaptability to dead chicken pose deformation, local occlusion, target overlap and complex background interference through the spatial-semantic dual-dimensional adaptive enhancement module. At the same time, a lightweight student model is obtained through channel compression and mask-based generative feature distillation training, thereby improving the stability and deployment applicability of dead chicken detection in low-light caged chicken coop scenarios while reducing the number of model parameters and computational load.

[0059] (3) This invention uses target ID tracking, trajectory recording and multi-frame category confidence accumulation to perform temporal confirmation of the same chicken target in continuous video or frame-by-frame images, which can reduce the impact of single-frame detection result fluctuations on the final judgment and improve the reliability of dead chicken detection results.

[0060] (4) The present invention can output the target ID, dead chicken category, location box, confidence level, first occurrence frame, sampling frame number, continuous occurrence frame number and corresponding image record through the model and program deployed on the processor, which facilitates subsequent dead chicken alarm, manual review, robot positioning or breeding management data recording. Attached Figure Description

[0061] Figure 1 This is a schematic diagram of the structure of a low-interference, light-free dead chicken detection system for caged chicken houses provided in an embodiment of the present invention.

[0062] Figure 2 The flowchart illustrates the dead chicken detection method based on RGB images without supplementary lighting provided in this embodiment of the invention.

[0063] Figure 3 This is a schematic diagram of the lightweight dead chicken detection model architecture based on the improved YOLO11 provided in an embodiment of the present invention.

[0064] Figure 4 This is a schematic diagram of the dual exposure fusion module (DEF) in the light-sensing gated downsampling module provided in an embodiment of the present invention.

[0065] Figure 5 A schematic diagram of the DCNC3k and DCC3k structures in the spatial-semantic dual-dimensional adaptive enhancement module provided in an embodiment of the present invention.

[0066] Figure 6 This is a visual diagram illustrating the feature response of the dead chicken detection model provided in an embodiment of the present invention.

[0067] Figure 7 This is a schematic diagram of the time-series result confirmation process for dead chicken detection based on target ID tracking, provided in an embodiment of the present invention.

[0068] Figure 8 This is a schematic diagram of the dead chicken detection result in an RGB image without supplementary lighting provided in an embodiment of the present invention.

[0069] In the picture: 1. Inspection platform, 2. Jetson Orin edge computing terminal, 3. RGB camera, 4. Chickens, 5. Stacked chicken cages. Detailed Implementation

[0070] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0071] This invention aims to automatically detect dead chickens in caged chicken houses using unlit RGB images without relying on supplementary light sources, depth images, thermal infrared images, or multimodal sensor fusion. The method improves the adaptability of the dead chicken detection model to dark areas with weak textures, complex occlusion, and changes in the dead chicken's posture by constructing a dead chicken detection model that integrates light perception, cross-scale interaction, and spatial-semantic adaptive enhancement. Furthermore, it enhances the stability and reliability of dead chicken detection results by performing target ID tracking and multi-frame category confidence accumulation to temporally confirm detection results in continuous video or sampled images.

[0072] In an exemplary embodiment, such as Figure 1As shown, the low-interference, light-free dead chicken detection system of the present invention can be deployed in the inspection channel of a stacked cage chicken house. The system includes an inspection platform 1, a Jetson Orin edge computing terminal 2, and an RGB camera 3; the figure also shows chickens 4 as the detection object and stacked chicken cages 5 as the application environment. The inspection platform 1 is located in the chicken house channel between the two stacked chicken cages 5 and can move along the channel according to a preset route; the Jetson Orin edge computing terminal 2 is installed on the inspection platform 1 and is used to complete the processing of light-free RGB video acquisition control, image caching, dead chicken detection model inference, target ID tracking, timing confirmation, and detection result output; the RGB camera 3 is installed on the vertical mounting bracket of the inspection platform 1 and faces the front opening area of ​​the stacked chicken cages 5, and is used to acquire RGB images or RGB videos of the chickens 4 in the cages without using supplementary light sources.

[0073] like Figure 2 As shown, the dead chicken detection method of the present invention mainly includes the following processing steps: RGB image acquisition without supplemental lighting, dead chicken detection model inference, target ID tracking and temporal confirmation, and detection result output. Specifically, RGB images or RGB videos of the chicken coop to be tested are acquired using an RGB camera; for the acquired RGB images, they are input into the dead chicken detection model to obtain the bounding box, category, and confidence score of the chicken target; for the acquired RGB videos, target ID tracking and multi-frame category confidence accumulation are further performed based on single-frame detection to confirm the final category of the same target in time; when the final category of the target is confirmed as a dead chicken, the corresponding detection result and image record are output.

[0074] Step 1: Acquire RGB images or RGB videos without supplemental lighting and construct dead chicken detection samples.

[0075] RGB images or videos of the chicken coop under test are acquired using an RGB camera under conditions without supplementary light source. These RGB images or videos serve as input data for subsequent training, validation, testing, and practical inference of the dead chicken detection model.

[0076] Step 1.1: Determine the image acquisition object and acquisition area.

[0077] Specifically, during the model training phase, to construct sample data containing both dead and live chicken targets, farm staff or inspectors first identify the rows, layers, or passageways where dead chickens are located. Then, a mobile inspection platform equipped with an RGB camera is deployed to the corresponding area for image acquisition. During the actual detection phase, the mobile inspection platform moves along the chicken house passageways according to a preset route and, upon reaching the area of ​​the chicken cage to be tested, continuously acquires unlit RGB video of the corresponding cage using the RGB camera.

[0078] During the data acquisition process, the RGB camera does not use supplementary light sources and only uses the original ambient light in the chicken coop for imaging, thereby avoiding interference from additional lighting on the flock.

[0079] Step 1.2: Acquire RGB video without supplemental lighting.

[0080] Specifically, the mobile inspection platform moves along the chicken coop aisle. Video acquisition begins when the RGB camera approaches the target chicken coop area and stops when the camera leaves. This method reduces video data from irrelevant areas, lowers data redundancy, and increases the effective proportion of dead chicken samples in the collected data.

[0081] Step 1.3: Filter valid images from the original video.

[0082] Specifically, since consecutive video frames during mobile inspections typically exhibit high similarity, directly using all consecutive frames as training samples can easily lead to data redundancy and potentially result in highly similar dead-end samples appearing simultaneously in the training, validation, and test sets, thus affecting the objectivity of model evaluation. Therefore, it is necessary to screen the collected original videos when constructing training samples.

[0083] In one specific implementation, the original video is manually or semi-automatically filtered in chronological order to remove blurry frames, frames without targets, duplicate frames, and consecutive highly similar frames. For a continuous frame sequence containing highly similar images, only one representative image is retained as a valid sample. The representative image should clearly show the chicken coop structure, the chicken target and its occlusion status, and reflect the typical posture and position of the dead chicken target in an actual cage environment.

[0084] Step 1.4: Annotate the valid images.

[0085] Specifically, the selected valid images are labeled with bounding boxes, including at least dead chicken targets and live chicken targets. For each valid image, the labelers draw bounding boxes for dead chicken targets and live chicken targets based on the state of the chickens in the image, and assign corresponding category labels. Dead chicken targets correspond to the dead chicken category, and live chicken targets correspond to the live chicken category.

[0086] In one specific implementation, the LabelImg annotation tool is used to manually annotate valid images. After annotation, an annotation file matching the training format of the object detection model is generated. The annotation file includes the object category, the center coordinates of the object's bounding box, the width of the object's bounding box, and the height of the object's bounding box. To adapt to the training of the object detection model, the object's bounding box coordinates can be further converted to a normalized coordinate format.

[0087] Step 2: Construct a dead chicken detection model.

[0088] After completing RGB image acquisition without supplemental lighting, effective image selection, and target annotation, a lightweight dead-chicken detection model for dead-chicken target detection is further constructed. For example... Figure 3 As shown, the dead chicken detection model in this embodiment is an improvement on the YOLO11 target detection network. It comprises an input terminal, a backbone network, a cross-layer scale interaction fusion network, a detection head, and an output terminal. Convolutional module 1 (CBS module), consisting of convolutional layers, batch normalization layers, and a SiLU activation function, is used for local feature extraction and channel transformation. Convolutional module 2 (CBSG module), consisting of convolutional layers, batch normalization layers, and a Sigmoid activation function, is used to generate a low-light-sensitive mask. Light-gated downsampling is achieved through the DE-LGD light-sensing gated downsampling module, and dual-exposure fusion uses the DEF dual-exposure fusion module. The spatial enhancement structure and semantic enhancement structure adopt the DCNC3k2 spatial adaptive enhancement structure and the DCC3k2 semantic adaptive enhancement structure, respectively, corresponding to the spatial branch and semantic branch in the DDAE spatial-semantic dual-dimensional adaptive enhancement module. The spatial enhancement unit and the semantic enhancement unit adopt the DCNC3k sub-module and the DCC3k sub-module, respectively. Figure 3 The branching in the code represents dividing the feature along the channel dimension. Figure 3 The feature concatenation in the text represents feature concatenation along the channel dimension. Figure 3 Upsampling in the text refers to the upsampling operation, used to adjust the spatial size of features at different levels. The cross-scale interactive fusion network employs an SCFM feature fusion network. Pyramid pooling uses the SPPF fast spatial pyramid pooling module to expand the receptive field and aggregate multi-scale contextual information; attention enhancement uses the C2PSA attention enhancement feature extraction module to enhance the high-level semantic feature expression capability; the multi-scale detection head uses the Detect module to output the bounding box, category, and confidence score of the chicken target based on the fused features. The dead chicken detection model takes an unlit RGB image as input, and after feature extraction from the light-sensing front end, spatial adaptive feature enhancement, cross-scale feature fusion, and semantic adaptive feature enhancement, it outputs the bounding box, category, and confidence score of the chicken target, where the category includes at least live chickens and dead chickens.

[0089] Specifically, the input receives an unlit RGB image captured by an RGB camera and feeds it into the backbone network. The backbone network first performs low-light perception processing on the input image using the DE-LGD light-sensing gated downsampling module. Subsequently, features are extracted step-by-step through the CBS module and multiple DCNC3k2 modules. The CBS module, consisting of convolutional layers, batch normalization layers, and the SiLU activation function, is used to extract basic convolutional features. The DCNC3k2 module, as the DDAE spatial augmentation part, enhances the model's adaptability to dead-chicken pose deformation, local occlusion, and target overlap in the shallow and mid-shallow stages of the backbone network.

[0090] The multi-layered features output from the backbone network are fed into the SCFM feature fusion network. The SCFM feature fusion network is used to fuse features at different scales output from the backbone network. The SCFM feature fusion network includes a CBS module, an Upsample module, a Concat module, and a DCC3k2 module; the Upsample module adjusts the spatial size of high-level features, the Concat module concatenates features from different levels, and the DCC3k2 module is embedded in the feature fusion network as a DDAE semantic enhancement branch. After processing by the SCFM feature fusion network, fused features at multiple scales are obtained.

[0091] After feature fusion is completed, the fused features from multiple scales are input into the corresponding detection heads. Each detection head outputs the bounding box, category, and confidence score of the chicken target, thus forming detection results for targets at different scales.

[0092] Step 2.1: Construct the DE-LGD light-sensing gated downsampling module.

[0093] Specifically, a DE-LGD light-sensing gated downsampling module is set in the front-end feature extraction stage of the lightweight dead-chicken detection model based on the improved YOLO11. This DE-LGD light-sensing gated downsampling module is used to extract low-light perception features from the unlit RGB image in the initial stage when the input image enters the backbone network. It also enhances the effective response of targets in dark areas through gating, thereby reducing feature loss in dead-chicken targets during early downsampling due to insufficient lighting, weak texture, and low local contrast.

[0094] In this embodiment, the DE-LGD light-sensing gated downsampling module includes a dual-exposure fusion module and a gated downsampling unit, such as... Figure 3 As shown. In Figure 4 In this context, "normalized input image" refers to... "Virtual exposure image" means "Exposure enhancement factor K" represents the exposure enhancement factor when generating a virtual exposure image from the input image; "Luminance component of the input image" and "Luminance component of the virtual exposure image" respectively represent and "Exposure weight matrix of input image" and "Exposure weight matrix of virtual exposure image" respectively represent and "Exposure tolerance coefficient σ" represents the exposure tolerance coefficient used to control the sensitivity of exposure weights to brightness deviations; "Weighted fusion operation" represents the adaptive fusion operation of the input image and the virtual exposure image based on the exposure weights; "Low-light enhancement feature" represents the feature obtained after weighted fusion. .

[0095] The dual-exposure fusion module is used to generate low-light enhancement features, and the gated downsampling unit is used to generate a low-light sensitive mask based on the low-light enhancement features and apply the low-light sensitive mask to the main branch features.

[0096] like Figure 4 As shown, the dual-exposure fusion module is a DEF module. Let the normalized input image be... First, a virtual exposure image is generated based on the input image. Used to simulate the visual response under long exposure conditions, it is represented as:

[0097]

[0098] Where K is the exposure enhancement coefficient, which is a learnable parameter used to adjust the enhancement intensity of the virtual exposure image. This represents an exponential function with the natural constant e as its base.

[0099] Then, according to the standard RGB to grayscale formula, the input images are calculated respectively. and virtual exposure images luminance component Its expression is:

[0100]

[0101] in, , , These represent the red, green, and blue channels of the corresponding image, respectively.

[0102] Furthermore, an exposure weight matrix is ​​generated based on the luminance components. , is represented as:

[0103]

[0104] in, The exposure tolerance coefficient is a learnable parameter used to control the sensitivity of the fusion process to changes in brightness.

[0105] After obtaining the exposure weights of the input image and the virtual exposure image, the weights are normalized, and the input image and the virtual exposure image are adaptively fused to obtain the low-light enhancement feature. ;

[0106]

[0107] in, , To prevent division by zero errors, a tiny constant, This indicates element-wise multiplication.

[0108] The DE-LGD light-sensing gated downsampling module further employs a dual-branch structure for feature modulation. The main branch performs convolutional encoding on the original input image or input features to obtain the main branch features. This is used to preserve the geometric structure and brightness distribution information in the original image; the gated branch enhances the low-light feature. As input, generate a low-light-sensitivity mask. , is represented as:

[0109]

[0110] in, The kernel size is ( A convolution operation with a stride of 2. This indicates a batch normalization operation. This step maps the output to the (0,1) interval and corresponds to the CBSG module.

[0111] Subsequently, a low-light sensitive mask was applied. Acting on main branch features The downsampled features after gating are obtained. :

[0112]

[0113] Furthermore, substituting the generation process of the low-light-sensitivity mask into the gate modulation process, we can obtain the overall feature modulation process of the DE-LGD light-sensing gated downsampling module, which is expressed as:

[0114]

[0115] Through the above-mentioned gating modulation, the DE-LGD light-sensing gating downsampling module can guide the network to pay more attention to the effective response related to the dead chicken target in the dark area during the front-end downsampling stage, while suppressing the interference of background areas, overly bright areas or irrelevant low-light noise on subsequent feature extraction.

[0116] Step 2.2: Construct the SCFM cross-scale interactive fusion module.

[0117] Specifically, a cross-scale interaction fusion module (SCFM) is set up in the feature fusion stage of the dead chicken detection model. This SCFM module performs channel alignment and cross-scale interaction fusion on features from different levels output by the backbone network, enabling shallow texture information, mid-level structural information, and deep semantic information to interact within a shorter path. This enhances the model's ability to represent occluded dead chicken targets, weakly textured dead chicken targets, and targets with scale variations.

[0118] Let the different levels of features output by the backbone network be respectively ,in( ) represents different scale levels in the feature pyramid. To eliminate the channel dimension differences between features at different levels, the SCFM cross-scale interactive fusion module first adopts ( Convolution ( Channel alignment is performed on features at different levels to obtain features in a unified channel space. , is represented as:

[0119]

[0120] Through the channel alignment operation described above, it is possible to , and Being situated in a unified feature channel space provides a foundation for subsequent cross-layer splicing and interactive fusion.

[0121] After completing channel alignment, the SCFM cross-layer scale interaction fusion module further constructs a cross-layer bidirectional interaction path. On the one hand, it integrates deep features... By directly upsampling to a shallow scale, we obtain the features transferred from deep semantic features to the shallow texture space. :

[0122]

[0123] in, This represents an upsampling operation with a scale factor of 4. This operation allows the highest-level semantic features to be directly transferred to the shallow feature space, thereby providing semantic guidance for small targets, partially visible targets, and occluded targets.

[0124] On the other hand, shallow features By downsampling to a deeper scale using large strides of convolution, we obtain features that feed back from shallow texture features to the deep semantic space. :

[0125]

[0126] in, The kernel size is ( A convolution operation with a stride of 4.

[0127] Building upon the aforementioned cross-layer interaction, the SCFM cross-layer scale interaction fusion module employs a multi-branch concatenation approach to aggregate features at different scales. Specifically, the output features of each level can be represented as:

[0128]

[0129]

[0130]

[0131] in, This indicates feature concatenation along the channel dimension. This indicates an upsampling operation with a scaling factor of 2. The kernel size is ( A convolution operation with a stride of 2. This represents the feature extraction block used for fusing and compressing spliced ​​features. In one specific implementation, C3k2 can be implemented using a DCC3k2 structure or other structures with feature fusion and semantic enhancement capabilities.

[0132] Through the aforementioned channel alignment, deep semantics directly reaching shallow layers, shallow texture feedback to deep layers, and multi-branch feature splicing, the SCFM cross-scale interaction fusion module enables short-path interaction relationships between features of different scales, avoiding semantic decay and detail loss caused by relying solely on the step-by-step transmission of adjacent layers, thereby improving the multi-scale detection capability of dead chicken targets in low-light caged chicken coop scenarios without supplemental lighting.

[0133] Step 2.3: Construct the DDAE space-semantic two-dimensional adaptive enhancement module.

[0134] Specifically, a DDAE spatial-semantic dual-dimensional adaptive enhancement module is set in the lightweight dead chicken detection model based on the improved YOLO11. The DDAE spatial-semantic dual-dimensional adaptive enhancement module includes a DCNC3k2 structure and a DCC3k2 structure; wherein, the DCNC3k2 structure, as a spatial adaptive enhancement structure, is set in the backbone network to enhance the model's adaptability to dead chicken pose deformation, local occlusion, and target overlap; the DCC3k2 structure, as a semantic adaptive enhancement structure, is set in the SCFM feature fusion network to enhance the model's ability to distinguish between cage netting, egg strips, eggs, and live chicken interference backgrounds.

[0135] The DCNC3k2 and DCC3k2 structures are embedded in the backbone network and feature fusion network of the improved YOLO11 dead chicken detection model, respectively. The DCNC3k2 spatial adaptive enhancement structure internally includes DCNC3k submodules, and the DCC3k2 semantic adaptive enhancement structure internally includes DCC3k submodules. Further, as... Figure 5 As shown, the spatial augmentation unit uses the DCNC3k submodule, and the semantic augmentation unit uses the DCC3k submodule; the spatial bottleneck unit uses the DCNBottleNeck submodule, and the semantic bottleneck unit uses the DCBottleNeck submodule; convolution module 1 uses the CBS module, and feature concatenation uses the Concat operation; deformable convolution uses the DCNv4 unit, which is used to adaptively adjust the feature sampling position according to the changes in the target shape and spatial position; dynamic convolution uses the Dynamic Conv unit, which is used to dynamically adjust the convolution response according to the context information of the input features; enabling residuals means enabling residual connections in the corresponding bottleneck unit; residual addition means adding the input features with the features after convolution transformation; n represents the number of repetitions of the spatial bottleneck unit or the semantic bottleneck unit.

[0136] Specifically, the DCNC3k submodule includes a CBS module, at least one DCNBottleNeck submodule, a Concat module, and another CBS module. After the input features undergo basic transformation by the CBS module, a portion of the features are fed into the DCNBottleNeck submodule for spatial adaptive feature extraction. These features are then concatenated with bypass features via the Concat module and fused through the CBS module to obtain spatially adaptive enhanced features. The DCNBottleNeck submodule includes a CBS module, a DCNv4 unit, and an Add residual connection. The DCNv4 unit adaptively adjusts the sampling position and spatial response weights based on the input features, enabling the model to better adapt to the distorted pose, local occlusion, and target overlap of the dead target.

[0137] Specifically, the DCC3k submodule includes a CBS module, at least one DCBottleNeck submodule, a Concat module, and another CBS module. After the input features undergo basic transformation by the CBS module, a portion of the features are fed into the DCBottleNeck submodule for semantically adaptive feature extraction. These features are then concatenated with the side-channel features via the Concat module and fused through the CBS module to obtain semantically adaptive enhanced features. The DCBottleNeck submodule includes a CBS module, a Dynamic Conv unit, and an Add residual connection. The Dynamic Conv unit dynamically adjusts the convolutional response based on the contextual information of the input features, enabling the model to enhance the semantic response related to the dead chicken target and suppress interference from cage netting, egg strips, eggs, and the live chicken background.

[0138] Through the above structure, the DDAE spatial-semantic dual-dimensional adaptive enhancement module achieves spatial adaptive enhancement in the backbone network through the DCNC3k2 structure, and semantic adaptive enhancement in the SCFM feature fusion network through the DCC3k2 structure, thereby improving the model's adaptability to changes in the morphology of dead chickens, occlusion, and complex background interference in the scenario of caged chickens without supplemental lighting.

[0139] Step 3: Train and lightweight the dead chicken detection model.

[0140] After completing the construction of the dead chicken detection model based on the improved YOLO11, the dead chicken detection model is further trained using the unlit RGB images labeled in step 1, and a lightweight dead chicken detection model suitable for actual deployment is obtained through channel compression and mask-based generative feature distillation.

[0141] Step 3.1: Train the initial dead chicken detection model.

[0142] Specifically, the annotated RGB images without supplemental lighting are used as training samples. The training samples include image files and their corresponding target annotation files. The target annotation files include the target category, the center coordinates of the target bounding box, the width of the target bounding box, and the height of the target bounding box. During training, the unlit RGB images are input into the initial dead-chicken detection model constructed in step 2. The category and location boxes in the target annotation files are used as supervision information to iteratively optimize the model parameters.

[0143] In one specific implementation, the input image size of the initial dead chicken detection model is set to 640×640, the training batch size is set to 16, the number of training epochs is set to 500, the optimizer is a stochastic gradient descent optimizer, the initial learning rate is set to 0.001, the momentum is set to 0.937, and the weight decay is set to 0.0005. The above training parameters are a preferred setting in this embodiment, and those skilled in the art can adjust them according to the data scale, computing device performance, and deployment requirements.

[0144] Step 3.2: Compress the channels of the initial dead chicken detection model to construct the student model.

[0145] Specifically, the trained initial dead-chicken detection model is used as the teacher model, and channel compression is performed on the initial dead-chicken detection model to obtain the student model. During the channel compression process, the number of channels in the DE-LGD optical perception gated downsampling module remains unchanged, and channel compression is performed on the scalable feature extraction layer and feature fusion layer after the DE-LGD module.

[0146] Maintaining the same number of channels in the DE-LGD module preserves the model's front-end's ability to perceive low-light, unlit images and prevents the weak texture features of dead targets in dark areas from being excessively weakened during compression. Channel compression of subsequent scalable feature extraction and feature fusion layers reduces the overall number of model parameters and computational cost. In one specific implementation, the width coefficient of the student model is set to half that of the teacher model.

[0147] Step 3.3: Train the student model using mask-based generative feature distillation.

[0148] Specifically, to reduce the decrease in feature representation capability caused by channel compression, this embodiment employs a mask-based generative feature distillation method to train the student model. This mask-based generative feature distillation method enables the student model to learn the intermediate feature representation capability of the teacher model under conditions of low illumination, occlusion, and weakly textured targets.

[0149] In one specific implementation, the intermediate feature layers corresponding to the teacher model and the student model are selected as distillation supervision layers. Let the feature output by the teacher model in the l-th distillation supervision layer be... The features output by the student model at the corresponding layer are For features Perform random masking to obtain the masked student features:

[0150]

[0151] in, Represents a random mask matrix. This represents element-wise multiplication. Subsequently, a reconstructed unit is generated. The student features behind the mask are reconstructed, and a distillation loss is constructed based on the difference between the reconstructed student features and the corresponding layer features of the teacher model.

[0152]

[0153] Where L represents the set of distillation monitoring layers, Indicates the mean square error loss. Represents the distillation loss weight. Generates reconstructed units. By two ( The system consists of a convolutional layer and a ReLU activation function, used to reconstruct the teacher model's feature representation from the partially masked student features. By minimizing the distillation loss, the student model learns the teacher model's ability to represent features in low-light regions, occluded targets, and weakly textured dead targets.

[0154] Step 3.4: Verification of model ablation effect.

[0155] To verify the impact of each functional module on the dead-chicken detection performance and model lightweighting effect in this embodiment, ablation experiments were conducted on the same dead-chicken detection dataset. The experiment used the YOLO11n model without the improved modules as the baseline model, and then introduced the DE-LGD optical perception gated downsampling module, the SCFM cross-layer scale interaction fusion module, the DDAE spatial-semantic dual-dimensional adaptive enhancement module, the channel compression strategy, and the mask-based generative feature distillation method in sequence. The results are shown in Table 1.

[0156] Table 1. Ablation test results of the lightweight dead chicken detection model in this embodiment.

[0157] Note: A indicates the introduction of the DE-LGD optical perception gated downsampling module; B indicates the adoption of the SCFM cross-layer scale interaction fusion module; C indicates the introduction of the DDAE spatial-semantic dual-dimensional adaptive enhancement module; D indicates the acquisition of a lightweight model through channel compression; E indicates the introduction of a mask-based generative feature distillation method during training.

[0158] As shown in Table 1, the model detection accuracy gradually improves after the DE-LGD, SCFM, and DDAE modules are introduced sequentially, indicating that these modules can enhance the feature representation ability of dead chicken targets in low-light scenes without supplemental lighting. After channel compression, the number of model parameters decreases from 2.6M to 0.6M, and the computational cost decreases from 6.3 GFLOPs to 2.7 GFLOPs. Further, after introducing mask-based generative feature distillation, the mAP of the lightweight model increases to 97.7%, indicating that this distillation training method can improve the model detection performance while maintaining lightweight design.

[0159] Furthermore, such as Figure 6 As shown, the feature responses of the baseline model YOLO11n and the dead chicken detection model proposed in this embodiment are visualized. Figure 6 In this document, "Input" refers to the input RGB image without supplemental lighting, YOLO11n represents the baseline detection model, and "Proposed Model" refers to the lightweight dead chicken detection model constructed in this embodiment. Compared with YOLO11n, the model proposed in this embodiment forms a more concentrated feature response in the dead chicken target area and reduces irrelevant responses from cage nets, egg strips, and background areas, thereby improving the detection stability of dead chicken targets under low illumination, occlusion, and weak texture conditions.

[0160] Step 4: Use the trained lightweight dead chicken detection model for video inference and perform time sequence confirmation based on target ID tracking.

[0161] After obtaining the trained lightweight dead chicken detection model, it is deployed on a processor or edge computing device for detecting dead chickens in RGB images or videos captured by an RGB camera without supplemental lighting. When the input is a single-frame RGB image, the lightweight dead chicken detection model directly outputs the bounding box, category, and confidence score of the chicken target; when the input is RGB video, it further combines a target ID tracking module to perform temporal confirmation of the same chicken target, such as... Figure 7 As shown.

[0162] Step 4.1: Acquire the video to be detected and perform frame extraction.

[0163] Specifically, RGB video of the chicken coop under test is acquired by an RGB camera under conditions without supplementary light source. To reduce the computational load of continuous video inference and minimize the impact of highly repetitive information between adjacent frames, frames of the RGB video can be extracted at preset frame intervals to obtain a sequence of extracted images. The preset frame interval can be determined based on the speed of the mobile inspection platform, the video frame rate, and the changes in target motion.

[0164] In one specific implementation, the video frame rate acquired by the RGB camera is 25 FPS, and the moving inspection platform travels at a speed of 0.2 m / s. Under these conditions, the frame-sampling interval can be set according to the requirements of real-time detection and target continuity, so that there is a certain time interval between adjacent frame-sampling images, while maintaining the correlation of the same chicken target in consecutive frame-sampling images.

[0165] Step 4.2: Perform single-frame dead chicken detection on the extracted frame images.

[0166] Specifically, the sampled images are input into the trained lightweight dead chicken detection model to obtain the single-frame dead chicken detection result for the corresponding sampled images. The single-frame dead chicken detection result includes the bounding box, category, and confidence score of the chicken target; wherein, the category includes at least the live chicken category and the dead chicken category.

[0167] In one specific implementation, a confidence threshold is set for the detection results. Detection frames with a confidence level that meets the preset threshold are retained, while low-confidence detection results are removed. The confidence threshold can be set according to the actual detection scenario to balance the false negative rate and the false positive rate.

[0168] Step 4.3: Assign target IDs based on the target tracking module.

[0169] Specifically, the single-frame dead chicken detection result of each sampled image is input into the target tracking module. The target tracking module associates the same chicken target in adjacent or consecutive sampled images based on the chicken target's bounding box, category confidence, and image features, and assigns a target ID to the same chicken target.

[0170] In one specific implementation, the target tracking module can employ the DeepSORT algorithm, a multi-target tracking method based on the detection box position, target motion state, and appearance features. For a detected target in the current frame, the target tracking module matches it with targets in the previous frame or historical trajectory; if the match is successful, the corresponding target ID is retained; if the match is unsuccessful, a new target ID is created for the detected target.

[0171] Step 4.4: Establish and update the target ID trajectory record.

[0172] Specifically, a trajectory record is established for each target ID. The trajectory record includes at least the target ID, the first occurrence frame, the current frame number, the number of consecutive occurrence frames, the current location box, the current matching status, the number of consecutive unmatched frames, the cumulative confidence score for the live chicken category, and the cumulative confidence score for the dead chicken category.

[0173] When a target ID is successfully matched in the current frame image, update the current bounding box, current frame number, number of consecutive occurrences, and current matching status of the target ID. Based on the category and confidence of the corresponding detection result in the current frame image, update the cumulative confidence of the live chicken category or the cumulative confidence of the dead chicken category for the target ID.

[0174] When a target ID is not successfully matched in the current frame image, update the number of unmatched frames for that target ID; when the number of unmatched frames exceeds the preset maximum number of frames to retain, delete the corresponding trajectory record to avoid the target being lost for a long time and continuing to participate in subsequent judgments.

[0175] Step 4.5: Determine the final category of the target based on multi-frame category confidence.

[0176] Specifically, for the same target ID, the confidence scores for the live chicken category and the dead chicken category are accumulated across multiple frames. Based on the accumulated confidence scores for the live chicken category and the dead chicken category, the final category of the chicken target corresponding to that target ID is determined.

[0177] In one specific implementation, when the cumulative confidence score of the dead chicken category corresponding to the same target ID is greater than the cumulative confidence score of the live chicken category, and the cumulative confidence score of the dead chicken category or the average confidence score of the dead chicken category meets a preset threshold, the chicken target corresponding to the target ID is identified as a dead chicken target; otherwise, the chicken target corresponding to the target ID is identified as a non-dead chicken target or the dead chicken result is not output temporarily.

[0178] By using the aforementioned multi-frame category confidence accumulation method, the impact of fluctuations in single-frame detection results on the final judgment can be reduced. For example, if the confidence of a dead chicken target in a certain frame decreases due to occlusion by cage netting, egg strips, or the body of a live chicken, the detection results of that target in other frames can still participate in the cumulative judgment, thereby improving the stability of dead chicken detection results in the video segment.

[0179] Step 4.6: Output the dead chicken detection results after timing confirmation.

[0180] Specifically, when a target ID is confirmed as a dead target after accumulating confidence scores across multiple frames, the dead target detection result corresponding to that target ID is output. The dead target detection result includes the target ID, dead target category, bounding box, confidence score, first occurrence frame, sampling frame number, number of consecutive occurrence frames, and the corresponding image record.

[0181] In one specific implementation, the image recording may include the image of the first detection of the target ID, the image with the highest confidence level, the final confirmation frame image, or an image fragment containing the target's trajectory information. The dead chicken detection results can be used for subsequent dead chicken alarms, manual verification, inspection robot positioning, or recording of breeding management data.

[0182] Through the aforementioned video inference and target ID tracking temporal confirmation process, the low-interference dead chicken detection system without supplemental lighting in this embodiment can form a continuous processing link from video acquisition, model inference, target association to result confirmation. Specifically, an RGB camera acquires RGB video of the chicken coop under test without supplemental light source conditions and inputs the video data into a Jetson Orin edge computing terminal. The Jetson Orin edge computing terminal first calls the trained lightweight dead chicken detection model to perform single-frame detection of chicken targets in the sampled images, obtaining the target location box, category, and confidence score. Subsequently, the target ID tracking module associates the same chicken target based on the positional relationship and image features in consecutive frames and establishes a corresponding target ID trajectory record. Finally, the system performs temporal confirmation of the target category based on the cumulative confidence scores of the live chicken category and the dead chicken category of the same target ID in multiple frames, thereby reducing result fluctuations caused by low illumination, occlusion, posture changes, or single-frame false detections, and improving the reliability of dead chicken detection in caged chicken houses without supplemental lighting.

[0183] Through the above systematic processing, this embodiment completes a full closed loop from RGB video acquisition without supplemental lighting, construction and deployment of a lightweight dead chicken detection model, to chicken target detection in video segments, target ID association, category confidence accumulation, confirmation of dead chicken results, and output of detection results. Figure 8 As shown, the system can detect live and dead chickens in caged chicken houses without the need for additional supplementary light sources. Figure 8 In the diagram, the detection box represents the target location bounding box of the chicken output by the model, and the category label above the detection box indicates the target category, where "dead" indicates the dead chicken category and "normal" indicates the live chicken category. The value after the category label indicates the detection confidence level of the corresponding category. By outputting the target location bounding box, category, and confidence level, this embodiment can locate dead chicken targets in RGB images without supplemental lighting, and provide detection basis for subsequent target ID tracking, time-series confirmation, dead chicken alarm, manual review, and breeding management records.

Claims

1. A method for detecting dead chickens in caged chicken houses, characterized in that, Includes the following steps: S1: Acquire RGB images or RGB videos of the chicken cage under test without supplementary light source conditions, filter the images and label them to obtain the dataset; S2: Construct a dead chicken detection model; The dead chicken detection model includes: Light-sensing gated downsampling module; The feature extraction backbone network is connected to the light-sensing gated downsampling module; A cross-layer scale-interactive fusion network connected to the feature extraction backbone network; The detection head is connected to the cross-scale interactive fusion network; The light-sensing gated downsampling module includes: a dual-exposure fusion module and a gated downsampling unit; The dual exposure fusion module is used to generate a virtual exposure image based on the input image, calculate the brightness components of the input image and the virtual exposure image respectively, generate a corresponding exposure weight matrix based on the brightness components, normalize the weights, and adaptively fuse the input image and the virtual exposure image to obtain low-light enhancement features. The gated downsampling unit uses a dual-branch structure for feature modulation. The main branch performs convolutional encoding on the original input image or input features to obtain the main branch features. The gated branch takes the low-light enhancement features as input to generate a low-light sensitive mask. The low-light sensitive mask is applied to the main branch features to obtain the gated downsampling features. S3: Train a dead chicken detection model based on the dataset to obtain a teacher model. Then, use channel compression and a mask-based generative feature distillation method to obtain a student model from the teacher model. S4: Input the continuous video frames of the chicken cage to be tested into the student model to obtain the state information of the chicken target in each frame. Use the dead chicken detection result temporal confirmation algorithm based on target ID tracking to match, track and accumulate the state information with the continuous video frames to obtain the detection result of the dead chicken target.

2. The method for detecting dead chickens in caged chicken houses according to claim 1, characterized in that, In step S2, the feature extraction backbone network is a feature extraction backbone network with embedded spatial branches; The spatial branch comprises an input downsampling layer, a deformable feature enhancement unit, and an output downsampling layer connected in sequence.

3. The method for detecting dead chickens in caged chicken houses according to claim 1, characterized in that, In step S2, the cross-scale interactive fusion network includes a feature channel alignment unit, a cross-scale interactive unit, and a multi-scale feature output unit connected in sequence. The feature channel alignment unit is connected to the feature extraction backbone network and is used to receive backbone features at different levels and perform channel mapping on the backbone features at different levels to obtain detail features and semantic features. The cross-scale interaction unit, after embedding semantic branches, is connected to the feature channel alignment unit to establish an interaction relationship between detail features and semantic features, thereby obtaining fused multi-scale features. The multi-scale feature output unit is connected to the cross-layer scale interaction unit and is used to receive and output the fused multi-scale features.

4. The method for detecting dead chickens in caged chicken houses according to claim 3, characterized in that, In step S2, the detection head is a YOLO11n detection head, which is connected to the multi-scale feature output unit.

5. The method for detecting dead chickens in caged chicken houses according to claim 1, characterized in that, In step S4, the status information includes the location box, category, and confidence level.

6. The method for detecting dead chickens in caged chicken houses according to claim 1, characterized in that, In step S4, a dead chicken detection result temporal confirmation algorithm based on target ID tracking is used to match, track, and cumulatively confirm the state information and continuous video frames to obtain the detection result of the dead chicken target. Specifically, this includes: The location bounding box of the chicken target in each frame image and the chicken features in consecutive video frames are assigned and associated with target IDs to establish the temporal trajectory of the same chicken target in multiple frames. The category and confidence of the chicken target in each image corresponding to the same target ID are accumulated and statistically analyzed. The final category of the target is determined by combining the number of consecutively appearing frames or the confirmation threshold, and finally the detection result of the dead chicken target is obtained.

7. The method for detecting dead chickens in caged chicken houses according to claim 6, characterized in that, In step S4, the confidence level includes the confidence level for live chickens and the confidence level for dead chickens; The detection results of the dead chicken target include the dead chicken target's bounding box, category, confidence level, target ID, and corresponding video frame or image record.

8. An electronic device comprising a processor and a memory, characterized in that, The memory stores a computer program, and when the processor executes the computer program, it implements the dead chicken detection method for caged chicken houses as described in any one of claims 1 to 7.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the dead chicken detection method for caged chicken houses as described in any one of claims 1 to 7.

Citation Information

Patent Citations

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

    CN115527234A

  • Artificial Intelligence-Based Epigenetics

    US20220406411A1