Improved RetinaNet-based grassland mousehole target detection method
By improving the RetinaNet target detection method and using CSPDarknet53 and GIoU loss function to optimize feature extraction and bounding box regression, the problems of missed detection of small targets and background confusion in grassland rat hole detection are solved, and high-precision and robust rat hole detection is achieved.
Patent Information
- Application Number
- CN202510840665.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-23
- Publication Date
- 2025-09-19
AI Technical Summary
Existing technologies for detecting grassland mouse holes have problems such as missed detection of small targets in high-resolution remote sensing images, blurred edges, and background confusion, making it difficult to achieve high-precision and robust detection.
An improved RetinaNet target detection method is adopted, with CSPDarknet53 as the backbone feature extraction network, combined with the Cross Stage Partial structure and GIoU loss function, to optimize feature extraction and bounding box regression, use the feature pyramid network for multi-scale fusion, and improve data quality through data cleaning and augmentation processing.
The accuracy and robustness of rathole detection were significantly improved, the missed detection and false detection rates were reduced, and the generalization ability of the model and its ability to detect ratholes of different sizes were enhanced.
Smart Images

Figure CN120673044A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of rat hole target detection, and in particular to a grassland rat hole target detection method based on improved RetinaNet. Background Art
[0002] Ratholes are burrow systems dug by rodents on the surface or underground, and are mainly distributed in ecologically fragile areas such as grasslands, farmlands, and deserts, as well as areas with frequent human activities. As an important biological disturbance factor in the ecosystem, ratholes, on the one hand, affect vegetation succession and soil hydrological processes by changing the structure of microhabitats. On the other hand, they may become a carrier of pathogens such as Yersinia pestis, posing a potential threat to agricultural and animal husbandry production and public health safety. In arid and semi-arid areas, large-scale rathole groups may also increase the risk of wind and water erosion, leading to land degradation. Therefore, accurately obtaining information on the spatial distribution of ratholes and identifying the boundaries and structural characteristics of caves have become important needs in the fields of ecological protection, pest control, and disaster warning.
[0003] Current methods for identifying rat burrows primarily include traditional manual interpretation and automated detection based on remote sensing. Manual interpretation relies on on-site surveys by investigators, who observe features such as surface mound morphology, burrow opening diameter, and runway traces. This method offers high accuracy in small areas and can simultaneously capture detailed information such as burrow depth and connectivity. However, due to high labor costs and low operational efficiency, it is difficult to monitor over large areas. Furthermore, due to factors such as terrain obstruction and vegetation cover, missed detections are common in complex terrain. Remote sensing-based detection methods use multispectral or drone imagery to extract surface features of rat burrows. Early studies used grayscale differences in visible light images to identify burrow openings or detected areas of vegetation damage caused by rat activity using vegetation index anomalies. However, these methods are limited by image resolution (typically, individual burrow openings cannot be identified above 0.5 meters) and spectral artifacts, such as the overlap of spectral signatures between dry soil and rat mounds and the obstruction of burrow openings by low vegetation cover, resulting in significant fluctuations in detection accuracy. Although the three-dimensional modeling method based on laser radar (LiDAR) can obtain micro-topography data, the equipment cost is high and the data processing is complex, and it has not yet formed the ability to be applied in business operations.
[0004] The lack of robustness of traditional recognition methods in complex environments has prompted researchers to turn to deep learning technology. As a data-driven intelligent algorithm, deep learning automatically extracts multi-scale features of ratholes through convolutional neural networks, effectively integrating multi-dimensional information such as spectrum, texture, and spatial geometry. In the task of rathole detection, models such as YOLO and Faster R-CNN can locate and classify individual burrow openings in imagery, while semantic segmentation models such as U-Net and DeepLab excel at segmenting continuous regions within cave systems. Compared to traditional methods, deep learning offers the advantage of end-to-end processing, adapting to complex scenarios with varying vegetation cover, lighting conditions, and terrain slopes, significantly improving the identification of dense rathole clusters. However, current research still faces multiple challenges: First, high-quality annotated data is scarce, and the apparent variability of rathole samples across seasons results in insufficient generalization of training data; second, the model's ability to extract features of tiny burrow openings is limited, making it prone to missed detections; and third, the mapping between underground cave structure and surface features remains unclear, limiting in-depth analysis of the ecological impact of ratholes.
[0005] However, deep learning target detection technology faces the following technical defects when dealing with the task of rathole identification: First, small targets are missed due to category imbalance. Ratholes usually account for less than 0.8% of natural scenes. Traditional balanced sampling strategies result in a missed detection rate of up to 70% for young rat burrows with a diameter of less than 5 cm. The model's recognition accuracy for rare burrow types (such as slope protection burrows) is insufficient. Second, there is the problem of multi-scale boundary ambiguity. The downsampling operation of the convolutional network leads to the loss of gradient information at the edge of the burrow. The boundary positioning error in the transition zone between sandy soil and parent soil (spectral similarity >90%) is more than 15 pixels, and the missed segmentation rate of connecting corridors of gregarious burrows exceeds 40%. Third, feature confusion caused by detail overload. Redundant information such as rodent activity tracks and spider webs at burrow entrances in high-resolution images increases the number of model parameters by 30% and the false detection rate by 22%. In particular, light-colored stones against a gravel background in desert areas are easily misidentified as burrow entrances (the misidentification rate reaches 35%).
[0006] The limitations of traditional methods and existing deep learning models stem from the multi-dimensional complexity of rathole features and the multi-scale requirements of detection. Overcoming sample imbalance constraints and building a robust multi-feature fusion framework have become key technical bottlenecks in improving rathole identification accuracy.
[0007] Currently, no effective solutions have been proposed for the problems in related technologies. Summary of the Invention
[0008] In order to overcome the above problems, the present invention aims to propose a grassland rat hole target detection method based on improved RetinaNet, aiming to solve the problem that rat holes with high resolution, complex environmental changes and large coverage are difficult to detect.
[0009] To this end, the specific technical solutions adopted in the present invention are as follows: A prairie mouse burrow target detection method based on an improved RetinaNet, the method comprising the following steps: S1. Acquire remote sensing data of the target area and preprocess it, then construct a rathole sample dataset based on the preprocessed remote sensing data. S2. Based on the feature flow path and scale matching strategy, the backbone network and loss function of the target detection network model are improved, and the improved target detection network model is trained using the rathole sample dataset to obtain an improved target detection network model; S3. Use the improved target detection network model to identify the remote sensing data to be detected and obtain the rat hole target detection result.
[0010] Optionally, remote sensing data of the target area is obtained and preprocessed, and based on the preprocessed remote sensing data, a rathole sample dataset is constructed, including the following steps: S11, obtaining a remote sensing image of the target area, and pre-processing the remote sensing image of the target area using photogrammetry software to obtain an orthophoto image of the target rat hole area; S12. Using geographic information software, mark the rat holes in the orthophoto image of the target rat hole area to obtain corresponding labels; S13, segmenting the orthophoto image and corresponding labels of the target rat hole area to obtain a rat hole image set and a corresponding label set respectively; S14, performing data cleaning and data augmentation processing on the corresponding label set, and integrating the rat hole image set to obtain a rat hole sample data set; S15. Divide the rathole sample dataset into training set, validation set and test set.
[0011] Optionally, based on the feature flow path and scale matching strategy, improving the backbone network and loss function of the target detection network model includes the following steps: Optimize the network architecture of the target detection network model based on feature flow path and scale matching strategy; The generalized intersection-over-union loss function is used to optimize the bounding box regression loss of the object detection network model.
[0012] Optionally, the optimized network architecture in the target detection network model includes a backbone feature extraction network, a feature pyramid network, and a detection head module; Among them, the backbone feature extraction network is used to activate the pre-configured cross-stage local network structure using a smooth non-monotonic activation function, and extract features of the rathole target through the activated cross-stage local network structure to obtain the features of the rathole target; Feature pyramid network, which is used to generate several feature layers of different resolutions based on the characteristics of the rathole target and a top-down feature fusion strategy; The detection head module is used to identify the target category and location information of ratholes based on several feature layers with different resolutions and using an adaptive anchor frame mechanism and a dual-branch structure.
[0013] Optionally, the activated cross-stage local network structure includes a trunk residual branch and a cross-stage direct transfer branch; Among them, the trunk residual branch is used to stack residual units for deep semantic feature extraction; Cross-stage direct transfer branch, used to preserve shallow spatial features and transfer them across stages; Moreover, the trunk residual branch and the cross-stage direct transfer branch realize the organic fusion of high-level and low-level features through channel splicing.
[0014] Optionally, the feature layers of different resolutions include a first downsampling layer, a second downsampling layer, a third downsampling layer, a fourth downsampling layer, and a fifth downsampling layer, and downsampling multiples of the first downsampling layer, the second downsampling layer, the third downsampling layer, the fourth downsampling layer, and the fifth downsampling layer are increased in sequence; Among them, the first downsampling layer is used to preserve edge texture details and is suitable for rat hole targets of the first size; The second downsampling layer is used to balance spatial resolution and semantic information, and is suitable for the second-size rathole target; The third, fourth, and fifth downsampling layers are used to focus on strong semantic features and are suitable for rathole targets of the third size. The sizes of the first-sized rathole target, the second-sized rathole target, and the third-sized rathole target gradually increase.
[0015] Optionally, the dual-branch structure includes a classification branch and a regression branch; The classification branch is used to predict the probability of each anchor box belonging to a rat hole. It combines the cross-feature layer parameter sharing mechanism to integrate the edge texture details of the first downsampling layer and the semantic features of the third downsampling layer to improve the ability to distinguish low-contrast rat holes. The regression branch is used to predict the coordinate offset from the anchor box to the actual rathole, and combines it with the coordinate normalization method to improve the position prediction stability of rathole targets of different sizes.
[0016] Optionally, training the improved target detection network model using the rathole sample dataset to obtain the improved target detection network model includes the following steps: The improved target detection network model is trained using the training set in the rat hole sample dataset and combined with the generalized intersection-over-union loss function to obtain the trained target detection network model. The trained target detection network model is verified using the validation set in the rat hole sample dataset, and the parameters of the trained target detection network model are dynamically adjusted based on the validation results until the validation results of the trained target detection network model meet the preset validation criteria, thereby obtaining an improved target detection network model.
[0017] Optionally, using the training set in the rat hole sample dataset and combining it with the generalized intersection-over-union loss function to train the improved target detection network model, the trained target detection network model includes the following steps: Using the backbone feature extraction network of the improved target detection network model, multi-scale feature extraction is performed on the training set in the rat hole sample dataset to obtain feature images; Based on the feature pyramid network of the improved target detection network model, the feature images are fused to obtain the feature layer; According to the detection head of the improved target detection network model, the position and category of the feature layer are predicted to obtain the classification score and regression box parameters; Based on the classification score and regression box parameters, combined with the generalized intersection-over-union loss function, the bounding box in the improved object detection network model is optimized to obtain the trained object detection network model.
[0018] Alternatively, the generalized intersection-over-union loss function is expressed as: ; ; ; Where, I Represents the area of the intersection of the prediction box and the bounding box; U Represents the difference between the union area and the intersection area of the predicted box and the bounding box; A c Represents the area of the minimum enclosing rectangle of the prediction box and the bounding box; IoU Represents the intersection-over-union ratio of the predicted box and the true bounding box; GIoU represents the generalized intersection and ratio; GIoULoss represents the loss function based on generalized intersection-over-union.
[0019] Compared with the prior art, this application has the following beneficial effects: 1. To address the problems of small area, variable shape, blurred edges, and easy confusion with the background in rathole targets in high-resolution remote sensing images, this paper adopts CSPDarknet53 as the backbone feature extraction network based on the RetinaNet target detection framework, introduces the Cross Stage Partial (Cross Stage Partial) structure, effectively alleviates gradient vanishing, improves feature utilization, and reduces redundant calculations; at the same time, the GIoU loss function is introduced to optimize bounding box regression, thereby improving the accuracy and robustness of rathole detection.
[0020] 2. The present invention uses the feature pyramid network module to perform top-down multi-scale fusion of the different scale features output by the backbone network, generating multiple feature layers with different resolutions, so that the model can perceive target information of different scales, improve the detection ability of mouse holes of different sizes, and reduce the missed detection and false detection rates.
[0021] 3. This invention combines field survey records with drone image quality to select sample areas, and performs processing such as cropping, cleaning, and augmenting on labels to ensure a reasonable ratio of positive and negative samples. It also augments data through methods such as cutmix (mixed shearing) + random rotation + Gaussian noise to improve data quality and the generalization ability of the model.
[0022] 4. This invention uses a variety of target detection indicators (such as F1 score, average precision, accuracy, recall rate and frame rate, etc.) to evaluate deep learning models and compare model performance from multiple dimensions. At the same time, it integrates multi-source data such as drone remote sensing images and combines field verification methods to cross-validate the detection results to ensure the accuracy and reliability of the model.
[0023] 5. The present invention selects image data of some sample plots to input into the model to count rat holes, and compares it with the actual number of rat holes to estimate the regional rat hole density, providing quantitative data support for rodent pest monitoring and prevention. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] The above characteristics, features and advantages of the present invention and their implementation methods and methods will become more clearly understood in conjunction with the following description of the embodiments, which will be described in detail in conjunction with the accompanying drawings. Here, a schematic diagram is shown: Figure 1 is a flow chart of a prairie mouse burrow target detection method based on improved RetinaNet according to an embodiment of the present invention; Figure 2 is the geographical location of the study area in a prairie mouse burrow target detection method based on an improved RetinaNet according to an embodiment of the present invention; Figure 3 This is data for producing a sample data set in a prairie mouse burrow target detection method based on an improved RetinaNet according to an embodiment of the present invention; Figure 4 2 is a schematic structural diagram of an improved target detection model in a prairie mouse burrow target detection method based on an improved RetinaNet according to an embodiment of the present invention; Figure 5 2 is a schematic structural diagram of a RetinaNet target detection model in a prairie mouse burrow target detection method based on an improved RetinaNet according to an embodiment of the present invention; Figure 6 2 is a schematic structural diagram of a Faster R-CNN target detection model in a prairie mouse burrow target detection method based on an improved RetinaNet according to an embodiment of the present invention; Figure 7 2. It is a schematic structural diagram of a YOLOv5 target detection model in a prairie mouse burrow target detection method based on an improved RetinaNet according to an embodiment of the present invention; Figure 8 is a model training loss graph in a prairie mouse burrow target detection method based on an improved RetinaNet according to an embodiment of the present invention; Figure 9 is a model verification loss graph in a prairie mouse burrow target detection method based on an improved RetinaNet according to an embodiment of the present invention; Figure 10 This is a comparison diagram of model detection and actual labels in a prairie mouse burrow target detection method based on an improved RetinaNet according to an embodiment of the present invention; Figure 11 This is a sample image for verification of a prairie mouse burrow target detection method based on an improved RetinaNet according to an embodiment of the present invention; Figure 12 This is a confusion matrix diagram applied in a prairie mouse burrow target detection method based on an improved RetinaNet according to an embodiment of the present invention. DETAILED DESCRIPTION
[0025] In order to help those skilled in the art better understand the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.
[0026] According to an embodiment of the present invention, a method for detecting prairie mouse burrows based on an improved RetinaNet is provided.
[0027] The present invention will now be further described with reference to the accompanying drawings and specific embodiments. Figures 1-12 As shown, according to an embodiment of the present invention, a prairie mouse burrow target detection method based on an improved RetinaNet comprises the following steps: S1. Obtain remote sensing data of the target area and preprocess it. Based on the preprocessed remote sensing data, construct a rathole sample dataset.
[0028] In this optional embodiment, remote sensing data of the target area is obtained and preprocessed, and based on the preprocessed remote sensing data, a rathole sample dataset is constructed, including the following steps: S11, obtaining a remote sensing image of the target area, and pre-processing the remote sensing image of the target area using photogrammetry software to obtain an orthophoto image of the target rat hole area; S12. Using geographic information software, mark the rat holes in the orthophoto image of the target rat hole area to obtain corresponding labels; S13, segmenting the orthophoto image and corresponding labels of the target rat hole area to obtain a rat hole image set and a corresponding label set respectively; S14, performing data cleaning and data augmentation processing on the corresponding label set, and integrating the rat hole image set to obtain a rat hole sample data set; S15. Divide the rathole sample dataset into training set, validation set and test set.
[0029] It should be explained that the study area in this invention is located in the northeastern edge of the Qinghai-Tibet Plateau, with a total area of about 23,000 square kilometers. It is an important ecological barrier area in the upper reaches of the Yellow River. This area is a typical plateau meadow-mountain composite landform, with high terrain in the northwest and low terrain in the southeast, with an altitude of between 2500-4800m. The terrain is mainly composed of alpine canyons and hilly meadows. The main stream of the Yellow River and its tributaries, such as the Daxia River and the Tao River, run through it, forming a complex hydrological-geomorphological unit. The average annual precipitation in the study area is 400-600mm, and the precipitation from July to September accounts for 55%. The superposition of high-altitude cold climate and freeze-thaw action leads to the development of loose surface deposits and extremely high sensitivity of the ecosystem.
[0030] This region is prone to rodent infestations on the plateau. The burrow systems of rodents such as the plateau pika and Chinese zokor are widely distributed in alpine meadows, mountain shrublands, and areas converted from farmland to grassland. Their digging activities have led to a significant decrease in grassland vegetation cover and accelerated soil wind erosion, becoming a key driver of regional ecological degradation. The study area features a complex and diverse range of burrow types, including gregarious burrows of the plateau pika, deep burrows of the Chinese zokor, and shallow surface tunnels of the root vole. The fragmented terrain, seasonal changes in vegetation cover, and differences in soil texture make extracting spatial information about burrows a significant challenge.
[0031] To address the above issues, this paper uses high-resolution drone images as a data source and combines them with an improved RetinaNet deep learning target detection model to conduct a study on the refined extraction of regional rathole patches. Figure 2 The figure shows the geographical location of the study area. This method aims to break through the operational bottleneck of traditional technologies and provide high-precision data support for dynamic monitoring of rodent pests and benefit evaluation of ecological restoration projects.
[0032] This paper uses high-resolution drone image data taken in the area in 2024. Pix4Dmapper (photogrammetry software) is used to pre-process the captured images to generate an orthophoto map of the target rathole area.
[0033] like Figure 3 As shown, the present invention combines field survey records with drone image quality, selects three representative areas in Xiahe and Maqu, and produces samples with 15 sample plots. First, ArcGIS (geographic information software) is used to mark the rat holes in the sample area. After the rat holes in the area are marked, the labels are converted into tif files for output. Afterwards, a python program is used to segment the image and the corresponding labels. In this example, the labels are divided into 256*256 pixel labels. The completed labels are cleaned and augmented: in the data cleaning part, labels with thresholds and rat hole areas greater than 0.001 are screened out. In addition, the positive and negative sample ratios are guaranteed to be between 1:3 and 1:5; in the data augmentation part, cutmix (mixed shearing) + random rotation + Gaussian noise are used to increase the data to 4 times the original value (due to the morphological characteristics of rat holes, the angle of random rotation is controlled between -15° and 15°). The final result was 42,400 rathole images and their corresponding labels, with 10,913 positive samples and 32,902 negative samples. The training set to validation set ratio was 9:1, and the validation set to test set ratio was 9:1.
[0034] S2. Based on the feature flow path and scale matching strategy, the backbone network and loss function of the target detection network model are improved, and the improved target detection network model is trained using the rathole sample dataset to obtain an improved target detection network model.
[0035] In this optional embodiment, the improvement of the backbone network and loss function of the target detection network model based on the feature flow path and scale matching strategy includes the following steps: Optimize the network architecture of the target detection network model based on feature flow path and scale matching strategy; The generalized intersection-over-union loss function is used to optimize the bounding box regression loss of the object detection network model.
[0036] In this optional embodiment, the optimized network architecture in the target detection network model includes a backbone feature extraction network, a feature pyramid network, and a detection head module; Among them, the backbone feature extraction network is used to activate the pre-configured cross-stage local network structure using a smooth non-monotonic activation function, and extract features of the rathole target through the activated cross-stage local network structure to obtain the features of the rathole target; Feature pyramid network, which is used to generate several feature layers of different resolutions based on the characteristics of the rathole target and a top-down feature fusion strategy; The detection head module is used to identify the target category and location information of ratholes based on several feature layers with different resolutions and using an adaptive anchor frame mechanism and a dual-branch structure.
[0037] In this optional embodiment, the activated cross-stage local network structure includes a trunk residual branch and a cross-stage direct transfer branch; Among them, the trunk residual branch is used to stack residual units for deep semantic feature extraction; Cross-stage direct transfer branch, used to preserve shallow spatial features and transfer them across stages; Moreover, the trunk residual branch and the cross-stage direct transfer branch realize the organic fusion of high-level and low-level features through channel splicing.
[0038] In this optional embodiment, the feature layers of different resolutions include a first downsampling layer, a second downsampling layer, a third downsampling layer, a fourth downsampling layer, and a fifth downsampling layer, and the downsampling multiples of the first downsampling layer, the second downsampling layer, the third downsampling layer, the fourth downsampling layer, and the fifth downsampling layer are increased in sequence; Among them, the first downsampling layer is used to preserve edge texture details and is suitable for rat hole targets of the first size; The second downsampling layer is used to balance spatial resolution and semantic information, and is suitable for the second-size rathole target; The third, fourth, and fifth downsampling layers are used to focus on strong semantic features and are suitable for rathole targets of the third size. The sizes of the first-sized rathole target, the second-sized rathole target, and the third-sized rathole target gradually increase.
[0039] In this optional embodiment, the dual-branch structure includes a classification branch and a regression branch; The classification branch is used to predict the probability of each anchor box belonging to a rat hole. It combines the cross-feature layer parameter sharing mechanism to integrate the edge texture details of the first downsampling layer and the semantic features of the third downsampling layer to improve the ability to distinguish low-contrast rat holes. The regression branch is used to predict the coordinate offset from the anchor box to the actual rathole, and combines it with the coordinate normalization method to improve the position prediction stability of rathole targets of different sizes.
[0040] In this optional embodiment, training the improved target detection network model using the rathole sample dataset to obtain the improved target detection network model includes the following steps: The improved target detection network model is trained using the training set in the rat hole sample dataset and combined with the generalized intersection-over-union loss function to obtain the trained target detection network model. The trained target detection network model is verified using the validation set in the rat hole sample dataset, and the parameters of the trained target detection network model are dynamically adjusted based on the validation results until the validation results of the trained target detection network model meet the preset validation criteria, thereby obtaining an improved target detection network model.
[0041] In this optional embodiment, the improved target detection network model is trained using the training set in the rathole sample data set and combined with the generalized intersection-over-union loss function to obtain the trained target detection network model, including the following steps: Using the backbone feature extraction network of the improved target detection network model, multi-scale feature extraction is performed on the training set in the rat hole sample dataset to obtain feature images; Based on the feature pyramid network of the improved target detection network model, the feature images are fused to obtain the feature layer; According to the detection head of the improved target detection network model, the position and category of the feature layer are predicted to obtain the classification score and regression box parameters; Based on the classification score and regression box parameters, combined with the generalized intersection-over-union loss function, the bounding box in the improved object detection network model is optimized to obtain the trained object detection network model.
[0042] In this optional embodiment, the generalized intersection-over-union loss function is expressed as: ; ; ; Where, I Represents the area of the intersection of the prediction box and the bounding box; U Represents the difference between the union area and the intersection area of the prediction box and the bounding box; A c Represents the area of the minimum enclosing rectangle of the prediction box and the bounding box; IoU Represents the intersection-over-union ratio of the predicted box and the true bounding box; GIoU represents the generalized intersection and ratio; GIoULossrepresents the loss function based on generalized intersection-over-union.
[0043] It should be explained that the Faster R-CNN target detection model, YOLOv5 target detection model, RetinaNet target detection model, RetinaNet+GIoU target detection model and improved target detection model were selected for target detection experiments.
[0044] Improved target detection model: like Figure 4 As shown in the figure (Input represents input data; Regression represents regression branch; Classification represents classification branch; Prediction represents prediction result), to address the problems of small targets difficult to identify and complex background interference in grassland mouse burrow detection, the CSP-RetinaNet model (i.e., improved target detection network model) achieves breakthroughs in detection performance through innovative module design. Its core architecture is organically composed of three modules: the backbone feature extraction network (Backbone), the feature pyramid network (FPN), and the detection head. Each module plays a key role in solving specific detection problems.
[0045] CSP-Darknet53, the foundational feature extraction unit for an improved object detection model, is inspired by addressing the vanishing gradient and computational redundancy issues of traditional residual networks. This network employs a Cross Stage Partial (CSP) architecture, creatively splitting feature maps into a main residual branch and a cross-stage direct transfer branch. The main residual branch extracts deep semantic features by stacking residual units, while the cross-stage direct transfer branch directly preserves shallow spatial features and transfers them across stages. Ultimately, channel concatenation enables the organic fusion of high- and low-level features. This "divide-and-fuse" mechanism significantly improves gradient fluidity and alleviates the vanishing gradient problem in deep network training. Specifically, the network first processes a 600×600×3 high-resolution remote sensing image through an initial convolutional layer. A 3×3 convolution with stride 1 is then used to generate a 32-channel feature map, preserving spatial resolution while completing the initial mapping from pixel space to feature space. The five subsequent CSP residual modules use stride-2 downsampling convolutions or max pooling operations to gradually halve the feature size (output sizes are 75×75, 38×38, 19×19, and so on), while doubling the number of channels (256 → 512 → 1024). Residual connections within each module enhance gradient propagation, while cross-stage connections ensure the effective preservation of shallow position information. This ultimately generates deep features that possess both semantic abstraction (for object classification) and spatial detail representation (for location localization), which is crucial for detecting ratholes with blurred edges and variable shapes.
[0046] CSPDarknet53 uses the Mish activation function (smooth non-monotonic activation function) throughout. Compared to the hard clipping of ReLU and the complex computation of Swish, its smooth, non-monotonic nature prevents vanishing gradients and improves the stability of deep network training. It also enhances responsiveness to fine-grained features such as the irregular shapes of ratholes and subtle grayscale differences, making the feature distribution more consistent with the statistical laws of natural images and significantly improving the model's robustness under complex lighting conditions. Ultimately, the backbone network outputs three feature layers: C3 (75×75×256), C4 (38×38×512), and C5 (19×19×1024). These layers correspond to high spatial detail, balanced semantic and spatial information, and strong semantic features, respectively. These layers provide multi-scale input for the subsequent feature pyramid network, meeting the feature requirements for targets of varying scales in rathole detection.
[0047] The Feature Pyramid Network uses the three-layer feature output of CSPDarknet53 as input and generates five feature layers of different resolutions, P3-P7, through a top-down feature fusion strategy. The specific process is as follows: High-level features C5 (19×19×1024) are first reduced to 256 channels using a 1×1 convolution. They are then upsampled to the same size as C4 using nearest neighbor interpolation. These features are then element-wise added to the shallow features of C4 to fuse high-level semantic information (such as object presence) with shallow positional information (such as edge coordinates). This process is repeated to generate P4 (38×38×256) and P3 (75×75×256). Additional downsampling is then performed to generate P6 (the fourth downsampling layer, 10×10×256) and P7 (the fifth downsampling layer, 5×5×256). Each feature layer performs different functions in rathole detection. P3 (the first downsampling layer) serves as a 16x downsampling layer (75×75), preserving rich edge and texture details. It specifically targets extremely small ratholes with a pixel ratio of less than 0.1% and a diameter of less than 4 pixels (i.e., the first size of rathole targets). P4 (the second downsampling layer, 32x downsampling, 38×38) balances spatial resolution with semantic information, making it suitable for detecting medium-sized ratholes with diameters of 4-10 pixels (i.e., the second size of rathole targets). P5, P6, and P7 (the third, fourth, and fifth downsampling layers, 64-256x downsampling, 19×19 and below) focus on strong semantic features to identify large ratholes and target outlines against complex backgrounds (i.e., the third size of rathole targets). This multi-scale feature fusion strategy effectively addresses the large scale variation of grassland ratholes. By matching corresponding feature layers to targets of different sizes, the model's detection recall rate is improved. At the same time, high-level semantic features help distinguish rat holes from similar interference objects, and shallow spatial features accurately locate the target edges, significantly reducing the false detection rate.
[0048] The detection head equips each feature layer (P3-P7) with an independent classification branch and regression branch, forming a dual-branch detection architecture. The classification branch outputs the probability that each anchor box belongs to a rathole through four layers of 3×3 convolution. To address grayscale confusion between ratholes and the background, a cross-feature layer parameter sharing mechanism is employed, integrating multi-scale contextual information such as P3 edge details and P5 semantic features to improve the ability to discriminate low-contrast targets. The regression branch also predicts the coordinate offsets of the anchor boxes to the actual ratholes through four layers of 3×3 convolution. Coordinate normalization is also introduced to ensure the model's stability in predicting the positions of objects of varying scales. To adapt to the actual size distribution of grassland ratholes, the detection head incorporates an adaptive mechanism consisting of five sets of multi-scale anchor boxes, significantly improving the detection of small targets.
[0049] To optimize the bounding box regression loss, CSP-RetinaNet uses the Generalized Intersection-over-Union (GIoU) loss function (GIoU) instead of the traditional Smooth L1 loss. The GIoU loss not only considers the overlap between the predicted and ground-truth boxes but also incorporates the minimum bounding rectangle area as a reference. This effectively addresses the vanishing gradient issues of traditional loss functions when the predicted and ground-truth boxes do not intersect, and the unclear optimization direction for irregular objects. By penalizing non-overlapping areas within the bounding rectangle, this loss function guides the predicted box to converge toward the geometric center of the ground-truth object, improving bounding box positioning accuracy. This is particularly useful in scenarios where the labeled box is ambiguous due to blurred mousehole edges.
[0050] In object detection tasks, the accuracy of bounding box regression is crucial to model performance. The Smooth L1 loss, a classic regression loss function, balances the gradient stability of the L1 loss with the outlier robustness of the L2 loss through a piecewise linear design. Its core idea is to smooth coordinate offsets: when the coordinate difference between the predicted and ground-truth boxes is less than 1, the L2 loss is used to ensure gradient continuity; when the difference is greater than 1, the L1 loss is switched to reduce the impact of outliers. This design makes it insensitive to severely offset predicted boxes in the early stages of training, and its gradients are stable and easy to converge. It is particularly suitable for optimizing local coordinate offsets of bounding boxes, enabling fine-grained adjustments to the box's position in dense object detection scenarios, improving the localization accuracy of small objects. However, the Smooth L1 loss only focuses on the absolute value of the coordinate difference, ignoring the spatial geometric relationship between the predicted and ground-truth boxes. This makes it unable to provide effective gradient guidance when the two boxes are completely disjoint, limiting localization capabilities in complex scenarios.
[0051] The GIoU loss function, based on geometric relationships, extends the Intersection over Union (IoU) (IoU) into a more comprehensive geometric constraint by introducing the minimum enclosing rectangle area that contains both the predicted and ground-truth boxes. This loss function, in addition to calculating the IoU, additionally penalizes areas where the predicted and ground-truth boxes do not fill the minimum enclosing rectangle. This effectively handles the regression problem of non-overlapping boxes and constrains the relative position and shape matching of the bounding boxes. For example, when the predicted and ground-truth boxes are separated, the GIoU loss function guides the two boxes to regress toward overlap. When a containment relationship exists, the box size is further optimized to reduce "hollow" areas. This scale-invariant design ensures more balanced detection of objects of varying sizes, making it particularly suitable for scenes with easily occluded objects and complex backgrounds. Rat holes in grassland settings are characterized by complex backgrounds and high occlusions. Therefore, the GIoU loss function is used in place of the Smooth L1 loss function in the cross-stage local retinal network model to enhance the model's representational capabilities and, to a certain extent, improve the model's extraction accuracy. The GIoU loss function is expressed as: ; ; ; Where, I Represents the area of the intersection of the prediction box and the bounding box; U Represents the difference between the union area and the intersection area of the predicted box and the bounding box; A c Represents the area of the minimum enclosing rectangle of the prediction box and the bounding box; IoU Represents the intersection-over-union ratio of the predicted box and the true bounding box; GIoU represents the generalized intersection and ratio; GIoULoss represents the loss function based on generalized intersection-over-union.
[0052] The three modules achieve efficient collaboration through feature flow paths and scale matching strategies: high-resolution images are first extracted with multi-scale features by CSPDarknet53, and then FPN fusion is used to generate a feature layer that adapts to different target sizes. The detection head combines an adaptive anchor box mechanism with a dual-branch structure to output target category and location information, and finally reversely optimizes the entire network parameters through the GIoU loss.
[0053] RetinaNet object detection model: like Figure 5As shown in the figure (Image represents image; Res1-Res5 represents residual modules; M3-M5 represents output feature layers; P3-P7 represents feature pyramid levels; W represents feature map width; H represents feature map height; K represents villa class; A represents the number of classification branch anchor points), the RetinaNet object detection model is an advanced object detection network based on a single-stage detection concept. Compared with traditional two-stage detection methods, the RetinaNet object detection model significantly improves detection speed while maintaining high detection accuracy, making it ideal for the automated processing of large-scale, high-resolution remote sensing imagery. Rathole detection in grassland environments faces numerous challenges, including small target area, irregular morphology, complex background, and susceptibility to noise. To address these challenges, the RetinaNet object detection model, with its unique structural design and loss function, demonstrates outstanding performance in grassland rathole detection.
[0054] The introduction of the Focal Loss function effectively addresses the extreme imbalance between positive and negative samples. Ratholes in grassland remote sensing images are far less numerous than background targets. Traditional loss functions can easily bias the model toward background detection, leading to missed detection of small targets. Focal Loss significantly improves the model's detection sensitivity and recall for small rathole targets by dynamically adjusting the loss weights for easy-to-classify and difficult-to-classify samples.
[0055] RetinaNet+GIoU target detection model: The Focal Loss loss function is replaced by the GIoU loss function (generalized intersection-over-union loss function).
[0056] Faster R-CNN object detection model: like Figure 6As shown in the figure (Conv denotes convolution; Pooling denotes pooling; Relu denotes ReLU activation function; FullConnection denotes full connection; Feature Map denotes feature map; Reshape denotes dimension reshaping; Softmax denotes softmax classification function; Proposal denotes proposal region; ROIPooling denotes region of interest pooling; bbox_pred denotes bounding box prediction), the Faster R-CNN model is a classic two-stage object detection network. It jointly trains a region proposal network (RPN) and a detection head (Fast R-CNN), making it suitable for accurately identifying complex objects in high-resolution remote sensing imagery. The Faster R-CNN model demonstrates outstanding performance in grassland mouse burrow detection thanks to its two-stage detection mechanism and sophisticated region proposal strategy. Faster R-CNN utilizes a backbone network to extract deep features from the input image, followed by a region proposal network (RPN) to generate candidate regions (proposals). The RPN employs a sliding window and anchor box mechanism to efficiently screen out regions that may contain mouse burrows, significantly reducing the computational complexity of subsequent detection while improving the recall rate for small mouse burrows. In the second stage, the Fast R-CNN module performs accurate classification and bounding box regression on the candidate regions to further optimize the detection results and effectively suppress false detections and missed detections in complex backgrounds.
[0057] YOLOv5 object detection model: like Figure 7As shown in the figure (Input represents input data; Focus represents the Focus module; CBS stands for Conv+BN+SiLU (i.e., convolution, batch normalization, and SiLU activation); CSP represents the CSP architecture; SPP represents spatial pyramid pooling; Concat represents concatenation; Conv represents convolution; and prediction represents the prediction result), the YOLOv5 object detection model follows the classic Backbone-Neck-Head three-stage design. The YOLOv5 object detection model uses the Focus layer as an input preprocessing module, achieving efficient downsampling through slicing. This is followed by a combination of the CBS module (Conv+BN+SiLU) and the CSP architecture (CSP1_1 and CSP1_3) to extract multi-scale features step by step. The CSP module uses cross-stage connections and feature segmentation to reduce the number of parameters while maintaining feature expressiveness. The Neck network adopts an FPN+PAN architecture, fusing feature maps from different layers through upsampling and Concat operations. The upper branch (FPN) transfers semantic information from top to bottom, while the lower branch (PAN) enhances localization details from bottom to top. The CSP2_1 module further integrates features, balancing the model's representational capabilities and computational efficiency. The head section features three independent prediction branches, corresponding to the detection of large, medium, and small objects, respectively. Each branch consists of a Conv layer and a classification / regression head, directly outputting bounding box coordinates, class probabilities, and object confidence, enabling end-to-end detection of multi-scale objects.
[0058] Using samples from areas not included in the dataset as input images, the trained model is used to extract ratholes. The extracted results are counted to obtain the number of ratholes in a single sample area. The count is then compared with the actual number of marked ratholes to verify the accuracy of the model from an example perspective.
[0059] like Figure 8 As shown in the figure (epochs indicates the number of model training times), there are training loss graphs for the Faster R-CNN target detection model, the YOLOv5 target detection model, the RetinaNet target detection model, the RetinaNet+GIoU target detection model, and the improved target detection model.
[0060] Five models, including the Faster R-CNN target detection model, the YOLOv5 target detection model, the RetinaNet target detection model, the RetinaNet+GIoU target detection model, and the improved target detection model, were selected for end-to-end training. The sample set was divided into a training set and validation set ratio of 9:1 and a validation set and test set ratio of 9:1, resulting in a training set of 34,344 images, a validation set of 3,816 images, and a test set of 4,240 images. Hyperparameters such as input image size, training batch, learning rate, and number of iterations have a significant impact on model training. Table 1 shows the training parameters set by the present invention. Table 2 shows the software environment and hardware configuration information used in the present invention.
[0061] Table 1 Hyperparameter settings of the model in this embodiment Table 2 Software environment and hardware configuration information like Figure 9 As shown in the figure (in the figure, epochs indicates the number of model training times), it is the verification loss graph of the Faster R-CNN target detection model, the YOLOv5 target detection model, the RetinaNet target detection model, the RetinaNet+GIoU target detection model and the improved target detection model. Figure 11 As shown, there are sample images of the validation sets of the Faster R-CNN target detection model, the YOLOv5 target detection model, the RetinaNet target detection model, the RetinaNet+GIoU target detection model, and the improved target detection model.
[0062] For the task of detecting rat holes in grassland environments, such as Figure 10 As shown, the test set images are input into the trained model for prediction, and the prediction results are compared with the labels pixel by pixel, as shown in Figure 12As shown in the figure (Confusion Matrix represents the confusion matrix; True Label represents the true label; Predicted Label represents the predicted label; Positive represents the positive class; Negative represents the negative class), a binary confusion matrix (M=2, with positive classes representing rathole areas and negative classes representing non-rathole areas) was constructed, containing the four basic metrics of TP / TN / FP / FN. As shown in Table 3, the detection performance of the five models was comprehensively evaluated using five metrics: F1 score, mean average precision (mAP), precision (Pre), recall (Rec), and frame rate (FPS). Precision represents the model's ability to correctly identify ratholes, recall reflects the completeness of detection of grassland rathole areas, and the F1 score comprehensively reflects classification performance by balancing the harmonic mean of the two. mAP integrates the precision performance under multiple confidence thresholds to comprehensively evaluate the overall performance of the detection model in complex grassland scenes. P(r) is the precision corresponding to recall. Frame rate (FPS) quantifies the model's inference efficiency in processing grassland imagery, representing the number of image frames processed per second, reflecting the algorithm's real-time performance. In addition, the study integrates multi-source data such as drone remote sensing images, and combines field verification methods to cross-validate the test results.
[0063] Table 3 Model evaluation indicators and corresponding calculation methods In the table, P ( r ) indicates the recall rate is r mAP stands for mean average precision (the average value of multi-category precision AP); FPS stands for frames per second; time Indicates the inference time for a single image; TP indicates true positive examples; FP indicates false positive examples; FN indicates false negative examples; Precision indicates the precision rate; Recall indicates the recall rate; and F1-Score indicates the F1 score.
[0064] An analysis of the object detection results reveals that each model demonstrates good rathole detection capabilities, but significant differences exist between models. Table 4 lists the accuracy evaluation results of the five models using test data, including metrics such as mAP, FPS, Precision, Recall, and F1-Score. The results show that CSP-RetinaNet achieves the highest mAP (81.82%) and F1 (59.17%), demonstrating the effectiveness of the improvements to RetinaNet and significant improvements in overall model performance. YOLOv5-s achieves the highest Precision at 94.83%, Faster-RCNN achieves the highest Recall at 86.99%, and YOLOv5-s achieves the highest F1-Score at 85.40. Generally speaking, for real-time monitoring, an FPS of 25 (frames per second) is optimal. Therefore, although the proposed improved algorithm exhibits some reduction in detection efficiency, it still meets the requirements of real-time monitoring.
[0065] Table 4 Accuracy evaluation results of five models (FPS unit: frames per second) The improved algorithm was validated using a selected sample area. The fused and stitched RGB images were input into the model for target detection, and the number of ratholes was counted and compared with the ground truth. A sample of 5,000 images from the Maqu County plot was selected for detection and analysis. The actual number of ratholes was 251, and 199 were detected using CSP-RetinaNet. The results demonstrated that the model has a strong ability to identify grassland backgrounds, with only two false positives, a specificity of 99.96%, and an accuracy of 99%. It can reliably filter out non-rathole areas with an extremely low risk of false positives, making it suitable for grassland ecological monitoring scenarios with a low tolerance for false positives. However, 50 rathole detections were missed, resulting in a recall rate of approximately 79.92%. This may be due to the diverse morphology of ratholes, their small image size, or a conservative detection threshold setting, which may have led to some ratholes not being identified. This makes the model suitable for large-scale preliminary screening to improve monitoring efficiency.
[0066] In general, the model performs excellently in "reducing false alarms" and can support efficient screening of grassland rat holes, but needs to be strengthened in "avoiding missed reports" - through data balancing and model optimization, the ability to identify rat holes can be supplemented, and ultimately "large-scale rapid screening + high-precision disposal" can be achieved. It not only uses high specificity and accuracy to reduce invalid operations (mistakenly digging non-rat holes), but also reduces the risk of missed detection by improving the recall rate (avoiding the spread of rodent infestation), providing precise technical support for grassland ecological restoration.
[0067] This paper proposes an improved RetinaNet method for detecting rat burrows in grasslands. This method integrates high-resolution drone remote sensing imagery with deep learning techniques. Addressing the complexity of rat burrow detection in grassland landscapes, this method utilizes the CSPDarknet53 backbone network, the GIoU loss function, and a multi-scale feature fusion strategy to construct a refined rat burrow detection model suitable for complex environments. Empirical research in Hezuo City, Xiahe County, and Maqu County in Gannan Tibetan Autonomous Prefecture validated the effectiveness of this method in high-incidence rodent infestations on the plateau.
[0068] Results show that the improved CSP-RetinaNet model achieves the best performance in a multi-model comparison, achieving a mAP of 81.82% and an F1 score of 0.82. It balances detection accuracy (92.77%) and recall (73.33%) while maintaining an inference speed (59.17 FPS) sufficient for real-time monitoring. Compared to the traditional RetinaNet model, the introduction of the GIoU loss function reduces bounding box localization error by 15%, effectively addressing technical bottlenecks such as class imbalance, blurred boundaries, and feature confusion.
[0069] Through data augmentation (cutmix + random rotation + Gaussian noise) and field cross-validation, the model's robustness was significantly improved in complex scenarios such as changing vegetation cover and soil texture variations. Estimating rat burrow density using drone imagery and field verification showed that this method can accurately count rat burrows, providing a quantitative basis for categorizing rodent infestation levels.
[0070] S3. Use the improved target detection network model to identify the remote sensing data to be detected and obtain the rat hole target detection result.
[0071] It should be explained that the improved RetinaNet model constructed in the present invention breaks through the limitations of traditional manual interpretation and single remote sensing technology, provides a rat hole detection solution that is both efficient and accurate, and provides key data support for the benefit evaluation of ecological restoration projects and public health and safety prevention and control, and has important business application potential.
[0072] In summary, with the help of the above technical solutions of the present invention, the present invention aims to solve the problems of small target area, variable shape, blurred edges and easy confusion with the background of rathole targets in high-resolution remote sensing images. On the basis of the RetinaNet target detection framework, CSPDarknet53 is adopted as the backbone feature extraction network, and the Cross Stage Partial (cross-stage local network) structure is introduced to effectively alleviate the gradient disappearance, improve feature utilization, and reduce redundant calculations. At the same time, the GIoU loss function is introduced to optimize the bounding box regression to improve the accuracy and robustness of rathole detection; the present invention uses the feature pyramid network module to perform top-down multi-scale fusion of the different scale features output by the backbone network to generate multiple feature layers of different resolutions, so that the model can perceive target information of different scales, improve the detection ability of ratholes of different sizes, and reduce the missed detection and false detection rates; the present invention combines the field survey records and the quality of drone images to select sample areas, and performs cropping, cleaning, augmentation and other processing on the labels to ensure the positive and negative sample ratio The example is reasonable, and data is augmented by cutmix (mixed shearing) + random rotation + Gaussian noise to improve data quality and the generalization ability of the model; the present invention uses a variety of target detection indicators (such as F1 score, average precision, accuracy, recall rate and frame rate, etc.) to evaluate the deep learning model and compare the model performance from multiple dimensions; at the same time, it integrates multi-source data such as drone remote sensing images, and combines field verification methods to cross-validate the detection results to ensure the accuracy and reliability of the model; the present invention selects image data of some sample plots to input the model to count rat holes, and compares it with the actual number of rat holes to estimate the regional rat hole density, providing quantitative data support for rodent pest monitoring and prevention.
[0073] Although the present invention has been disclosed above with reference to preferred embodiments, the embodiments are merely examples for the purpose of illustration and are not intended to limit the present invention. Those skilled in the art may make various modifications and alterations without departing from the spirit and scope of the present invention. The scope of protection claimed by the present invention shall be subject to the claims.
Claims
1. A grassland mouse hole target detection method based on improved RetinaNet, characterized in that: The method comprises the following steps: S1. Acquire remote sensing data of the target area and preprocess it, then construct a rathole sample dataset based on the preprocessed remote sensing data. S2. Based on the feature flow path and scale matching strategy, the backbone network and loss function of the target detection network model are improved, and the improved target detection network model is trained using the rathole sample dataset to obtain an improved target detection network model; S3. Use the improved target detection network model to identify the remote sensing data to be detected and obtain the rat hole target detection result.
2. The method for detecting prairie mouse holes based on improved RetinaNet according to claim 1, characterized in that: Acquiring remote sensing data of the target area and preprocessing it, and constructing a rathole sample dataset based on the preprocessed remote sensing data includes the following steps: S11, obtaining a remote sensing image of the target area, and pre-processing the remote sensing image of the target area using photogrammetry software to obtain an orthophoto image of the target rat hole area; S12. Using geographic information software, mark the rat holes in the orthophoto image of the target rat hole area to obtain corresponding labels; S13, segmenting the orthophoto image and corresponding labels of the target rat hole area to obtain a rat hole image set and a corresponding label set respectively; S14, performing data cleaning and data augmentation processing on the corresponding label set, and integrating the rat hole image set to obtain a rat hole sample data set; S15. Divide the rathole sample dataset into training set, validation set and test set.
3. The method for detecting prairie mouse holes based on improved RetinaNet according to claim 1, characterized in that: The improvement of the backbone network and loss function of the target detection network model based on the feature flow path and scale matching strategy includes the following steps: Optimize the network architecture of the target detection network model based on feature flow path and scale matching strategy; The generalized intersection-over-union loss function is used to optimize the bounding box regression loss of the object detection network model.
4. The method for detecting prairie mouse holes based on improved RetinaNet according to claim 3, characterized in that: The optimized network architecture in the target detection network model includes a backbone feature extraction network, a feature pyramid network and a detection head module; Among them, the backbone feature extraction network is used to activate the pre-configured cross-stage local network structure using a smooth non-monotonic activation function, and extract features of the rathole target through the activated cross-stage local network structure to obtain the features of the rathole target; Feature pyramid network, which is used to generate several feature layers of different resolutions based on the characteristics of the rathole target and a top-down feature fusion strategy; The detection head module is used to identify the target category and location information of ratholes based on several feature layers with different resolutions and using an adaptive anchor frame mechanism and a dual-branch structure.
5. The method for detecting prairie mouse holes based on improved RetinaNet according to claim 4, characterized in that: The activated cross-stage local network structure includes a trunk residual branch and a cross-stage direct transfer branch; Among them, the trunk residual branch is used to stack residual units for deep semantic feature extraction; Cross-stage direct transfer branch, used to preserve shallow spatial features and transfer them across stages; Moreover, the trunk residual branch and the cross-stage direct transfer branch realize the organic fusion of high-level and low-level features through channel splicing.
6. The method for detecting prairie mouse holes based on improved RetinaNet according to claim 4, characterized in that: The feature layers of different resolutions include a first downsampling layer, a second downsampling layer, a third downsampling layer, a fourth downsampling layer, and a fifth downsampling layer, and the downsampling multiples of the first downsampling layer, the second downsampling layer, the third downsampling layer, the fourth downsampling layer, and the fifth downsampling layer are increased in sequence; Among them, the first downsampling layer is used to preserve edge texture details and is suitable for rat hole targets of the first size; The second downsampling layer is used to balance spatial resolution and semantic information, and is suitable for the second-size rathole target; The third, fourth, and fifth downsampling layers are used to focus on strong semantic features and are suitable for rathole targets of the third size. The sizes of the first-sized rathole target, the second-sized rathole target, and the third-sized rathole target gradually increase.
7. The method for detecting prairie mouse holes based on improved RetinaNet according to claim 6, characterized in that: The dual-branch structure includes a classification branch and a regression branch; The classification branch is used to predict the probability of each anchor box belonging to a rat hole. It combines the cross-feature layer parameter sharing mechanism to integrate the edge texture details of the first downsampling layer and the semantic features of the third downsampling layer to improve the ability to distinguish low-contrast rat holes. The regression branch is used to predict the coordinate offset from the anchor box to the actual rathole, and combines it with the coordinate normalization method to improve the position prediction stability of rathole targets of different sizes.
8. The method for detecting prairie mouse holes based on improved RetinaNet according to claim 2, characterized in that: The improved target detection network model is trained using the rat hole sample data set to obtain the improved target detection network model, which includes the following steps: The improved target detection network model is trained using the training set in the rat hole sample dataset and combined with the generalized intersection-over-union loss function to obtain the trained target detection network model. The trained target detection network model is verified using the validation set in the rat hole sample dataset, and the parameters of the trained target detection network model are dynamically adjusted based on the validation results until the validation results of the trained target detection network model meet the preset validation criteria, thereby obtaining an improved target detection network model.
9. The method for detecting prairie mouse holes based on improved RetinaNet according to claim 8, characterized in that: The improved target detection network model is trained using the training set in the rat hole sample data set and combined with the generalized intersection-over-union loss function to obtain the trained target detection network model, which includes the following steps: Using the backbone feature extraction network of the improved target detection network model, multi-scale feature extraction is performed on the training set in the rat hole sample dataset to obtain feature images; Based on the feature pyramid network of the improved target detection network model, the feature images are fused to obtain the feature layer; According to the detection head of the improved target detection network model, the position and category of the feature layer are predicted to obtain the classification score and regression box parameters; Based on the classification score and regression box parameters, combined with the generalized intersection-over-union loss function, the bounding box in the improved object detection network model is optimized to obtain the trained object detection network model.
10. The method for detecting prairie mouse holes based on improved RetinaNet according to claim 9, characterized in that: The generalized intersection-over-union loss function is expressed as: ; ; ; Where, I Represents the area of the intersection of the prediction box and the bounding box; U Represents the difference between the union area and the intersection area of the prediction box and the bounding box; A c Represents the area of the minimum enclosing rectangle of the prediction box and the bounding box; IoU Represents the intersection-over-union ratio of the predicted box and the true bounding box; GIoU represents the generalized intersection and ratio; GIoULoss represents the loss function based on generalized intersection-over-union.