Chicken carcass dermatitis intelligent identification method and system based on DeepLabv3 +
By improving the DeepLabv3+ model and combining the convolutional attention module CBAM and the selective kernel attention module SK, the subjectivity and robustness issues of chicken carcass dermatitis recognition are solved, achieving high-precision and high-speed dermatitis region segmentation and grading, meeting the real-time detection requirements of slaughtering lines.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- YANGZHOU UNIV
- Filing Date
- 2026-01-06
- Publication Date
- 2026-04-21
AI Technical Summary
Existing technologies for identifying chicken carcass dermatitis suffer from problems such as high subjectivity, low efficiency, inability to quantify, and poor robustness of traditional image methods. In particular, the identification effect is poor when faced with complex backgrounds and variable dermatitis morphologies.
An improved DeepLabv3+ model is adopted, which enhances feature focusing ability by embedding a convolutional attention module CBAM and a selective kernel attention module SK in the decoder to enhance multi-scale adaptability. The model is trained by combining a composite loss function of cross-entropy loss and Dice loss to achieve accurate segmentation and area calculation of dermatitis regions.
It enables objective and quantitative identification of chicken carcass dermatitis, reduces the false judgment rate, improves detection efficiency, meets the real-time online detection needs of high-speed slaughtering lines, and reduces labor costs.
Smart Images

Figure CN121904458A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the fields of computer vision, artificial intelligence and non-destructive testing technology for poultry product quality and safety, and particularly relates to a method and system for intelligent identification of chicken carcass dermatitis based on DeepLabv3+. Background Technology
[0002] Chicken carcass dermatitis is a common cosmetic defect during broiler slaughtering and processing, mainly manifesting as scratches, abrasions, or inflammation of the skin on the chest, abdomen, and legs. Dermatitis not only affects the appearance of the carcass, lowering its commercial grade and economic benefits, but severe dermatitis can also become a potential risk point for microbial contamination, affecting food safety. Currently, domestic poultry slaughtering enterprises mainly rely on manual visual inspection by assembly line quality inspectors to identify and grade dermatitis. This method has significant drawbacks:
[0003] 1. High subjectivity: The identification results heavily depend on the quality inspector's experience and condition, making it difficult to standardize and easily leading to disputes;
[0004] 2. Low efficiency: The speed of manual inspection is difficult to match the pace of modern high-speed slaughter lines, becoming a bottleneck for production capacity;
[0005] 3. Lack of quantitative basis: The grading is mostly based on rough estimates and cannot provide accurate data on the area of lesions, which is not conducive to quality traceability and process improvement;
[0006] 4. High cost: It requires training and maintaining a large number of skilled quality inspectors, and labor costs continue to rise.
[0007] Traditional image processing methods typically rely on color space transformation (e.g., RGB to HSV) combined with thresholding, or utilize texture features (e.g., gray-level co-occurrence matrix) for pattern recognition. However, chicken carcass dermatitis exhibits diverse morphologies (punctate, linear, patchy), uneven color contrast with normal skin (light scratches versus dark bruises), and is easily affected by background interference (e.g., hooks, feather residue, water droplet reflections, natural skin folds). Traditional image processing methods suffer from poor generalization ability and complex feature design, resulting in insufficient robustness and high false positive and false negative rates when faced with these complex conditions.
[0008] Existing deep learning technologies, especially semantic segmentation networks (such as U-Net, DeepLabv3+, and Mask R-CNN), have achieved breakthroughs in fields such as medical image analysis and industrial quality inspection. These models can learn complex functions from images to pixel-level classification mappings end-to-end, and are theoretically well-suited for accurate segmentation of dermatitis regions. However, directly applying general segmentation models to chicken carcass dermatitis identification still faces specific challenges:
[0009] 1. Weak target features: The visual features of mild dermatitis are highly similar to those of normal skin, making it difficult for the model to focus on key discrimination areas;
[0010] 2. Huge scale differences: The size of lesions varies widely, ranging from a few pixels to covering a large area, requiring the model to have strong multi-scale feature perception capabilities.
[0011] 3. Complex background noise: Dynamic background interference in the slaughter line environment requires the model to have stronger feature selection and anti-interference capabilities. Summary of the Invention
[0012] Purpose of the invention: This invention provides a method and system for intelligent identification of chicken carcass dermatitis based on DeepLabv3+, aiming to solve the problems of strong subjectivity, low efficiency, inability to quantify, and poor robustness of traditional image methods in the existing technology of manual identification of chicken carcass dermatitis.
[0013] Technical solution: This invention provides a method for intelligent identification of chicken carcass dermatitis based on DeepLabv3+, including:
[0014] S1. Collect images of the surface of chicken carcasses and label the dermatitis areas in the images to obtain a dataset;
[0015] S2. Construct an improved DeepLabv3+ segmentation model, including an enhanced DeepLabv3+ model encoder and an optimized DeepLabv3+ model decoder; the enhanced DeepLabv3+ model encoder embeds a convolutional attention module (CBAM) to enhance the focusing ability on dermatitis features; the optimized DeepLabv3+ model decoder embeds a selective kernel attention module (SK) to enhance the adaptability to dermatitis regions of different sizes.
[0016] S3. Train the improved DeepLabv3+ segmentation model on the dataset, using the minimization of the composite loss function as the optimization objective, to obtain the trained segmentation model;
[0017] S4. Obtain the surface image of the chicken carcass to be identified, use the trained segmentation model to perform inference to obtain a two-dimensional probability feature map, and transform the two-dimensional probability feature map to obtain a pixel-level segmentation mask for the dermatitis area.
[0018] S5. Based on the pixel-level segmentation mask of the dermatitis area, calculate the actual physical area of the dermatitis area, and output the severity grade of chicken carcass dermatitis according to the preset area grading.
[0019] Furthermore, the enhanced DeepLabv3+ model encoder specifically includes:
[0020] After each residual block or depth-separable convolutional block in the original DeepLabv3+ model encoder and before spatial downsampling, a convolutional block attention module (CBAM) is embedded.
[0021] The Convolutional Block Attention (CBAM) module is composed of a channel attention submodule and a spatial attention submodule connected sequentially. The channel attention submodule performs global average pooling and global max pooling on the feature map of the input DeepLabv3+ model decoder simultaneously. The two pooling results are then passed through a multilayer perceptron with shared parameters and summed. After processing by an activation function, a channel attention weight map is generated. The channel attention weight map is then multiplied channel-wise with the feature map of the input DeepLabv3+ model decoder to obtain a channel attention-weighted feature map.
[0022] The spatial attention submodule performs average pooling and max pooling on the channel-weighted feature map along the channel dimension, concatenates the two pooling results along the channel dimension, performs dimensionality reduction and fusion through a convolutional layer, and then processes them through an activation function to generate a spatial attention weight map.
[0023] Furthermore, the optimized DeepLabv3+ model decoder specifically includes:
[0024] A selective kernel attention module is embedded before feature fusion in the original DeepLabv3+ model decoder;
[0025] The selective kernel attention module includes a splitting module, a fusion module, and a selection module;
[0026] The splitting module uses multiple parallel convolutional branches with different sized kernels to process the feature map of the input DeepLabv3+ model decoder, obtaining a multi-scale feature map. The fusion module adds the multi-scale feature maps pixel by pixel to achieve the fusion of the multi-scale feature maps, and performs global average pooling on the fused feature map to generate channel description vectors. Through a gating mechanism composed of fully connected layers, attention weight vectors for each branch are generated based on the channel description vectors.
[0027] The selection module uses the Softmax function to normalize the attention weight vector, and then performs a weighted summation of the normalized weights with the corresponding multi-scale feature maps to obtain a two-dimensional probability feature map.
[0028] Furthermore, the training includes:
[0029] A composite loss function is constructed by weighted summation based on cross-entropy loss and Dice loss.
[0030] The dataset is divided into training set, test set and validation set according to a preset partitioning ratio;
[0031] The improved DeepLabv3+ segmentation model is input into the training and validation sets. On the training set, the optimization objective is to minimize the composite loss function, and the parameters of the DeepLabv3+ segmentation model are iteratively updated using an adaptive optimization algorithm. During training, the performance metrics on the validation set are monitored, and an early stopping strategy is employed to prevent overfitting: several iterations are considered as one evaluation period; if the performance metrics on the validation set no longer improve within several consecutive evaluation periods, training is terminated. The model weight file with the best performance metrics on the validation set during the entire training process is saved to obtain the trained segmentation model.
[0032] Furthermore, each pixel position of the two-dimensional probabilistic feature map contains the predicted probability that the pixel belongs to the background region and the dermatitis region, respectively; the pixel-level segmentation mask of the dermatitis region is obtained by transforming the two-dimensional probabilistic feature map using the argmax function or a fixed threshold binarization operation.
[0033] Furthermore, the calculation of the actual physical area of the dermatitis region includes:
[0034] Set a square calibration plate of a preset size and determine the conversion factor between the number of pixels in the square calibration plate and the actual physical area; count the number of pixels in the pixel-level segmentation mask of the dermatitis area, multiply it by the conversion factor, and obtain the actual physical area of the dermatitis area.
[0035] Furthermore, the preset area grading includes:
[0036] If the actual physical area is less than or equal to the first area threshold, and the brightness difference between the dermatitis area and the surrounding normal skin area is less than the preset difference threshold, then the severity of chicken carcass dermatitis is classified as level one.
[0037] If the actual physical area is greater than the first area threshold and less than or equal to the second area threshold, or if the dermatitis area meets the following conditions: the shape of the dermatitis area determined based on the segmentation mask is strip-shaped and the actual length is greater than or equal to 1 cm, and the brightness of the color feature of the dermatitis area extracted based on the surface image of the chicken carcass to be identified is lower than the preset color threshold, then the severity of chicken carcass dermatitis is classified as level two.
[0038] If the actual physical area is greater than the second area threshold, the severity of chicken carcass dermatitis is classified as grade three.
[0039] The first area threshold is less than the second area threshold.
[0040] This invention also provides a chicken carcass dermatitis intelligent recognition system based on DeepLabv3+, comprising:
[0041] The acquisition module is used to acquire images of the surface of chicken carcasses and label the dermatitis areas in the images to obtain a dataset;
[0042] The model building module is used to build an improved DeepLabv3+ segmentation model, including an enhanced DeepLabv3+ model encoder and an optimized DeepLabv3+ model decoder; the enhanced DeepLabv3+ model encoder embeds a convolutional attention module CBAM to enhance the ability to focus on dermatitis features; the optimized DeepLabv3+ model decoder embeds a selective kernel attention module SK to enhance the adaptability to dermatitis regions of different sizes;
[0043] The training module is used to train the improved DeepLabv3+ segmentation model on the dataset, with the minimization of the composite loss function as the optimization objective, to obtain the trained segmentation model.
[0044] The inference module is used to acquire the surface image of the chicken carcass to be identified, use the trained segmentation model to perform inference to obtain a two-dimensional probability feature map, and transform the two-dimensional probability feature map to obtain a pixel-level segmentation mask for the dermatitis area.
[0045] The grading module is used to calculate the actual physical area of the dermatitis region based on the pixel-level segmentation mask of the dermatitis region, and output the severity grading of chicken carcass dermatitis according to the preset area grading.
[0046] The present invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the above-described method.
[0047] The present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the above-described method.
[0048] Beneficial effects: Compared with the prior art, the present invention has the following significant advantages:
[0049] 1. Objectification and Quantification of Identification: By replacing human judgment with a deep learning model, subjective differences are eliminated, and the precise lesion area is used as the basis for grading, thus achieving standardization and traceability of quality assessment.
[0050] 2. High detection accuracy: The improved ADeepLab-SKNet model combines the background suppression and feature focusing capabilities of CBAM with the multi-scale adaptive fusion capability of SK, enabling high-precision pixel-level segmentation of dermatitis regions with different shapes, sizes, and colors, thus reducing the false positive rate.
[0051] 3. High processing efficiency: The model can achieve single-graph inference speed in milliseconds, which fully meets the real-time online detection requirements of high-speed slaughtering lines and improves production efficiency.
[0052] 4. Strong system robustness: The standardized image acquisition scheme reduces environmental variables, and the improved model enhances anti-interference ability, enabling the system to maintain stable recognition performance under different batches and different lighting conditions.
[0053] 5. Reduce costs: Reduce reliance on skilled quality inspectors, lower long-term labor costs, and reduce losses from downgrading of high-quality products due to misjudgment through accurate grading. Attached Figure Description
[0054] Figure 1 This is the overall flowchart of the method of the present invention.
[0055] Figure 2 This is a schematic diagram of the improved ADeepLab-SKNet model structure of the present invention, showing the embedding positions of CBAM and SK modules.
[0056] Figure 3 This is a schematic diagram of the structure of the Convolutional Block Attention Module (CBAM) of the present invention.
[0057] Figure 4 This is a schematic diagram of the selective kernel attention module (SK) of the present invention.
[0058] Figure 5 This is an example image showing the original input image and the corresponding dermatitis segmentation mask result in an embodiment of the present invention. Detailed Implementation
[0059] like Figure 1 As shown, the intelligent identification method for chicken carcass dermatitis based on DeepLabv3+ according to the present invention includes:
[0060] S1. Collect images of the surface of chicken carcasses and label the dermatitis areas in the images to obtain a dataset;
[0061] S2. Construct an improved DeepLabv3+ segmentation model, consisting of an enhanced DeepLabv3+ model encoder and an optimized DeepLabv3+ model decoder. The enhanced DeepLabv3+ model encoder embeds a convolutional attention module (CBAM) into the original DeepLabv3+ model encoder to enhance its ability to focus on dermatitis features. The optimized DeepLabv3+ model decoder embeds a selective kernel attention module (SK) into the original DeepLabv3+ model decoder to enhance its adaptability to dermatitis regions of different sizes.
[0062] S3. Train the improved DeepLabv3+ segmentation model on the dataset, using the minimization of the composite loss function as the optimization objective, to obtain the trained segmentation model;
[0063] S4. Obtain the surface image of the chicken carcass to be identified, use the trained segmentation model to perform inference to obtain a two-dimensional probability feature map, and transform the two-dimensional probability feature map to obtain a pixel-level segmentation mask for the dermatitis area.
[0064] S5. Based on the pixel-level segmentation mask of the dermatitis area, calculate the actual physical area of the dermatitis area, and output the severity grade of chicken carcass dermatitis according to the preset area grading.
[0065] In this embodiment,
[0066] S1. Setting up the shooting environment: The background was a 2m*2m black velvet backdrop. Two 5600K constant color temperature LED photography lights were placed on both sides to reduce shadows and reflections. A Canon EOS 5D Mark III with a 50mm prime lens was used, fixed on a tripod, approximately 1 meter away from the suspended chicken carcasses. The photography lights with constant power and color temperature provided uniform illumination. 310 Taihu Yellow Roosters were collected. A DSLR camera fixed on a tripod was used to capture high-resolution images of the suspended chicken carcasses, specifically the back, sides, and legs—areas prone to dermatitis.
[0067] The original images were cleaned, removing blurry, overexposed, or incomplete images, resulting in a dataset of approximately 1500 high-quality images, which were saved in JPG format. Subsequently, a labeling tool (such as LabelMe) was used to perform pixel-level fine-grained annotations on the images, outlining the precise contours of all visible dermatitis areas and generating corresponding binary segmentation mask labels (0 representing background, 255 representing dermatitis areas). The labeled dataset was then divided into training, validation, and test sets according to a predetermined ratio (e.g., 7:2:1).
[0068] S2. Build an improved DeepLabv3+ segmentation model, using the DeepLabv3+ semantic segmentation network as the basic architecture, and make targeted improvements for the dermatitis diagnosis task to construct the ADeepLab-SKNet model:
[0069] The improved DeepLabv3+ segmentation model, namely the ADeepLab-SKNet model, consists of an enhanced DeepLabv3+ model encoder and an optimized DeepLabv3+ model decoder.
[0070] The enhanced DeepLabv3+ model encoder embeds a Convolutional Block Attention Module (CBAM) after each residual block or depthwise separable convolutional block and before spatial downsampling in the original DeepLabv3+ model encoder, such as... Figure 2 As shown, this enables the model to adaptively emphasize feature channels related to dermatitis and focus on the spatial location of lesions in the image, effectively suppressing interference from complex backgrounds.
[0071] The convolutional block attention module (CBAM) is as follows: Figure 3 As shown, it consists of a channel attention submodule and a spatial attention submodule connected sequentially. The channel attention submodule performs global average pooling and global max pooling on the feature map of the input DeepLabv3+ model decoder simultaneously. The two pooling results are then passed through a multilayer perceptron with shared parameters and summed, and then processed by an activation function to generate a channel attention weight map. The channel attention weight map is then multiplied channel by channel with the feature map of the input DeepLabv3+ model decoder to obtain a channel attention-weighted feature map.
[0072] The spatial attention submodule performs average pooling and max pooling on the channel-weighted feature map along the channel dimension, concatenates the two pooling results along the channel dimension, performs dimensionality reduction and fusion through a convolutional layer, and then processes them through an activation function to generate a spatial attention weight map.
[0073] The optimized DeepLabv3+ model decoder embeds a selective kernel attention module (SK) into the original DeepLabv3+ model decoder, giving the model the ability to dynamically adjust its receptive field. This allows it to effectively capture features of both small-area punctate dermatitis and large-area patchy dermatitis simultaneously, enhancing the model's multi-scale adaptability. Figure 2 As shown, in the decoder, after applying 1x1 convolutional dimensionality reduction to the low-level features from stage 2, an SK module is first applied to the low-level features before concatenating them with the upsampling results of the high-level features from the ASPP module.
[0074] like Figure 4As shown, the selective kernel attention module SK includes a splitting module, a fusion module, and a selection module. The splitting module uses multiple parallel convolutional branches with convolutional kernels of different sizes, such as 3×3 convolution, 5×5 convolution, and 7×7 convolution, to process the feature map of the input DeepLabv3+ model decoder to obtain a multi-scale feature map. The fusion module adds the multi-scale feature maps element-wise to achieve the fusion of the multi-scale feature maps, and performs global average pooling on the fused feature maps to generate channel description vectors. Through a gating mechanism composed of fully connected layers, attention weight vectors for each branch are generated based on the channel description vectors. The selection module uses the Softmax function to normalize the attention weight vectors, and performs a weighted summation of the normalized weights with the corresponding multi-scale feature maps to obtain a two-dimensional probability feature map.
[0075] S3. Set up the training environment: PyTorch 1.12, CUDA 11.3, NVIDIA RTX 4090 GPU; construct a composite loss function based on cross-entropy loss and Dice loss (weight ratio 1:1) by weighted summation; set the training parameters as follows: batch size is 8, training for 200 epochs, and uniformly scale the images used for training to 512x512;
[0076] The improved DeepLabv3+ segmentation model is input into the training and validation sets. On the training set, the optimization objective is to minimize the composite loss function. Adaptive optimization algorithms (such as Adam) are used to iteratively update the parameters of the DeepLabv3+ segmentation model. During training, the performance metrics (such as mIoU) on the validation set are monitored. The model is evaluated on the validation set every 5 epochs. An early stopping strategy is adopted to prevent the DeepLabv3+ segmentation model from overfitting: 5 iterations are considered as one evaluation cycle. If the performance metrics on the validation set no longer improve within 3 consecutive evaluation cycles, the training is terminated. The model weight file with the best performance metrics is saved to obtain the trained segmentation model.
[0077] S4. Obtain the surface image of the chicken carcass to be identified. Use the trained segmentation model to infer the images in the test set or the surface image of the chicken carcass to be identified, and obtain a two-dimensional probability feature map. Each pixel position contains two channel values, representing the predicted probability that the pixel belongs to the background region and the dermatitis region, respectively. Subsequently, the argmax function is used to select the category index with the highest probability along the channel dimension, or the channel representing the dermatitis category is binarized through a fixed threshold (such as 0.5), thereby converting the probability feature map into a single-channel binary segmentation mask, such as... Figure 5As shown, in this mask, white pixels (value 1) represent the dermatitis area predicted by the model, and black pixels (value 0) represent the background.
[0078] S5. Set a square calibration board of a preset size, such as a black square calibration board with a side length of 1cm, and determine the conversion factor between the number of pixels in the square calibration board and the actual physical area. After analysis, the calibration board occupies approximately 100 pixels in the image. Therefore, the conversion factor is: 1 pixel = 0.01 cm². Perform connected component analysis on the predicted binary segmentation mask. This invention uses the classic two-pass scanning method to identify and mark all connected white pixel regions (i.e., candidate dermatitis regions) in the mask. Subsequently, count the total number of pixels in each connected component and regard it as the pixel area of the dermatitis region at that location. Multiply the pixel area of each connected component by the pre-calibrated conversion factor to obtain the actual physical area of each dermatitis region. For example, if the number of dermatitis pixels in a certain mask is found to be 8500, then the actual area = 8500 * 0.01 cm² = 85 cm². Specifically: To calculate the actual area, system calibration needs to be performed in advance: place a square calibration board of known size (e.g., with a side length of 1cm) in the shooting field of view. The number of pixels occupied by the calibration plate is determined by image analysis, and a conversion factor of "number of pixels - actual area" is established. The total number of pixels in the dermatitis region of the segmented mask is counted, and multiplied by the conversion factor to obtain the actual physical area of the dermatitis region (unit: square centimeters).
[0079] This invention automatically grades the severity of dermatitis, sets a dermatitis grading threshold based on area, and adopts the following three-level grading standard:
[0080] (1) Level 1 (Genuine): The actual physical area of the dermatitis area is ≤ 1 square centimeter, and the brightness difference between the dermatitis area and the surrounding normal skin area is less than the preset difference threshold;
[0081] (2) Level 2 (defective product): The actual physical area of the dermatitis area is > 1 square centimeter and the actual physical area of the dermatitis area is ≤ 6 square centimeters, or the dermatitis area meets the following conditions: the shape of the dermatitis area determined based on the segmentation mask is strip-shaped and the actual length is greater than or equal to 1 centimeter, and the brightness of the color feature of the dermatitis area extracted based on the surface image of the chicken carcass to be identified is lower than the preset color threshold.
[0082] (3) Grade III (Defective): The actual physical area of the dermatitis area is > 6 square centimeters.
[0083] The area calculated by S4 is automatically compared with the above threshold, and the corresponding grading result (such as "Level 1", "Level 2" or "Level 3") is output instantly. It can also be linked with the production line to perform sorting, recording and other operations.
[0084] According to the grading standard, the actual physical area of the dermatitis region calculated in the above example is 85 cm² > 6 cm². The system automatically determines the dermatitis level of the carcass to be "Grade III (Defective)" and displays a red alarm on the operation interface, while sending a signal to the automatic sorting device.
[0085] The present invention discloses a chicken carcass dermatitis intelligent identification system based on DeepLabv3+, comprising:
[0086] The acquisition module is used to acquire images of the surface of chicken carcasses and label the dermatitis areas in the images to obtain a dataset;
[0087] The model building module is used to build an improved DeepLabv3+ segmentation model, including an enhanced DeepLabv3+ model encoder and an optimized DeepLabv3+ model decoder; the enhanced DeepLabv3+ model encoder embeds a convolutional attention module CBAM to enhance the ability to focus on dermatitis features; the optimized DeepLabv3+ model decoder embeds a selective kernel attention module SK to enhance the adaptability to dermatitis regions of different sizes;
[0088] The training module is used to train the improved DeepLabv3+ segmentation model on the dataset, with the minimization of the composite loss function as the optimization objective, to obtain the trained segmentation model.
[0089] The inference module is used to acquire the surface image of the chicken carcass to be identified, use the trained segmentation model to perform inference to obtain a two-dimensional probability feature map, and transform the two-dimensional probability feature map to obtain a pixel-level segmentation mask for the dermatitis area.
[0090] The grading module is used to calculate the actual physical area of the dermatitis region based on the pixel-level segmentation mask of the dermatitis region, and output the severity grading of chicken carcass dermatitis according to the preset area grading.
[0091] The computer device of the present invention includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the above method.
[0092] The computer-readable storage medium of the present invention stores a computer program thereon, which, when executed by a processor, implements the steps of the above-described method.
Claims
1. A method for intelligent identification of chicken carcass dermatitis based on DeepLabv3+, characterized in that, include: S1. Collect images of the surface of chicken carcasses and label the dermatitis areas in the images to obtain a dataset; S2. Construct an improved DeepLabv3+ segmentation model, including an enhanced DeepLabv3+ model encoder and an optimized DeepLabv3+ model decoder; the enhanced DeepLabv3+ model encoder embeds a convolutional attention module (CBAM) to enhance the focusing ability on dermatitis features; the optimized DeepLabv3+ model decoder embeds a selective kernel attention module (SK) to enhance the adaptability to dermatitis regions of different sizes. S3. Train the improved DeepLabv3+ segmentation model on the dataset, using the minimization of the composite loss function as the optimization objective, to obtain the trained segmentation model; S4. Obtain the surface image of the chicken carcass to be identified, use the trained segmentation model to perform inference to obtain a two-dimensional probability feature map, and transform the two-dimensional probability feature map to obtain a pixel-level segmentation mask for the dermatitis area. S5. Based on the pixel-level segmentation mask of the dermatitis area, calculate the actual physical area of the dermatitis area, and output the severity grade of chicken carcass dermatitis according to the preset area grading.
2. The intelligent identification method for chicken carcass dermatitis based on DeepLabv3+ according to claim 1, characterized in that, The enhanced DeepLabv3+ model encoder is specifically as follows: After each residual block or depth-separable convolutional block in the original DeepLabv3+ model encoder and before spatial downsampling, a convolutional block attention module (CBAM) is embedded. The Convolutional Block Attention (CBAM) module is composed of a channel attention submodule and a spatial attention submodule connected sequentially. The channel attention submodule performs global average pooling and global max pooling on the feature map of the input DeepLabv3+ model decoder simultaneously. The two pooling results are then passed through a multilayer perceptron with shared parameters and summed. After processing by an activation function, a channel attention weight map is generated. The channel attention weight map is then multiplied channel-wise with the feature map of the input DeepLabv3+ model decoder to obtain a channel attention-weighted feature map. The spatial attention submodule performs average pooling and max pooling on the channel-weighted feature map along the channel dimension, concatenates the two pooling results along the channel dimension, performs dimensionality reduction and fusion through a convolutional layer, and then processes them through an activation function to generate a spatial attention weight map.
3. The intelligent identification method for chicken carcass dermatitis based on DeepLabv3+ according to claim 2, characterized in that, The optimized DeepLabv3+ model decoder is specifically as follows: A selective kernel attention module is embedded before feature fusion in the original DeepLabv3+ model decoder; The selective kernel attention module includes a splitting module, a fusion module, and a selection module; The splitting module uses multiple parallel convolutional branches with different sized kernels to process the feature map of the input DeepLabv3+ model decoder, obtaining a multi-scale feature map. The fusion module adds the multi-scale feature maps pixel by pixel to achieve the fusion of the multi-scale feature maps, and performs global average pooling on the fused feature map to generate channel description vectors. Through a gating mechanism composed of fully connected layers, attention weight vectors for each branch are generated based on the channel description vectors. The selection module uses the Softmax function to normalize the attention weight vector, and then performs a weighted summation of the normalized weights with the corresponding multi-scale feature maps to obtain a two-dimensional probability feature map.
4. The intelligent identification method for chicken carcass dermatitis based on DeepLabv3+ according to claim 3, characterized in that, The training includes: A composite loss function is constructed by weighted summation based on cross-entropy loss and Dice loss. The dataset is divided into training set, test set and validation set according to a preset partitioning ratio; The improved DeepLabv3+ segmentation model is input into the training and validation sets. On the training set, the optimization objective is to minimize the composite loss function, and the parameters of the DeepLabv3+ segmentation model are iteratively updated using an adaptive optimization algorithm. During training, the performance metrics on the validation set are monitored, and an early stopping strategy is employed to prevent overfitting: several iterations are considered as one evaluation period; if the performance metrics on the validation set no longer improve within several consecutive evaluation periods, training is terminated. The model weight file with the best performance metrics on the validation set during the entire training process is saved to obtain the trained segmentation model.
5. The intelligent identification method for chicken carcass dermatitis based on DeepLabv3+ according to claim 1, characterized in that, Each pixel position in the two-dimensional probabilistic feature map contains the predicted probability that the pixel belongs to the background region and the dermatitis region, respectively; the pixel-level segmentation mask of the dermatitis region is obtained by transforming the two-dimensional probabilistic feature map using the argmax function or a fixed threshold binarization operation.
6. The intelligent identification method for chicken carcass dermatitis based on DeepLabv3+ according to claim 1, characterized in that, The calculation of the actual physical area of the dermatitis region includes: Set a square calibration plate of a preset size and determine the conversion factor between the number of pixels in the square calibration plate and the actual physical area; count the number of pixels in the pixel-level segmentation mask of the dermatitis area, multiply it by the conversion factor, and obtain the actual physical area of the dermatitis area.
7. The intelligent identification method for chicken carcass dermatitis based on DeepLabv3+ according to claim 1, characterized in that, The preset area grading includes: If the actual physical area is less than or equal to the first area threshold, and the brightness difference between the dermatitis area and the surrounding normal skin area is less than the preset difference threshold, then the severity of chicken carcass dermatitis is classified as level one. If the actual physical area is greater than the first area threshold and less than or equal to the second area threshold, or if the dermatitis area meets the following conditions: the shape of the dermatitis area determined based on the segmentation mask is strip-shaped and the actual length is greater than or equal to 1 cm, and the brightness of the color feature of the dermatitis area extracted based on the surface image of the chicken carcass to be identified is lower than the preset color threshold, then the severity of chicken carcass dermatitis is classified as level two. If the actual physical area is greater than the second area threshold, the severity of chicken carcass dermatitis is classified as grade three. The first area threshold is less than the second area threshold.
8. A chicken carcass dermatitis intelligent recognition system based on DeepLabv3+, characterized in that, include: The acquisition module is used to acquire images of the surface of chicken carcasses and label the dermatitis areas in the images to obtain a dataset; The model building module is used to build an improved DeepLabv3+ segmentation model, including an enhanced DeepLabv3+ model encoder and an optimized DeepLabv3+ model decoder; the enhanced DeepLabv3+ model encoder embeds a convolutional attention module CBAM to enhance the ability to focus on dermatitis features; the optimized DeepLabv3+ model decoder embeds a selective kernel attention module SK to enhance the adaptability to dermatitis regions of different sizes; The training module is used to train the improved DeepLabv3+ segmentation model on the dataset, with the minimization of the composite loss function as the optimization objective, to obtain the trained segmentation model. The inference module is used to acquire the surface image of the chicken carcass to be identified, use the trained segmentation model to perform inference to obtain a two-dimensional probability feature map, and transform the two-dimensional probability feature map to obtain a pixel-level segmentation mask for the dermatitis area. The grading module is used to calculate the actual physical area of the dermatitis region based on the pixel-level segmentation mask of the dermatitis region, and output the severity grading of chicken carcass dermatitis according to the preset area grading.
9. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.