Grassland mouse hole identification method, device and equipment and storage medium
By improving the YOLOv8n model and combining the target scale information of the drone image, the problems of complex mouse hole recognition operation and long data processing time in the prior art are solved, and high-precision and high-reality grassland mouse hole recognition are achieved.
Patent Information
- Application Number
- CN202510110368.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-23
- Publication Date
- 2025-05-06
- Estimated Expiration
- 2045-01-23
AI Technical Summary
The existing mouse hole recognition technology based on drone images is complex in operation, the accuracy depends on the experience of interpreters, and the data processing time of the OBIA method is long, reducing real-time.
By acquiring multiple historical drone images of the grassland area, the target scale of the mouse hole was determined, and the YOLOv8n model was improved based on this scale, redundant detection heads and feature integration modules were eliminated, and the deep semantic information of the backbone network was retained and the shallow geometric information was fused.
The operation process is simplified, the accuracy and real-timeness of mouse hole recognition are improved, and the work experience of interpreters is not relied on, which greatly reduces the time for data processing.
Smart Images

Figure CN119942383A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of rat hole identification, and in particular to a grassland rat hole identification method, device, equipment and storage medium. Background Art
[0002] At present, the identification of grassland rat holes in my country is mainly based on manual field investigation. The operation is simple and intuitive, and the technical requirements for rat hole identification personnel are low. However, there are the following problems: First, the results of the rodent infestation survey are related to the number and representativeness of the selected sample plots. Too many sample plots result in high manpower and economic costs. The selection of sample plots is limited by geographical conditions, and the accuracy of the survey results is poor. Second, the traditional survey method focuses on the rodent population itself, which is complicated to operate and has poor real-time performance. It is also impossible to conduct repeated and large-scale monitoring of grassland rodent-infested areas. When large-scale rodent infestation occurs, it is easy to lead to the delay in reporting of rodent infestation information.
[0003] The drone system integrates unmanned aerial vehicles, GPS navigation and positioning, and aerial remote sensing technologies. It has the advantages of high spatial resolution, timely information acquisition, low economic cost, and low cloud interference. Target detection based on drone images is widely used in emergency relief, power inspection, and traffic monitoring. Through the images taken by drones, researchers can conduct intelligent analysis and quickly and efficiently extract ground object information, saving a lot of manpower and material resources. Plot-scale drone remote sensing has become one of the main forms of aerial remote sensing, providing a new means for identifying grassland rat holes.
[0004] The existing rat hole identification technology based on drone images is divided into two methods: visual interpretation and object-oriented image analysis (OBIA). The former technology uses manual visual interpretation to count rat holes in visible light images taken by drones, GIS grids, and GIS overlay analysis to obtain the spatial distribution trend of rat hole groups and the coverage rate of rat hole groups. It is a semi-automatic rat hole identification technology. OBIA technology can obtain homogeneous object information and is becoming more and more common in high-resolution drone image analysis. The current rat hole identification research combines OBIA with machine learning technologies such as template matching, random forests, and decision trees, and can obtain an accuracy rate of 87.17%. The above research confirms that rat hole identification through drone technology has great practical application value and provides efficient and intelligent solutions for grassland rodent control.
[0005] The operation process of rathole identification based on visual interpretation of UAV images is complicated, and the accuracy of rathole identification depends on the work experience of the interpreters, so it is not feasible. The extended feature space of homogeneous objects in the OBIA method, such as spectral features, texture features, and shape features, greatly increases the complexity of image analysis, and its processing time is long, which reduces the real-time performance of data processing. Summary of the invention
[0006] Based on the defects of the above-mentioned prior art, the present invention provides a grassland rat hole identification method, device, equipment and storage medium, which solves the problems of complex operation process of existing rat hole identification based on visual interpretation of drone images and long data processing time of OBIA method.
[0007] The present invention adopts the following technical solutions:
[0008] In a first aspect, the present invention provides a method for identifying prairie mouse holes, comprising the following steps:
[0009] Acquire multiple historical drone images of the grassland area;
[0010] The target scale of the rat hole to be identified is determined based on the target frames of the rat holes in multiple historical drone images, and the target detection head in the head network of the original YOLOv8n model and the target feature integration module in the neck are determined based on the target scale;
[0011] The remaining detection heads except the target detection head in the head network of the original YOLOv8n model are removed, and the remaining feature integration modules except the target feature integration module in the neck network are removed. The structure in which the third C2f layer and SPPF layer in the backbone network of the original YOLOv8n model are connected to the second C2f layer in the neck network through the Upsample module and the Concat module is retained to obtain an improved YOLOv8n model.
[0012] The drone images to be identified in the grassland area are collected, cropped and input into the improved YOLOv8n model to obtain the corresponding rat hole identification results.
[0013] Preferably, determining the target scale of the rathole to be identified according to the target frames of the ratholes in the multiple historical drone images comprises the following steps:
[0014] Each historical drone image is cropped to obtain multiple cropped images, and the rat holes in the cropped images are marked to obtain multiple target boxes;
[0015] The sizes of multiple target boxes are counted to obtain the target scale of the rat hole to be identified.
[0016] Preferably, the image resolution of the historical drone image is 5280 pixels × 3956 pixels, the image resolution of multiple cropped images is 300 pixels × 300 pixels, the width and height of multiple target frames are distributed in an area within 0.1 × 0.1, and the target scale of the rat hole to be identified is within 30 × 30 pixels.
[0017] Preferably, the remaining detection heads other than the target detection head in the head network of the original YOLOv8n model are removed, and the remaining detection heads include 20×20 and 40×40 detection heads.
[0018] Preferably, before inputting the multiple images to be recognized into the improved YOLOv8n model in sequence, the improved YOLOv8n model needs to be trained, and the training process includes the following steps:
[0019] A plurality of historical drone images are screened, and the screened historical drone images are cropped to obtain a plurality of sample images, each of which has a rat hole;
[0020] The rat holes in multiple sample images were annotated to obtain a data set, which was then divided into a training set, a test set, and a validation set according to a ratio of 8:1:1.
[0021] The improved YOLOv8n model is trained through the training set, and the trained improved YOLOv8n model is tested and verified through the test set and validation set.
[0022] In a second aspect, the present invention provides a prairie mouse hole identification device, comprising:
[0023] an acquisition module to acquire multiple historical drone images of grassland areas;
[0024] A determination module is used to determine the target scale of the rat hole to be identified according to the target frames of the rat holes in multiple historical drone images, and to determine the target detection head in the head network of the original YOLOv8n model and the target feature integration module in the neck based on the target scale;
[0025] A construction module is used to remove the remaining detection heads except the target detection head in the head network of the original YOLOv8n model, remove the remaining feature integration modules except the target feature integration module in the neck network, retain the structure in which the third C2f layer and SPPF layer in the backbone network of the original YOLOv8n model are connected to the second C2f layer in the neck network through the Upsample module and the Concat module, and obtain an improved YOLOv8n model;
[0026] The recognition module is used to collect drone images to be identified in the grassland area, crop the drone images to be identified, and input them into the improved YOLOv8n model to obtain the corresponding rat hole recognition results.
[0027] In a third aspect, the present invention provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned prairie mouse hole identification method when executing the program.
[0028] In a fourth aspect, the present invention provides a computer-readable storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned prairie mouse hole identification method is implemented.
[0029] Compared with the prior art, at least one of the above technical solutions adopted by the present invention can achieve the following beneficial effects:
[0030] The present invention first determines the target scale based on the target frame of the rat hole in the historical drone image of the grassland area, and improves the original YOLOv8n model based on the target scale. Specifically, the remaining detection heads outside the target detection head in the head network of the original YOLOv8n model are eliminated, and the remaining feature integration modules outside the target feature integration module in the neck network are eliminated, thereby reducing the network complexity; while retaining the structure in which the third C2f layer and the SPPF layer in the backbone network of the original YOLOv8n model are connected to the second C2f layer in the neck network through the Upsample module and the Concat module, the present invention retains the fusion of the deep semantic information of the backbone network and the shallow geometric information, effectively extracts the features used for rat hole identification, and effectively improves the identification accuracy. The operation process of the present invention is simple, and the rat hole identification accuracy does not need to rely on the work experience of the interpreter. At the same time, the structure of the improved YOLOv8n model is simple, which greatly improves the real-time performance of grassland rat hole identification. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0032] Figure 1 This is a schematic diagram of the hardware system for UAV image acquisition of the present invention;
[0033] Figure 2 Constructing a flow chart for the dataset of the present invention;
[0034] Figure 3 This is a schematic diagram of the original YOLOv8n model structure;
[0035] Figure 4 It is a relative scale statistical diagram of the rathole data prior frame of the present invention;
[0036] Figure 5 This is a schematic diagram of the improved YOLOv8n model structure of the present invention;
[0037] Figure 6The detection results of the original YOLOv8n model and the improved YOLOv8n model of the present invention on prairie mouse holes are shown in FIG.
[0038] in, Figure 6 (a) : Detection result of prairie mouse holes by the original YOLOv8n model. (b) of Figure (6) : Detection result of prairie mouse holes by the improved YOLOv8n model. DETAILED DESCRIPTION
[0039] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. 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 ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0040] In order to solve the shortcomings of the prior art, the present invention provides a method for identifying prairie mouse holes, which fully considers the relationship between the flight altitude of the drone and the target prior frame, further integrates the features of different levels of the target, and improves the recognition accuracy and recognition speed. The method specifically includes the following steps:
[0041] S1: Acquire multiple historical drone images of the grassland area.
[0042] Reference Figure 1 , UAV image acquisition and preprocessing are composed of UAV system and image processing system. The UAV system is mainly composed of UAV, sensor, remote control, data transmission system and image processing system. The image processing system mainly includes route planning software and image stitching software. The route planning adopts the automatic flight control ground station software Altizure, which can freely set parameters such as flight area, altitude and overlap rate. Generally, the heading overlap rate is set to 65%, and the lateral overlap rate is set to 35%. Due to the influence of windy weather in the test area, in order to avoid film loss and affect post-processing, the heading and lateral overlap rates are set to 80% in the present invention.
[0043] In this embodiment, a DJI M210 RTK V2 quad-rotor drone equipped with a Zenmuse X5S RGB camera is used for data collection.
[0044] Reference Figure 2In March 2020 and April 2021, the present invention took drone images in the grassland area in clear and windless weather and screened them once, eliminating unclear images due to camera exposure and drone shaking, with an image resolution of 5280 pixels × 3956 pixels. The remaining images were cropped into 300 pixels × 300 pixels, and a secondary screening was performed to retain images with rat holes and eliminate images without rat holes, obtaining 1076 samples. The rat holes in the picture were marked with a rectangular frame in the Labelimg software. During the marking process, the edge of the rectangular frame was ensured to be tangent to the edge of the rat hole to ensure the accuracy of the marking. Finally, the data set was divided into a training set, a test set, and a validation set according to 8:1:1.
[0045] S2: Determine the target scale of the rathole to be identified based on the target boxes of the ratholes in multiple historical drone images.
[0046] The rat hole target in the dataset is somewhat different from the dataset in the natural scene. In order to optimize the YOLOv8n model structure and improve the real-time performance of rat hole detection, Python is used to perform statistical analysis on the size of the priori box of the training set. The priori box is the target box when the data is annotated. Only by analyzing the priori box can the target scale be determined, and then the redundant detection heads of the model can be cropped. The results are as follows Figure 4 As shown. Figure 4 It can be obtained that the width and height of the prior frame are distributed in the area of 0.1×0.1, that is, they are all within 30×30 pixels. The objects in the data set are all small objects.
[0047] S3: Determine the target detection head in the head network of the original YOLOv8n model and the target feature integration module in the neck based on the target scale.
[0048] YOLOv8n is the smallest model in the YOLOv8 series, which is easy to integrate into mobile devices such as drones to complete rathole detection tasks. The original YOLOv8n structure diagram is as follows: Figure 3 shown.
[0049] The ConvMoudle, C2f, and SPPF modules in the backbone network extract the features of the input image, and then integrate the information through the Concat and Upsample operations of the neck network (Neck), and finally perform target detection through the three detection heads of the head network (Head). The pixel sizes of these three detection heads are 20×20, 40×40, and 80×80 respectively. The detection heads of different sizes are to adapt to the targets of different scales in the dataset images of natural scenes. 20×20, 40×40, and 80×80 are the sizes of the input detection head feature map. The smaller the feature map, the more feature information of large targets is retained, and the features of small targets in it are ignored, so small feature maps can only be used to detect large targets.
[0050] The present invention optimizes the network structure of YOLOv8n according to the size of the prior frame of the annotated data, and determines the target detection head in the head network and the target feature integration module in the neck of the original YOLOv8n model based on the target scale. The detection head responsible for large and medium targets and the redundant feature integration modules (Contact, upsample and c2f) responsible for large and medium targets in the corresponding neck network are eliminated. At the same time, the two deep feature information of the third C2f layer and the SPPF layer in the backbone network are retained and fused into the feature information of the second C2f layer through the Upsample and Concat modules. This makes the layer contain both the shallow geometric information required for small target detection and the deep semantic information, and makes full use of the deep and shallow information, thereby improving the YOLOv8n model structure. Figure 5 shown.
[0051] Reference Figure 6 The original Yolov8n and improved Yolov8n models were used to identify rat holes in desert grasslands. The visual recognition results showed that the original Yolov8n could not identify the rat holes marked by the red rectangular box, and missed detection; the improved Yolov8n could accurately identify all rat holes in this sample.
[0052] After removing the detection heads of large and medium targets, Yolov8n significantly reduced the number of network layers from 168 to 116. The reduction in the number of layers reduced the number of model parameters by about 50%. The size of the model was also reduced from 5.9MB to 3.2MB. The reduction in these parameters effectively reduced the computational burden and increased the detection speed from 138.9FPS to 172.4FPS. The reduction in model complexity did not lead to a decrease in the detection performance of the model, and the P and AP values increased to 94.6% and 98.6% respectively. This proves that after removing the detection heads of large and medium targets and fusing deep features to shallow layers, the network complexity was reduced while the accuracy and average precision were improved, proving the rationality and effectiveness of the optimization.
[0053] The present invention uses Python to count the size of the prior box in the rathole dataset, optimizes the detection head of Yolov8n according to the statistical results, removes redundant detection heads and most of the feature integration modules in the corresponding neck network; integrates the deep feature information of the backbone network into the remaining detection heads, reduces the network complexity and improves the accuracy.
[0054] In summary, the present invention combines the characteristics of the correlation between the flight altitude of the UAV and the target scale, and proposes a high-precision and real-time prairie mouse hole recognition method: the size of the prior box of the labeled data is statistically analyzed; the detection head of Yolov8n is optimized according to the statistical results, and most of the feature integration modules in the redundant detection heads and the corresponding neck network are eliminated; the deep feature information of the backbone network is integrated into the remaining detection heads, and finally the efficient and high-precision recognition of prairie mouse holes is realized.
[0055] Based on the same concept, the present invention also provides a prairie mouse hole identification device, including an acquisition module, a determination module, a construction module and an identification module.
[0056] The acquisition module is used to acquire multiple historical drone images of the grassland area.
[0057] The determination module is used to determine the target scale of the rat hole to be identified according to the target frame of the rat hole in multiple historical drone images, and to determine the target detection head in the head network of the original YOLOv8n model and the target feature integration module in the neck based on the target scale.
[0058] The construction module is used to remove the remaining detection heads except the target detection head in the head network of the original YOLOv8n model, remove the remaining feature integration modules except the target feature integration module in the neck network, retain the structure in which the third C2f layer and SPPF layer in the backbone network of the original YOLOv8n model are connected with the second C2f layer in the neck network through the Upsample module and the Concat module, and obtain the improved YOLOv8n model.
[0059] The recognition module is used to collect drone images to be identified in the grassland area, crop the drone images to be identified and input them into the improved YOLOv8n model to obtain the corresponding rat hole recognition results.
[0060] The present invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned prairie mouse hole identification method when executing the program.
[0061] The present invention also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned prairie mouse hole identification method is implemented.
[0062] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.
[0063] Obviously, those skilled in the art may make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. A method for identifying grassland rat holes, characterized in that: The following steps are involved: Acquire multiple historical drone images of the grassland area; The target scale of the rat hole to be identified is determined based on the target frames of the rat holes in multiple historical drone images, and the target detection head in the head network of the original YOLOv8n model and the target feature integration module in the neck are determined based on the target scale; The remaining detection heads except the target detection head in the head network of the original YOLOv8n model are removed, and the remaining feature integration modules except the target feature integration module in the neck network are removed. The structure in which the third C2f layer and SPPF layer in the backbone network of the original YOLOv8n model are connected to the second C2f layer in the neck network through the Upsample module and the Concat module is retained to obtain an improved YOLOv8n model. The drone images to be identified in the grassland area are collected, cropped and input into the improved YOLOv8n model to obtain the corresponding rat hole identification results.
2. A method for identifying prairie mouse holes as claimed in claim 1, characterized in that: Determining the target scale of the rathole to be identified according to the target frames of the ratholes in the multiple historical drone images includes the following steps: Each historical drone image is cropped to obtain multiple cropped images, and the rat holes in the cropped images are marked to obtain multiple target boxes; The sizes of multiple target boxes are counted to obtain the target scale of the rat hole to be identified.
3. A method for identifying prairie mouse holes as claimed in claim 2, characterized in that: The image resolution of the historical drone image is 5280 pixels × 3956 pixels, the image resolution of multiple cropped images is 300 pixels × 300 pixels, the width and height of multiple target frames are distributed in an area within 0.1 × 0.1, and the target scale of the rat hole to be identified is within 30 × 30 pixels.
4. A method for identifying prairie mouse holes as claimed in claim 1, characterized in that: The remaining detection heads other than the target detection head in the head network of the original YOLOv8n model are removed, and the remaining detection heads include 20×20 and 40×40 detection heads.
5. A method for identifying prairie mouse holes as claimed in claim 3, characterized in that: Before inputting the multiple images to be recognized into the improved YOLOv8n model in sequence, the improved YOLOv8n model needs to be trained, and the training process includes the following steps: A plurality of historical drone images are screened, and the screened historical drone images are cropped to obtain a plurality of sample images, each of which has a rat hole; The rat holes in multiple sample images were annotated to obtain a data set, which was then divided into a training set, a test set, and a validation set according to a ratio of 8:1:
1. The improved YOLOv8n model is trained through the training set, and the trained improved YOLOv8n model is tested and verified through the test set and validation set.
6. A prairie mouse hole identification device, characterized in that: include: an acquisition module to acquire multiple historical drone images of grassland areas; A determination module is used to determine the target scale of the rat hole to be identified according to the target frames of the rat holes in multiple historical drone images, and to determine the target detection head in the head network of the original YOLOv8n model and the target feature integration module in the neck based on the target scale; A construction module is used to remove the remaining detection heads except the target detection head in the head network of the original YOLOv8n model, remove the remaining feature integration modules except the target feature integration module in the neck network, retain the structure in which the third C2f layer and SPPF layer in the backbone network of the original YOLOv8n model are connected to the second C2f layer in the neck network through the Upsample module and the Concat module, and obtain an improved YOLOv8n model; The recognition module is used to collect drone images to be identified in the grassland area, crop the drone images to be identified, and input them into the improved YOLOv8n model to obtain the corresponding rat hole recognition results.
7. A computer device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method for identifying prairie mouse holes as described in any one of claims 1 to 5 is implemented.
8. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the method for identifying prairie mouse holes according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Method for detecting maturity of alfalfa seed pods through unmanned aerial vehicle aerial image based on improved YOLO v8
CN118262229A
Mouse hole target detection method based on adaptive filtering and YOLOv5
CN118351293A
Lightweight unmanned aerial vehicle image target detection method and system
CN118397485A
Lightweight weed recognition method based on improved YOLOv8n
CN118887513A
Aerial photography mousehole detection method and device based on improved YOLOv5 algorithm
CN118968284A
Cited By
Himalayan marmot hole intelligent identification model construction method fusing habitat information
CN120107837A
Method for constructing intelligent recognition model of himalayan marmot hole fused with habitat information
CN120107837B