A bird species fine-grained intelligent identification method and system for complex background

By improving the YOLOv8n network model and combining it with the EMA attention module, Group_Slim pruning, and BCKD knowledge distillation techniques, the problems of high error rate and low efficiency in fine-grained bird recognition under complex backgrounds are solved, achieving lightweight and high-precision bird recognition, which is suitable for resource-constrained environments.

CN122289808APending Publication Date: 2026-06-26STATE GRID JIANGXI ELECTRIC POWER CO LTD RES INST +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
STATE GRID JIANGXI ELECTRIC POWER CO LTD RES INST
Filing Date
2026-05-06
Publication Date
2026-06-26

Smart Images

  • Figure CN122289808A_ABST
    Figure CN122289808A_ABST
Patent Text Reader

Abstract

This invention discloses a fine-grained intelligent bird species recognition method and system for complex backgrounds, belonging to the field of computer vision technology. The method includes: constructing an improved YOLOv8n network model with an EMA attention module added to the neck network as the teacher model, and using the original YOLOv8n network model as the student model; pruning the trained student model to obtain a compressed student model; using BCKD knowledge distillation to transfer the classification and localization knowledge of the teacher model to the compressed student model to obtain the final student model, and achieving intelligent recognition through the final student model. This invention effectively integrates multi-scale feature information by introducing the EMA module with a parallel convolutional branch structure, improving the accuracy of fine-grained bird recognition in complex backgrounds; combining pruning and knowledge distillation significantly reduces the number of model parameters and computational load while maintaining high recognition accuracy, making it suitable for real-time bird recognition tasks in resource-constrained environments.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer vision technology, specifically to a fine-grained intelligent recognition method and system for bird species in complex backgrounds. Background Technology

[0002] Birds, as a vital taxonomic group, possess significant ecological and scientific value, playing an indispensable role in maintaining global ecosystem stability and biodiversity conservation. Bird identification systems are crucial in multiple fields, including wildlife conservation, ecological research, and aviation safety. Accurate identification and monitoring of aerial bird species are essential for understanding migration patterns and assessing ecosystem health. These applications underscore the urgent need for robust detection frameworks adaptable to diverse environmental conditions and the complexities of bird behavior. However, bird species identification in complex environments requires methods to address challenges posed by field interference factors such as occlusion, lighting variations, and the similarity of bird colors to background colors. Therefore, fine-grained bird identification in complex field environments remains a pressing challenge. As a highly challenging frontier topic in computer vision, fine-grained bird identification no longer focuses on coarse-grained tasks like distinguishing between "birds" and "non-birds," but rather on accurately identifying hundreds of visually highly similar bird subcategories. The immense challenge of this task stems primarily from three aspects: First, inter-class differences are extremely small; the key distinguishing features between different species are often only subtle differences in the shape of the beak, the color around the eyes, or specific textured patches on the feathers—these differences are far smaller than those across major classes. Second, intra-class differences can be quite significant; the same species can present drastically different appearances due to variations in posture, lighting, age, sex, and even season (such as breeding plumage versus non-breeding plumage). Finally, bird images are typically collected in complex natural environments, with cluttered and heavily occluded backgrounds that significantly interfere with fine-grained bird identification.

[0003] Traditional fine-grained bird identification methods mainly rely on manual inspection by experts, which suffers from high error rates, low efficiency, and high time and labor costs. Especially in some vast primeval forests, manual field surveys are difficult to achieve comprehensive coverage, resulting in many individual birds not being effectively recorded. Early research methods also relied on hand-designed feature descriptors combined with traditional classifiers (such as support vector machines); however, such methods have limited ability to capture subtle features and have obvious performance bottlenecks.

[0004] With the rapid development of computer vision and deep learning technologies, especially the powerful feature learning capabilities of convolutional neural networks, fine-grained bird recognition technology has made breakthrough progress, realizing the transformation from traditional manual classification methods to deep learning methods. The YOLO series of models, as one of the most advanced object detection algorithms, has been widely applied to various visual recognition tasks due to its efficient real-time detection capabilities. YOLOv8, as the latest version of this series, demonstrates significant improvements in accuracy and speed, becoming an important tool in object recognition research. However, despite its performance advantages, YOLOv8 still faces some challenges in fine-grained bird recognition. First, due to the vast number of bird species, the model may experience confusion during classification; second, since fine-grained bird recognition is mostly used in wild environments, practical deployment requires careful consideration of ease of deployment and recognition efficiency. Summary of the Invention

[0005] To address the shortcomings of existing technologies, this invention provides a fine-grained intelligent identification method and system for bird species in complex environments. The aim is to improve the model's recognition accuracy and robustness by refining the network learning structure, resulting in an improved model that serves as a teacher model for subsequent applications. Simultaneously, to better suit practical deployment requirements, pruning techniques are employed to significantly reduce the number of parameters in the original model while maintaining high recognition accuracy. This pruned model then serves as a student model for further development. Finally, knowledge distillation techniques are introduced to improve the recognition accuracy of the student model and ensure its robustness in various complex environments, ultimately achieving a high-accuracy and lightweight target model.

[0006] To achieve the above objectives, the present invention provides the following technical solution: a fine-grained intelligent identification method for bird species in complex backgrounds, comprising: constructing an improved YOLOv8n network model, wherein the improved YOLOv8n network model adds an EMA attention module to the neck network of the original YOLOv8n network model; acquiring a fine-grained bird image dataset; performing data augmentation on the fine-grained bird image dataset; using the improved YOLOv8n network model as the teacher model and the original YOLOv8n network model as the student model; training the teacher model and the student model based on the data-augmented fine-grained bird image dataset; performing Group_Slim pruning on the trained student model to obtain a compressed student model; performing BCKD distillation on the compressed student model and the trained teacher model to assist in training the student model, improve the accuracy of the student model, and obtain the final student model; acquiring real-time fine-grained bird images, inputting the real-time fine-grained bird images into the final student model, and outputting the detection results.

[0007] Furthermore, the improved YOLOv8n network model consists of a backbone network, a neck network, and a head network. The backbone network consists of a first convolutional layer, a second convolutional layer, a first c2f module, a third convolutional layer, a second c2f module, a fourth convolutional layer, a third c2f module, a fifth convolutional layer, a fourth c2f module, and a fast spatial pyramid pooling module, connected sequentially. The neck network consists of a fifth c2f module, a first EMA attention module, a sixth c2f module, a second EMA attention module, a sixth convolutional layer, a seventh c2f module, a third EMA attention module, a seventh convolutional layer, an eighth c2f module, and a fourth EMA attention module. The head network consists of three decoupled heads with identical structures. Each decoupled head includes two parallel branches, and each branch consists of a series of convolutional layers and two-dimensional convolutions.

[0008] Furthermore, the processing flow of the improved YOLOv8n network model is as follows: the input sequentially passes through the first convolutional layer, the second convolutional layer, the first c2f module, the third convolutional layer, the second c2f module, the fourth convolutional layer, the third c2f module, the fifth convolutional layer, the fourth c2f module, and the fast spatial pyramid pooling module; the output of the fast spatial pyramid pooling module is upsampled and concatenated with the output of the third c2f module, and the concatenated output sequentially passes through the fifth c2f module and the first EMA attention module; the first EMA attention module is upsampled and concatenated with the output of the second c2f module, and the concatenated output sequentially passes through the sixth c2f module, the second EMA attention module, and the sixth convolutional layer; the output of the sixth convolutional layer is concatenated with the output of the fifth c2f module, and the concatenated output sequentially passes through the seventh c2f module, the third EMA attention module, and the seventh convolutional layer; the output of the seventh convolutional layer and the fast spatial pyramid pooling module are concatenated and sequentially pass through the eighth c2f module and the fourth EMA attention module; the outputs of the second EMA attention module, the third EMA attention module, and the fourth EMA attention module are respectively input into three decoupling heads.

[0009] Furthermore, the first EMA attention module, the second EMA attention module, the third EMA attention module, and the fourth EMA attention module have the same structure, which is a parallel convolutional branch structure; The processing of the first EMA attention module is as follows: It receives the output of the fifth c2f module, which is a feature map. The feature map output by the fifth c2f module is divided into G groups along the channel dimension, forming G sub-feature maps. The first EMA attention module includes a first branch and a second branch. In the first branch, the sub-feature maps are processed sequentially through the ninth convolutional layer, average pooling, and the sigmoid activation function to obtain the first feature map. In the second branch, the sub-feature maps are average pooled along the horizontal and vertical directions to capture feature information in different directions. Then, they are processed through the eighth convolutional layer and the sigmoid activation function to generate attention weight maps in the horizontal and vertical dimensions, respectively. The attention weight map in the vertical dimension is multiplied element-wise with the sub-feature map to obtain the intermediate feature map; the intermediate feature map is then normalized to obtain the second feature map; the second feature map is then processed by average pooling and the sigmoid activation function to obtain the third feature map; the third feature map is then multiplied element-wise with the output of the ninth convolutional layer to obtain the fourth feature map; in the second branch, the first feature map is multiplied element-wise with the second feature map to obtain the fifth feature map; the fifth feature map is then multiplied element-wise with the fourth feature map and processed by the sigmoid activation function to obtain the sixth feature map; finally, the sixth feature map is weighted with the sub-feature map through element-wise multiplication to obtain the region of interest feature map, which is the output of the first EMA attention module.

[0010] Furthermore, the specific process of performing Group_Slim pruning on the trained student model is as follows: The weights of the convolutional layers in the trained student model are divided into several groups, with each group corresponding to a complete convolutional kernel. Sparse group Lasso regularization is introduced to impose sparse constraints on the weighted groups of the partition and remove redundant convolutional kernels. Sparse-induced training is performed on the weights within the retained weight reassembly; the channel scaling factor of the convolutional layer is used to reflect the channel importance. Based on the channel scaling factor after sparse-induced training, remove channels whose channel scaling factor is less than a threshold. Iterative training-pruning process; The pruned network is fine-tuned to obtain a compact network, i.e., a compressed student model.

[0011] Furthermore, the specific process of BCKD distillation on the compressed student model and the trained teacher model is as follows: The same training sample from the bird fine-grained image dataset is input into both the compressed student model and the trained teacher model for forward propagation; classification logistic values ​​are obtained from the classification branches of both models, and localization prediction values ​​are obtained from the localization branches; the Sigmoid activation function is applied to both the compressed student model's and the trained teacher model's classification logistic values ​​to convert them into independent binary classification probability scores; the binary distillation loss is calculated based on the binary classification probability scores; the localization prediction values ​​of both the trained teacher model and the compressed student model are decoded into specific bounding box coordinates to obtain the predicted bounding boxes of the teacher and student; the intersection-union ratio (IU) between the predicted bounding boxes of the teacher and student is calculated, and the localization distillation loss is constructed with the goal of maximizing the IU; the binary distillation loss and the localization distillation loss are weighted and summed to form the total distillation loss function; with the goal of minimizing the total distillation loss function, backpropagation and gradient updates are performed only on the parameters of the student model; the parameters of the teacher model remain unchanged throughout the process.

[0012] Further data augmentation includes random cropping, rotation, scaling, color jitter, and blurring.

[0013] A fine-grained intelligent bird species identification system for complex backgrounds includes: The model building module is used to build improved YOLOv8n network models; The data acquisition module is used to acquire fine-grained image datasets of birds; The data augmentation module is used to augment fine-grained bird image datasets; The teacher-student model setting module is used to use the improved YOLOv8n network model as the teacher model and the original YOLOv8n network model as the student model. The training module is used to train the teacher and student models based on a data-augmented fine-grained bird image dataset; The pruning module is used to perform Group_Slim pruning on the trained student model to obtain a compressed student model. The distillation module is used to perform BCKD distillation on the compressed student model and the trained teacher model to assist in training the student model, improve the accuracy of the student model, and obtain the final student model. The detection module is used to acquire real-time fine-grained images of birds, input these images into the final student model, and output the detection results.

[0014] An electronic device includes a processor, a memory, and a bus, wherein the processor and the memory are connected via the bus, the memory is used to store a set of program code, and the processor is used to call the program code stored in the memory to execute a fine-grained intelligent recognition method for bird species in complex backgrounds.

[0015] A non-volatile computer storage medium storing computer-executable instructions that execute a fine-grained intelligent identification method for bird species in complex backgrounds.

[0016] Compared with existing technologies, the present invention has the following advantages: This invention constructs an improved YOLOv8n network with an embedded EMA attention module in the neck network as the teacher model and the original YOLOv8n network as the student model. It combines Group_Slim pruning and BCKD knowledge distillation to form an integrated "teacher-student-pruning-distillation" recognition framework. This combined approach leverages the multi-scale parallel convolutional branching structure of the EMA module to enhance the expressive power of fine-grained bird features in complex backgrounds. It also significantly reduces the number of parameters and computational cost of the student model through structured pruning. Furthermore, BCKD distillation efficiently transfers the classification and localization knowledge of the teacher model to the lightweight student model. Ultimately, while maintaining high recognition accuracy, it significantly reduces model size and inference overhead, achieving a synergistic optimization of accuracy and efficiency. This approach is particularly suitable for real-time bird recognition tasks in resource-constrained environments. This invention introduces an EMA attention module into the YOLOv8n neck network. This module employs a parallel convolutional branch structure, grouping the input feature map along channels and processing it through two branches: one branch uses convolution and average pooling to extract local detail features, while the other branch performs average pooling along the horizontal and vertical directions to capture long-range spatial dependencies. Attention weights of different dimensions are then multiplied element-wise with the original feature map, followed by group normalization, pooling, and multi-level multiplication fusion to finally output the region of interest feature map. This design effectively integrates multi-scale feature information, enhancing the model's sensitivity to fine-grained bird discrimination features such as subtle beak shapes, eye color rings, and feather textures while maintaining fast inference speed. It also suppresses interference from complex backgrounds (such as occlusion, lighting changes, and background similar colors), significantly improving recognition accuracy and robustness. This invention performs Group_Slim pruning and BCKD knowledge distillation sequentially on the trained student model. During pruning, the convolutional layer weights are divided into groups corresponding to complete convolutional kernels. Sparse group Lasso regularization is introduced to remove redundant convolutional kernels, and unimportant channels are pruned based on channel scaling factors. Multiple rounds of iterative pruning and fine-tuning are then used to obtain a compact student model. During distillation, classification logic values ​​are extracted from the teacher and student classification branches and converted into binary classification probability scores. The binary distillation loss is calculated, and the localization prediction values ​​are decoded into bounding box coordinates. The localization distillation loss is constructed with the goal of maximizing the intersection-union ratio (IU) of the predicted boxes. The two losses are weighted and then used to update the student model parameters in reverse. This synergistic pruning and distillation mechanism significantly reduces the number of model parameters and computational complexity while maintaining or even improving the classification and localization accuracy of the student model. It achieves a balance between lightweight design and high accuracy, meeting the requirements for real-time deployment in the field. Attached Figure Description

[0017] Figure 1 This is a flowchart of the method of the present invention.

[0018] Figure 2 This is a schematic diagram of the structure of the improved YOLOv8n network model, i.e., the teacher model, of the present invention.

[0019] Figure 3 This is a schematic diagram of the EMA module of the present invention.

[0020] Figure 4 This is a schematic diagram of the Group_Slim pruning process of the present invention.

[0021] Figure 5 This is a schematic diagram illustrating the working principle of the Group_Slim pruning method of the present invention.

[0022] Figure 6 This is a schematic diagram of the workflow of BCKD knowledge distillation according to the present invention. Detailed Implementation

[0023] Example 1

[0024] like Figure 1 As shown, the present invention provides a technical solution: a fine-grained intelligent identification method for bird species in complex backgrounds, comprising the following steps:

[0025] Step S1: Construct an improved YOLOv8n network model.

[0026] Step S2: Obtain a fine-grained image dataset of birds.

[0027] Step S3: Perform data augmentation on the bird fine-grained image dataset.

[0028] Step S4: Use the improved YOLOv8n network model as the teacher model and the original YOLOv8n network model as the student model.

[0029] Step S5: Train the teacher model and student model based on the data-augmented fine-grained bird image dataset.

[0030] Step S6: Perform Group_Slim pruning on the trained student model to obtain the compressed student model.

[0031] Step S7: Perform BCKD distillation on the compressed student model and the trained teacher model to assist in training the student model, improve the accuracy of the student model, and obtain the final student model.

[0032] Step S8: Obtain real-time fine-grained images of birds, input the real-time fine-grained images of birds into the final student model, and output the detection results.

[0033] The fine-grained bird image dataset is divided into training, validation, and test sets. Teacher and student models are trained, validated, and tested based on these sets. Data augmentation is performed only on the training set used for model training to improve training effectiveness. Data augmentation includes random cropping, rotation, scaling, color jittering, and blurring, enabling the model to adapt to complex real-world application scenarios and improving its robustness to various bird species. The fine-grained bird image dataset contains several training samples, each consisting of a fine-grained bird image and its corresponding ground truth label (including category and bounding box).

[0034] like Figure 2 As shown, the improved YOLOv8n network model adds an EMA attention module to the neck part of the original YOLOv8n network model. The EMA attention module uses a dual pooling strategy and a parallel convolutional branch structure to effectively fuse multi-scale feature information. It aggregates different feature information in the space while retaining key information and reducing redundant information, thus ensuring high accuracy in bird detection while maintaining fast inference speed. At the same time, Lasso regularization constraints are introduced during model training to prevent overfitting.

[0035] The improved YOLOv8n network model consists of a backbone network, a neck network, and a head network. The backbone network consists of a first convolutional layer (Conv), a second convolutional layer, a first c2f module, a third convolutional layer, a second c2f module, a fourth convolutional layer, a third c2f module, a fifth convolutional layer, a fourth c2f module, and a fast spatial pyramid pooling module (SPPF) connected in sequence. The neck network consists of a fifth c2f module, a first EMA attention module, a sixth c2f module, a second EMA attention module, a sixth convolutional layer, a seventh c2f module, a third EMA attention module, a seventh convolutional layer, an eighth c2f module, and a fourth EMA attention module. The head network consists of three decoupled heads with identical structures. Each decoupled head includes two parallel branches, and each branch consists of a cascaded convolutional layer and a two-dimensional convolution (Conv2d).

[0036] The improved YOLOv8n network model's processing flow is as follows: The input sequentially passes through the first convolutional layer (Conv), the second convolutional layer, the first c2f module, the third convolutional layer, the second c2f module, the fourth convolutional layer, the third c2f module, the fifth convolutional layer, the fourth c2f module, and the fast spatial pyramid pooling module; the output of the fast spatial pyramid pooling module is upsampled and concatenated with the output of the third c2f module, and the concatenated output sequentially passes through the fifth c2f module and the first EMA attention module; the first EMA attention module is upsampled and concatenated with the output of the second c2f module, and the concatenated output sequentially passes through the sixth c2f module, the second EMA attention module, and the sixth convolutional layer; the output of the sixth convolutional layer is concatenated with the output of the fifth c2f module, and the concatenated output sequentially passes through the seventh c2f module, the third EMA attention module, and the seventh convolutional layer; the output of the seventh convolutional layer and the fast spatial pyramid pooling module is concatenated and then sequentially passes through the eighth c2f module and the fourth EMA attention module; the outputs of the second, third, and fourth EMA attention modules are respectively input into three decoupling heads.

[0037] like Figure 3 As shown, the first, second, third, and fourth EMA attention modules have the same structure, all being parallel convolutional branch structures, where convolutional kernels of different sizes simultaneously capture local and global contextual features. This design helps to fuse multi-scale feature information, which is crucial for bird detection; it also utilizes a dual-pooling strategy to aggregate spatially different feature information while retaining key information. The processing of the first EMA attention module is as follows: it receives the output of the fifth c2f module, which is a feature map. The feature map output by the fifth c2f module is divided into G groups along the channel dimension to form G sub-feature maps. The first EMA attention module includes a first branch and a second branch. In the first branch, the sub-feature maps are processed by the ninth convolutional layer (3×3), average pooling operation and sigmoid activation function in sequence to obtain the first feature map. In the second branch, the sub-feature maps are average pooled along the horizontal and vertical directions to capture feature information in different directions. Then, they are processed by the eighth convolutional layer (1×1) and sigmoid activation function to generate attention weight maps in the horizontal and vertical dimensions, respectively. The attention weight maps in the horizontal and vertical dimensions are multiplied element-wise with the sub-feature maps to obtain the intermediate feature map. The intermediate feature map is then normalized to obtain the second feature map. The second feature map is then processed by average pooling and the sigmoid activation function to obtain the third feature map. The third feature map is then multiplied element-wise with the output of the ninth convolutional layer to obtain the fourth feature map. In the second branch, the first feature map is multiplied element-wise with the second feature map to obtain the fifth feature map. The fifth feature map is then multiplied element-wise with the fourth feature map and processed by the sigmoid activation function to obtain the sixth feature map. Finally, the sixth feature map is weighted with the sub-feature maps through element-wise multiplication to obtain the region of interest feature map, which is the output of the first EMA attention module.

[0038] The second, third, and fourth EMA attention modules have the same structure as the first EMA attention module, so they will not be described in detail here.

[0039] like Figure 4 , Figure 5 As shown, the specific process of performing Group_Slim pruning on the trained student model is as follows: Initial Network and Weight Grouping: For the initial network (the initial convolutional layers in the trained student model), the weights of the convolutional layers are divided into several groups, each group corresponding to a complete convolutional kernel (e.g., ...). Figure 5 The Middle (The channels of each convolutional layer and their corresponding scaling factors). This forms the basis for structured pruning; Figure 5 middle Indicates the first The first convolutional layer One channel, Indicates the first The first channel of the convolutional layer, ; Sparse group lasso pruning: Sparse group Lasso regularization is introduced to impose sparsity constraints on weight regroups during training. This step evaluates the importance of each group (i.e., each convolutional kernel) and moves the weights of unimportant groups towards zero, thereby eliminating redundant convolutional kernels; Channel sparsity regularization training: Based on group pruning, further sparsity-inducing training is performed on the weights within the retained groups. Combined with... Figure 5 The channel scaling factors shown (such as values ​​1.280, 0.831, and 0.626) reflect the importance of the channels by their magnitude, making the scaling factors for unimportant channels approach zero. Channel pruning based on scaling factor: Based on the channel scaling factor obtained after training, a threshold is set, and channels with scaling factors smaller than the threshold are pruned. For example... Figure 5 As shown, during pruning, all input and output connections related to the target channel are removed (the figure shows the process from multiple scaling factor values ​​to the final simplified structure), making the network architecture more compact; Multi-round / iterative pruning process: The above "training-pruning" process can be performed multiple times. After each round of pruning, the network structure is further simplified, and redundant structures can be discovered and removed in the next round, avoiding excessive pruning at once that could lead to a serious drop in accuracy; Fine-tuning and Compacting the Network: The pruned network is fine-tuned (i.e., retraining) to recover the model performance lost due to pruning. The result is a compact network (a compressed student model) that significantly reduces the number of parameters and computational cost while maintaining high accuracy.

[0040] BCKD achieves more focused and efficient knowledge transfer by decomposing complex classification tasks into multiple binary classification subtasks. The BCKD knowledge distillation framework employs two novel loss functions during training. The first is the binary distillation loss (…). The core idea is to extract classification knowledge through distillation loss. The second is location-based distillation loss based on cross-union ratio (CUI). It quantifies the intersection-over-union (IoU) ratio between the bounding boxes predicted by the teacher model and the student model. IoU loss helps to transfer localization knowledge from the teacher model to the student model.

[0041] like Figure 6 As shown, both the student model and the teacher model contain a classification branch (Cls) and a localization branch (Loc); the classification branch is used to output classification logical values, and the localization branch is used to output localization prediction values ​​(such as the center coordinates, width, and height of the bounding box).

[0042] The specific process of performing BCKD distillation on the compressed student model and the trained teacher model is as follows: The same training sample in the dataset The data is input into the compressed student model and the trained teacher model, respectively, and then forward propagated. Classification logical values ​​are obtained from the classification branches of the trained teacher model and the compressed student model, respectively, and denoted as... , And obtain the location prediction value from the location branch; The classification logistic values ​​of the trained teacher model are respectively And the classification logistic values ​​of the compressed student model Applying the Sigmoid activation function, the scores are converted into independent binary classification probability scores, denoted as... and , is represented as: ; ; Based on binary classification probability scores and Calculate the loss of binary distillation This causes the student model to focus more on the parts where the teacher's and student's models differ significantly, reducing the binary distillation loss. Represented as: ; In the formula, This represents the binary cross-entropy loss. This represents the compressed student model for the first... The sample, the first Binary classification probability scores for each category / task; This indicates that the trained teacher model is effective for the first... The sample, the first Binary classification probability scores for each category / task.

[0043] The localization predictions of the trained teacher model and the compressed student model are decoded into specific bounding box coordinates to obtain the teacher's predicted bounding box. and the student's predicted bounding box ; Calculate the teacher's predicted bounding box and the student's predicted bounding box Crossover ratio between To maximize the intersection-union ratio, a localization distillation loss is constructed. This loss function directly optimizes the spatial overlap between two bounding boxes; Loss from binary distillation and positional distillation loss We perform a weighted summation to construct the total distillation loss function. : ; In the formula, and These are all preset weighting coefficients used to balance the importance of the two types of knowledge transfer; To minimize the total distillation loss function To achieve this, backpropagation and gradient updates are performed only on the parameters of the student model. The parameters of the teacher model remain unchanged throughout the process.

[0044] Binary distillation loss and localization distillation loss complementarily optimize localization and classification capabilities, jointly improving the training of the student model. This framework significantly enhances knowledge transfer between the teacher and student models, enabling BCKD to effectively address the efficiency issues in traditional distillation methods.

[0045] Specifically, key hyperparameters of the model (such as learning rate, batch size, and weight decay coefficient) were adjusted and optimized to improve the convergence speed and detection accuracy of both the student and teacher models. Simultaneously, a cosine annealing learning rate strategy was employed to adjust the learning rate at different stages of training to better adapt to the dataset features and the model's training progress.

[0046] During the pruning process, key hyperparameters of the model (such as pruning ratio, regularization sparsity, and number of fine-tuning rounds) are adjusted and optimized to balance the optimal model size and classification accuracy. Simultaneously, during knowledge distillation, the most suitable number of distillation layers and the optimal distillation coefficient are selected to achieve more efficient knowledge transfer.

[0047] A second embodiment of the present invention also provides a fine-grained intelligent identification system for bird species in complex backgrounds, comprising: The model building module is used to build improved YOLOv8n network models; The data acquisition module is used to acquire fine-grained image datasets of birds; The data augmentation module is used to augment fine-grained bird image datasets; The teacher-student model setting module is used to use the improved YOLOv8n network model as the teacher model and the original YOLOv8n network model as the student model. The training module is used to train the teacher and student models based on a data-augmented fine-grained bird image dataset; The pruning module is used to perform Group_Slim pruning on the trained student model to obtain a compressed student model. The distillation module is used to perform BCKD distillation on the compressed student model and the trained teacher model to assist in training the student model, improve the accuracy of the student model, and obtain the final student model. The detection module is used to acquire real-time fine-grained images of birds, input these images into the final student model, and output the detection results.

[0048] A third embodiment of the present invention also provides an electronic device, including a processor, a memory, and a bus, wherein the processor and the memory are connected via the bus, wherein the memory is used to store a set of program code, and the processor is used to call the program code stored in the memory to execute a fine-grained intelligent identification method for bird species in complex backgrounds.

[0049] The fourth embodiment of the present invention also provides a non-volatile computer storage medium storing computer-executable instructions that execute a fine-grained intelligent identification method for bird species in complex backgrounds.

[0050] Eleven models, including YOLOv3-tiny, YOLOv5n, YOLOv6n, YOLOv7, YOLOv7-tiny, YOLOv8n, YOLOv8n-p2, YOLOv11n, EfficientDet, Faster R-CNN, and SSD, were used as benchmarks for comparison with the final student model of this invention. The evaluation metrics used were mAP (mean accuracy), Precision, Recall, and Model Size, as shown in Table 1. Table 1 Model Comparison

[0051] The final student model proposed in this invention has a Model Size of 2.20MB, which is smaller than that of other models. This indicates that a good balance has been achieved between model accuracy and model size. In addition, the final student model of this invention achieves an mAP of 81.15%, which is better than other methods in terms of detection capability. This shows that the model proposed in this invention has more advantages under resource constraints and is very suitable for practical application needs.

[0052] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.

Claims

1. A fine-grained intelligent identification method for bird species in complex backgrounds, characterized in that, include: An improved YOLOv8n network model is constructed, wherein the improved YOLOv8n network model adds an EMA attention module to the Neck part of the original YOLOv8n network model; Obtain a fine-grained image dataset of birds; perform data augmentation on the fine-grained image dataset of birds; An improved YOLOv8n network model was used as the teacher model, and the original YOLOv8n network model was used as the student model. Both the teacher and student models were trained using a data-augmented fine-grained bird image dataset. The trained student model underwent Group_Slim pruning to obtain a compressed student model. BCKD distillation was then performed on the compressed student model and the trained teacher model to assist in training the student model, improving its accuracy and yielding the final student model. Real-time fine-grained bird images were acquired and input into the final student model to output the detection results.

2. The fine-grained intelligent identification method for bird species in complex backgrounds according to claim 1, characterized in that: The improved YOLOv8n network model consists of a backbone network, a neck network, and a head network. The backbone network consists of a first convolutional layer, a second convolutional layer, a first c2f module, a third convolutional layer, a second c2f module, a fourth convolutional layer, a third c2f module, a fifth convolutional layer, a fourth c2f module, and a fast spatial pyramid pooling module, all connected in sequence. The neck network consists of a fifth c2f module, a first EMA attention module, a sixth c2f module, a second EMA attention module, a sixth convolutional layer, a seventh c2f module, a third EMA attention module, a seventh convolutional layer, an eighth c2f module, and a fourth EMA attention module. The head network consists of three decoupled heads with identical structures. Each decoupled head includes two parallel branches, and each branch consists of a series of convolutional layers and two-dimensional convolutions.

3. The fine-grained intelligent identification method for bird species in complex backgrounds according to claim 2, characterized in that: The processing flow of the improved YOLOv8n network model is as follows: the input passes through the first convolutional layer, the second convolutional layer, the first c2f module, the third convolutional layer, the second c2f module, the fourth convolutional layer, the third c2f module, the fifth convolutional layer, the fourth c2f module, and the fast spatial pyramid pooling module in sequence. The output of the fast spatial pyramid pooling module is upsampled and concatenated with the output of the third c2f module. The concatenated output then passes through the fifth c2f module and the first EMA attention module in sequence. The output of the first EMA attention module is upsampled and concatenated with the output of the second c2f module. The concatenated output then passes through the sixth c2f module, the second EMA attention module, and the sixth convolutional layer in sequence. The output of the sixth convolutional layer is concatenated with the output of the fifth c2f module. The concatenated output then passes through the seventh c2f module, the third EMA attention module, and the seventh convolutional layer in sequence. The output of the seventh convolutional layer and the output of the fast spatial pyramid pooling module are concatenated and then pass through the eighth c2f module and the fourth EMA attention module in sequence. The outputs of the second, third, and fourth EMA attention modules are respectively input to three decoupling heads.

4. The fine-grained intelligent identification method for bird species in complex backgrounds according to claim 3, characterized in that: The first EMA attention module, the second EMA attention module, the third EMA attention module, and the fourth EMA attention module have the same structure, which is a parallel convolutional branch structure; The processing of the first EMA attention module is as follows: It receives the output of the fifth c2f module, which is a feature map. The feature map output by the fifth c2f module is divided into G groups along the channel dimension, forming G sub-feature maps. The first EMA attention module includes a first branch and a second branch. In the first branch, the sub-feature maps are processed sequentially through the ninth convolutional layer, average pooling, and the sigmoid activation function to obtain the first feature map. In the second branch, the sub-feature maps are average pooled along the horizontal and vertical directions to capture feature information in different directions. Then, they are processed through the eighth convolutional layer and the sigmoid activation function to generate attention weight maps in the horizontal and vertical dimensions, respectively. The attention weight map in the vertical dimension is multiplied element-wise with the sub-feature map to obtain the intermediate feature map; the intermediate feature map is then normalized to obtain the second feature map; the second feature map is then processed by average pooling and the sigmoid activation function to obtain the third feature map; the third feature map is then multiplied element-wise with the output of the ninth convolutional layer to obtain the fourth feature map; in the second branch, the first feature map is multiplied element-wise with the second feature map to obtain the fifth feature map; the fifth feature map is then multiplied element-wise with the fourth feature map and processed by the sigmoid activation function to obtain the sixth feature map; finally, the sixth feature map is weighted with the sub-feature map through element-wise multiplication to obtain the region of interest feature map, which is the output of the first EMA attention module.

5. The fine-grained intelligent identification method for bird species in complex backgrounds according to claim 4, characterized in that: The specific process of performing Group_Slim pruning on the trained student model is as follows: The weights of the convolutional layers in the trained student model are divided into several groups, with each group corresponding to a complete convolutional kernel. Sparse group Lasso regularization is introduced to impose sparse constraints on the weighted groups of the partition and remove redundant convolutional kernels. Sparse-induced training is performed on the weights within the retained weight reassembly; the channel scaling factor of the convolutional layer is used to reflect the channel importance. Based on the channel scaling factor after sparse-induced training, remove channels whose channel scaling factor is less than a threshold. Iterative training-pruning process; The pruned network is fine-tuned to obtain a compact network, i.e., a compressed student model.

6. The fine-grained intelligent identification method for bird species in complex backgrounds according to claim 5, characterized in that: The specific process of BCKD distillation on the compressed student model and the trained teacher model is as follows: The same training sample from the bird fine-grained image dataset is input into both the compressed student model and the trained teacher model for forward propagation; classification logistic values ​​are obtained from the classification branches of both models, and localization prediction values ​​are obtained from the localization branches; the Sigmoid activation function is applied to both the compressed student model's and the trained teacher model's classification logistic values ​​to convert them into independent binary classification probability scores; the binary distillation loss is calculated based on the binary classification probability scores; the localization prediction values ​​of both the trained teacher model and the compressed student model are decoded into specific bounding box coordinates to obtain the predicted bounding boxes of the teacher and student models; the intersection-union ratio (IU) between the predicted bounding boxes of the teacher and student models is calculated, and the localization distillation loss is constructed with the goal of maximizing the IU; the binary distillation loss and the localization distillation loss are weighted and summed to form the total distillation loss function; with the goal of minimizing the total distillation loss function, backpropagation and gradient updates are performed only on the parameters of the student model; the parameters of the teacher model remain unchanged throughout the process.

7. The fine-grained intelligent identification method for bird species in complex backgrounds according to claim 6, characterized in that: Data augmentation includes random cropping, rotation, scaling, color jitter, and blurring.

8. A fine-grained intelligent identification system for bird species in complex backgrounds, used to execute the fine-grained intelligent identification method for bird species in complex backgrounds as described in any one of claims 1-7, characterized in that, include: The model building module is used to build improved YOLOv8n network models; The data acquisition module is used to acquire fine-grained image datasets of birds; The data augmentation module is used to augment fine-grained bird image datasets; The teacher-student model setting module is used to use the improved YOLOv8n network model as the teacher model and the original YOLOv8n network model as the student model. The training module is used to train the teacher and student models based on a data-augmented fine-grained bird image dataset; The pruning module is used to perform Group_Slim pruning on the trained student model to obtain a compressed student model. The distillation module is used to perform BCKD distillation on the compressed student model and the trained teacher model to assist in training the student model, improve the accuracy of the student model, and obtain the final student model. The detection module is used to acquire real-time fine-grained images of birds, input these images into the final student model, and output the detection results.

9. An electronic device, characterized in that, The system includes a processor, a memory, and a bus, wherein the processor and the memory are connected via the bus, the memory is used to store a set of program code, and the processor is used to call the program code stored in the memory to execute a fine-grained intelligent identification method for bird species in complex backgrounds as described in any one of claims 1-7.

10. A non-volatile computer storage medium storing computer-executable instructions, characterized in that, The computer can execute instructions to perform the fine-grained intelligent identification method for bird species in complex backgrounds as described in any one of claims 1-7.