An intelligent erosion ditch marking method, computer equipment and readable storage medium
By combining ArcGIS and Labelme's intelligent annotation method and using the backbone information of erosion gullies for annotation, the problems of low efficiency and poor data reliability in erosion gully extraction were solved, and efficient and accurate erosion gully sample set production was achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-03
- Publication Date
- 2026-03-20
AI Technical Summary
Existing methods for extracting erosion gullies are inefficient and have poor data reliability. Manual annotation requires a high level of expertise, and deep learning models cannot support training on large-scale satellite imagery, resulting in the loss of erosion gully integrity information.
By combining ArcGIS and Labelme, an intelligent labeling mechanism for erosion gullies based on "backbone-detail" is established. ArcGIS is used to identify the backbone lines of erosion gullies, and Labelme's AI module assists in labeling the details of erosion gullies to generate erosion gully mask maps.
This improved the efficiency and accuracy of erosion trench sample set production, reduced reliance on human expertise, and ensured the integrity and continuity of erosion trench samples.
Smart Images

Figure CN121259644B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the technical field of soil erosion gully detection, and particularly relates to an erosion gully intelligent labeling method, a computer device and a readable storage medium. BACKGROUND
[0002] Erosion gully breaks black soil farmland, seriously affecting agricultural food security, and erosion gully extraction and spatial mapping are key links for its comprehensive prevention and control. Current erosion gully extraction methods are mainly based on deep learning models such as CNN, SegNet, Deeplabv3+, Transformer, etc., and model training needs a large amount of reliable data and samples. The production methods of erosion gully dataset and sample library mainly include two categories: one is the traditional manual labeling method, because the erosion gully morphology is complex, and the boundary between the erosion gully and the background is not clear, therefore, experienced experts are required to draw one by one during manual labeling, which is time-consuming and laborious, and the production efficiency is very low, and it is difficult to expand in a large range. The second method is to extract combined with topographic skeleton information, use DEM data combined with hydrological analysis module; assisted labeling by software module, but due to the memory limitation of the input image size of the software module, the deep learning model cannot support large-scale satellite image training, according to the model training requirements, and to ensure the smooth running of the software module, the image must be segmented, which leads to the loss of complete and continuous gully line information.
[0003] In summary, the current methods have two major shortcomings: first, the professional requirements of the manual method are high, the efficiency is low, and it is difficult to popularize in a large range; second, the artificial intelligence segmentation method ignores the integrity information of the erosion gully, and lacks professional personnel to judge, and the data reliability is poor. SUMMARY
[0004] Therefore, the present application creates an erosion gully intelligent labeling method, a computer device and a readable storage medium, which establishes an " backbone-detail" erosion gully intelligent labeling mechanism by combining ArcGIS and Labelme, uses ArcGIS to label the backbone line information of the erosion gully globally, uses the backbone information as a reference, and innovatively uses the AI module built-in Labelme to label the boundary details referring to the backbone line of the erosion gully, solving the problems of relying on professional personnel to judge and low labeling efficiency in the traditional erosion gully labeling process.
[0005] To achieve the above purpose, the technical scheme of the present application is as follows:
[0006] The present application creates a first aspect of an erosion gully intelligent labeling method, comprising:
[0007] S1: preprocessing the original satellite image containing the erosion gully to generate a true color image;
[0008] S2: Based on the erosion gully backbone line judgment criterion, using ArcGIS to identify the erosion gully in the true color image and label to generate the erosion gully backbone line mask graph;
[0009] S3: The true color image and the erosion gully backbone line mask graph are segmented with the same grid and geographic coordinates to generate image slices and backbone line slices that can be input into Labelme for processing;
[0010] S4: The image slices and the backbone line slices are imported into Labelme, and the erosion gully mask graph of the image slices is drawn by referring to the backbone line slices through the AI module built-in Labelme.
[0011] Preferably, the original satellite image includes: multispectral image and panchromatic image.
[0012] Preferably, in S1, the original satellite image containing the erosion gully is preprocessed by using ENVI, and the preprocessing process includes:
[0013] The multispectral image is radiometrically calibrated, atmospherically corrected and orthorectified, the panchromatic image is radiometrically calibrated and orthorectified, and the calibrated and corrected multispectral image and panchromatic image are image fused to obtain the true color image.
[0014] Preferably, the erosion gully backbone line judgment criterion includes:
[0015] The normalized vegetation index of the erosion gully is less than or equal to 0.3, the normalized vegetation index of the peripheral area of the erosion gully is greater than or equal to 0.5, and the texture contrast of the erosion gully and its peripheral area is greater than or equal to 15;
[0016] The gully wall inclination angle of the erosion gully is greater than 30 degrees;
[0017] The width-depth ratio of the erosion gully is measured based on the true color image, and the width-depth ratio of the erosion gully is within a preset interval;
[0018] The gully tail of the erosion gully is a fan-shaped deposition area.
[0019] Preferably, Python is used to synchronize segmentation of the true color image and the erosion gully backbone line mask graph with the same grid and geographic coordinates, and the image slices and the backbone line slices with the same geographic coordinates are paired.
[0020] Preferably, the AI module built-in Labelme is Sam2 module.
[0021] Preferably, the Sam2 module automatically identifies the control points by referring to the backbone line slices and generates a pixel-level erosion gully mask graph along the boundary between the target erosion gully and the surrounding environment by receiving the control points placed by the artificial on the image slices as input.
[0022] Preferably, the erosion gully mask of the image slice is drawn by referring to the backbone slice through the Labelme built-in AI module, including:
[0023] When the background ground object in the image slice is less than or equal to two kinds, and the image slice contains only a single erosion gully, a positive sample control point is placed in the erosion gully of the image slice by referring to the backbone slice, guiding the Sam2 module to draw the erosion gully mask of the image slice;
[0024] When the background ground object in the image slice is less than or equal to two kinds, and the image slice contains at least two erosion gullies, a positive sample control point is placed in each erosion gully of the image slice by referring to the backbone slice, guiding the Sam2 module to draw the erosion gully mask of the image slice;
[0025] When the background ground object in the image slice is more than two kinds, and the image slice contains only a single erosion gully, multiple positive sample control points are placed in the erosion gully of the image slice along the erosion gully backbone line direction in the image slice by referring to the erosion gully backbone line direction in the backbone slice, and multiple negative sample control points are randomly placed outside the erosion gully of the image slice, guiding the Sam2 module to draw the erosion gully mask of the image slice;
[0026] When the background ground object in the image slice is more than two kinds, and the image slice contains multiple erosion gullies, the erosion gully backbone line in the backbone slice is copied in the image slice, guiding the Sam2 module to draw the erosion gully mask of the image slice.
[0027] The second aspect of the present application provides a computer device, comprising:
[0028] at least one processor;
[0029] and a memory in communication connection with the at least one processor; wherein,
[0030] The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the erosion gully intelligent labeling method.
[0031] The third aspect of the present application provides a readable storage medium storing computer instructions, the computer instructions being used to make a computer execute the erosion gully intelligent labeling method.
[0032] Compared with the prior art, the present application can achieve the following beneficial effects:
[0033] The application is to solve the problem of training sample production in the task of extracting erosion gully in satellite images by deep learning network model, combined with ArcGIS and Labelme, an intelligent erosion gully labeling mechanism of " backbone-detail" is established, through the labeling idea of rough first and meticulous later, reference to erosion gully backbone line information combined with AI auxiliary batch labeling erosion gully, greatly improving the erosion gully sample set production efficiency and accuracy.
[0034] Compared with the traditional manual visual interpretation, the application uses ArcGIS to quickly extract the erosion gully backbone line based on the erosion gully backbone line judgment criterion, and can quickly identify and fill the details of the erosion gully outside the backbone line with the aid of the AI module, and get rid of the high dependence on artificial professional knowledge in the process of extracting erosion gully samples. BRIEF DESCRIPTION OF DRAWINGS
[0035] The accompanying drawings, which form a part of this application, are included to provide a further understanding of the application and are incorporated in and constitute a part of this application. The embodiments of the application illustrated in the drawings are presented to explain the present application and not intended to limit the present application. In the drawings:
[0036] Figure 1 It is a flow chart of the intelligent erosion gully labeling method provided by the embodiment of the application;
[0037] Figure 2 It is a generation schematic diagram of image slices and backbone line slices provided by the embodiment of the application;
[0038] Figure 3 It is a principle diagram of erosion gully training sample set production provided by the embodiment of the application. DETAILED DESCRIPTION
[0039] In order to make the purpose, technical scheme and advantages of the application clearer, the application will be further described in detail below with the help of the drawings and specific embodiments. It should be understood that the specific embodiments described herein are only used to explain the application, and do not constitute a limitation on the application. In different embodiments, similar elements are associated with similar element labels. In the following embodiments, many details are described in order to make the application better understood. However, those skilled in the art can easily recognize that some features can be omitted in different cases, or can be replaced by other elements, materials or methods. In some cases, some operations related to the application are not shown or described in the specification in order to avoid the core part of the application being overwhelmed by too much description, and it is not necessary for those skilled in the art to describe these related operations in detail according to the description in the specification and the general technical knowledge in the art.
[0040] It should be noted that the embodiments in the present application and the features in the embodiments can be combined with each other to form various embodiments without conflict. Meanwhile, each step or action in the method description can also be sequentially changed or adjusted in a manner obvious to those skilled in the art. Therefore, the various sequences in the description and the drawings are only for clear description of a certain embodiment, and do not mean a necessary sequence, unless otherwise stated that a certain sequence must be followed.
[0041] In the description of the present application, it should be understood that the terms "center", "longitudinal", "transverse", "length", "width", "thickness", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", "clockwise", "counterclockwise" and the like indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the device or element referred to must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as a limitation on the present application. In addition, the terms "first", "second" and the like are only for description purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the technical features indicated. Therefore, the features defined with "first", "second" and the like can explicitly or implicitly include one or more features. In the description of the present application, unless otherwise stated, the meaning of "a plurality of" is two or more.
[0042] In the description of the present application, it should be noted that, unless otherwise explicitly specified and limited, the terms "mounting", "connection", "connection" should be understood broadly, for example, it can be fixed connection, or detachable connection, or integral connection; it can be mechanical connection, or electrical connection; it can be directly connected, or indirectly connected through intermediate medium, or the communication inside two elements. For those skilled in the art, the specific meaning of the above terms in the present application can be understood through specific circumstances.
[0043] The present application will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments.
[0044] Please refer to Figure 1 In an embodiment of the present application, an erosion ditch intelligent labeling method is provided, comprising:
[0045] S1: preprocessing the original satellite image containing the erosion ditch to generate a true color image;
[0046] S2: based on the erosion ditch backbone line judgment criterion, using ArcGIS to identify the erosion ditch in the true color image and label to generate an erosion ditch backbone line mask image;
[0047] S3: Segment the true-color image and the gully backbone mask map with the same grid and geographic coordinates to generate image tiles and backbone tiles that can be input into Labelme for processing;
[0048] S4: Import the image slices and backbone slices into Labelme, and use Labelme's built-in AI module to draw the erosion trench mask map of the image slices with reference to the backbone slices.
[0049] Specifically, such as Figure 2 As shown, in step S1, the original satellite image is first acquired, and then preprocessed using ENVI software. In this embodiment of the invention, the original satellite image is a scene from the GF-1 remote sensing satellite located in Hailun City, including an 8m resolution multispectral image and a 2m resolution panchromatic image.
[0050] The process of preprocessing raw satellite images containing erosion grooves using ENVI specifically includes:
[0051] The multispectral image was sequentially radiometrically calibrated, atmospherically corrected, and orthorectified, while the panchromatic image was radiometrically calibrated and orthorectified. The multispectral image after radiometric calibration, atmospheric correction, and orthorectification was then fused with the panchromatic image after radiometric calibration and orthorectification using the Gram-schmidt Pan Sharpening method to obtain a true-color image with a resolution of 2m.
[0052] Specifically, in step S2, after the original satellite image preprocessing is completed, the true-color image is imported into ArcGIS. ArcGIS is used to open the true-color image and create polyline features. Erosion gully backbone line identification criteria are then set. Based on these criteria, erosion gullies in the true-color image are identified, and their backbone lines are labeled. The following four criteria are set in ArcGIS for erosion gully identification:
[0053] Criterion 1: The perceived disconnect between the gully head and walls and the surrounding environment is used as the criterion. This is initially quantified through visual interpretation combined with differences in vegetation cover and texture contrast. Specifically, ArcGIS is used to calculate the Normalized Difference Vegetation Index (NDVI) of the gully area. A gully is considered "significantly disconnected" if its NDVI is less than or equal to 0.3, and the NDVI of the surrounding area is greater than or equal to 0.5. Simultaneously, the texture contrast between the gully head / wall and its surrounding area is calculated based on the gray-level co-occurrence matrix of satellite imagery. A gully head / wall with a texture contrast greater than or equal to 15 (texture contrast ranges from 0 to 100, with higher values indicating more pronounced differences) is considered "significantly disconnected."
[0054] Criterion 2: The angle of the gully wall of the erosion gully is taken as the basis for judgment. Specifically, the angle of the gully wall of the erosion gully in the true color image is identified, and if the angle of the gully wall of the erosion gully is greater than 30 degrees, it is considered to meet the condition. In ArcGIS, the gully wall inclined area of the true color image is the shadow area, which is dark in color. The proportion of the shadow area can be used as an effective indirect indicator to measure the steepness of the ground slope by visually interpreting and combining the ArcGIS "raster calculation" tool to count the gully wall inclined area. The higher the proportion of the shadow area, the more obvious the gully wall inclination. The angle of the gully wall can be estimated according to the proportion of the shadow area and the color tone.
[0055] Criterion 3: The width-depth ratio of the erosion gully is taken as the basis for judgment. Specifically, the width-depth ratio of the erosion gully is measured based on the true color image, and when the width-depth ratio of the erosion gully is within the preset interval, it is considered to meet the condition for determining the erosion gully. The cross-sectional shape of the erosion gully is usually U-shaped, V-shaped, trapezoidal or approximately square. When the true color image visually measured result shows that the width-depth ratio of the erosion gully falls within any of the following shape intervals, it is considered to meet criterion 3: the width-depth ratio of the erosion gully with a U-shaped cross-section is within the interval of 0.5-1.5, the width-depth ratio of the erosion gully with a V-shaped cross-section is within the interval of 0.5-1.5, the width-depth ratio of the erosion gully with a trapezoidal cross-section is within the interval of 0.5-1.5, and the width-depth ratio of the erosion gully with a square cross-section is within the interval of 0.5-1.5.
[0056] Criterion 4: The shape of the gully tail area of the erosion gully is taken as the basis for judgment. Specifically, when the gully tail of the erosion gully is determined to be a fan-shaped deposition area and at the same time the following three conditions are met, it is considered to meet criterion 4:
[0057] The area of the gully tail deposition area is greater than or equal to the outlet width x 20m, wherein the outlet width is obtained by visually measuring the true color image, and the visual measurement error is usually less than or equal to 0.5m; 20m is the typical deposition correlation length in the extension direction of the erosion gully outlet in the northeast black soil region.
[0058] The gully tail outlet is taken as the vertex (the midpoint of the gully tail outlet can be directly taken), the deposition area edge at the back end of the gully tail is extracted, and the included angle of the two sides of the deposition area edge is approximately estimated according to the edge profile. The included angle should be within the interval of 30-60 degrees.
[0059] The texture uniformity of the deposition area is greater than or equal to 0.6. The texture uniformity of the deposition area is calculated based on visual combination with the gray level co-occurrence matrix. The texture uniformity of the deposition area has a value range of 0-1, and the higher the uniformity value, the more uniform the deposition area. When the texture uniformity is greater than or equal to 0.6, it meets the loose deposition characteristics of the gully tail outlet of the erosion gully trunk line.
[0060] In the process of judging the erosion ditch backbone line, the above four criteria do not need to be met at the same time. According to the actual situation, it is generally considered that any two of the above criteria can be met to determine the erosion ditch backbone line. Through the above basis to determine the position of the erosion ditch, the polyline element is created to mark the erosion ditch backbone line. After marking, the element to raster tool is used to ensure the consistency of the pixel size, and the size of the erosion ditch backbone line mask map is in accordance with the true color image size specification. Finally, the.tif format of the erosion ditch backbone line mask map is exported. This mask map is the key carrier of ArcGIS and Labelme cooperation, which directly determines the accuracy of subsequent Labelme labeling.
[0061] Specifically, in step S3, since the deep learning model for erosion ditch extraction has requirements for the size of the input sample, the deep learning model cannot support large-scale satellite image training, and the Labelme input image size is limited by memory, therefore, in order to meet the model training requirements and ensure the smooth running of Labelme, the true color image must be segmented. Specifically, in Python, numpy, PIL, gdal, os, shutil, spectral and other python libraries are called respectively or in combination, and file processing code is written, including file synchronous segmentation code, file format batch conversion code, file batch naming code and file batch classification code, which are used to batch process the image slices and the backbone line slices in a synchronous segmentation and classification manner. Among them, synchronous segmentation is the core of ensuring the spatial matching of ArcGIS backbone line and Labelme labeling image; if the segmentation is not synchronized, Labelme will not be able to correspond to the ArcGIS backbone line. In the specific processing process, the true color image and the erosion ditch backbone line mask map are imported, and the true color image and the erosion ditch backbone line mask map synchronous segmentation code written by Python library is used to segment according to the subsequent deep model training requirements. The size of the segmented sub-image is required to be 256 pixels x 256 pixels. In the segmentation process, the true color image and the erosion ditch backbone line mask map are segmented with the same grid and geographic coordinates, which ensures that the sizes of the paired image slices and the backbone line slices obtained after segmentation are completely the same, and the corresponding geographic coordinates are completely the same. The name and position of the backbone line slice after segmentation are one-to-one corresponding to the image slice after segmentation, so as to ensure that each image slice to be labeled can be matched to the corresponding backbone line slice, and the backbone line slice is used as the reference image of the image slice. Then, the image extraction code written by Python library is used to extract the erosion ditch backbone line in the segmented erosion ditch backbone line mask, and the erosion ditch backbone line is represented as white pixels. Continue to use the file format conversion code written by Python to convert the image slice from.dat format to.png format for saving.
[0062] Specifically, in step S4, the image slices and the backbone line slices in.png format are imported into Labelme, and the AI recognition module Sam2 provided by Labelme is used, which is preferably set to the accuracy mode, and the balance mode of Sam2 can be selected when the device performance is limited. In the actual operation process, through the combination of ArcGIS and Labelme, and by referring to the position of the erosion gully backbone line marked by ArcGIS, the AI marking of Labelme can accurately anchor the erosion gully range, avoid boundary deviation, and form a closed-loop process of "global positioning-intelligent accurate analysis". In the specific processing process, after the image slices and the backbone line slices are imported into Labelme, the control points placed on the image slices by the receiving person are taken as input, and the Sam2 module automatically identifies the control points and generates a pixel-level erosion gully mask image along the boundary line between the target erosion gully and the surrounding environment.
[0063] As shown in Figure 3 , according to the background complexity and the number of erosion gullies, four regular situations and one special situation are divided, the target ground object and the surrounding environment are automatically identified, and the mask image is generated along the boundary line. In order to standardize the operation method, the following control point placement method is set, which is specifically divided into two categories according to the image background complexity: A: the number of background ground objects is less than or equal to 2; B: the number of background ground objects is more than 2. According to the number of erosion gullies in the image slice, it is divided into two categories: a: the image slice contains only a single erosion gully, b: the image slice contains at least two erosion gullies, and a total of four labeling situations are divided: Aa, Ab, Ba, and Bb:
[0064] Aa: when the number of background ground objects in the image slice is less than or equal to two, and the image slice contains only a single erosion gully, the erosion gully wall, head and surrounding ground object have a strong cutting feeling, and the boundary point between the erosion gully and the river is also clear, so the AI recognition model of Labelme can easily identify the erosion gully area. Therefore, a positive sample control point is placed in the erosion gully of the image slice with reference to the backbone line slice, to guide the Sam2 module to draw the erosion gully mask image of the image slice.
[0065] Ab: when the number of background ground objects in the image slice is less than or equal to two, and the image slice contains at least two erosion gullies, the gully wall, head and surrounding environment still have obvious differences, and the erosion gully boundary is obvious, but the erosion gully shape is complex, or the number is large, so a positive sample control point needs to be placed in each erosion gully of the image slice with reference to the backbone line slice, to guide the Sam2 module to draw the erosion gully mask image of the image slice.
[0066] Ba: When the image slice contains more than two kinds of background features, and only contains a single erosion ditch, the ditch wall, head and surrounding environment boundary are blurred, the image pixels show little difference, the AI recognition model of Labelme cannot distinguish the erosion ditch boundary, and multiple control points need to be placed to guide the AI to cover the erosion ditch and form the boundary. Specifically, referring to the erosion ditch backbone line in the backbone line slice, multiple positive sample control points are placed along the erosion ditch backbone line in the image slice, and multiple negative sample control points are randomly placed outside the erosion ditch in the image slice, to guide the Sam2 module to draw the erosion ditch mask image of the image slice. In this process, the ArcGIS backbone line is the "positioning anchor point" for Labelme labeling, and without this reference, the AI module cannot distinguish the erosion ditch and the background features.
[0067] Bb: When the image slice contains more than two kinds of background features, and contains multiple erosion ditches, the erosion ditch boundary is not obvious, and it is difficult to make a standard mask image even if multiple control points are placed. Therefore, the erosion ditch backbone line in the backbone line slice is directly copied in the image slice. The backbone line provided by ArcGIS is the core basis for expert judgment, and manual trimming using Labelme is a fine supplement to the boundary of the backbone line, to guide the Sam2 module to draw the erosion ditch mask image of the image slice.
[0068] In addition, there are very special cases where the image slice only has a very small part of the erosion ditch area, the erosion ditch pixel ratio is very small, and the erosion ditch characteristics are extremely unobvious. AI assisted labeling is also extremely difficult, and training the model based on such images as samples may have a negative impact. Therefore, it is directly abandoned and not used as a sample.
[0069] Finally, the erosion ditch mask image of the image slice drawn by the Sam2 module is saved in.json format, and is converted into a file containing satellite images, mask images, mask name directory files and original image annotations through Python instructions in batches. Finally, the erosion ditch mask image is processed by using Python batch file processing code to make different directory forms of sample set according to the requirements of model training. After obtaining the sample set, data augmentation is performed, and according to the needs, it can be divided into training set, validation set and test set.
[0070] The erosion ditch intelligent labeling method of the present application can instantly complete the segmentation of complex boundaries with the help of AI through several clicks under the assistance of ArcGIS and Labelme, generate erosion ditch samples, reduce the task amount of manually carefully drawing erosion ditch boundaries when labeling alone using ArcGIS software, and overcome the problem of difficult recognition of erosion ditch position and boundary due to loss of global information of the erosion ditch caused by small image size when using Labelme alone, thereby perfectly solving the pain points of traditional manual sample set preparation in terms of precision and efficiency.
[0071] Accordingly, the present application also provides a computer device and a readable storage medium according to embodiments of the present application.
[0072] The computer device is in the form of a general-purpose computing device. The computer device is intended to represent various forms of digital computers, such as laptops, desktops, tablets, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular telephones, smart phones, wearable devices, and other similar computing devices. The components shown here, their connections, and their functions, as well as the software implemented by the computer device, are merely examples and are not intended to limit the implementations of the present application described and / or claimed herein.
[0073] The components of the computer device can include, but are not limited to, one or more processors or processing units, system memory, and a bus connecting different system components, including system memory and processing units.
[0074] The bus represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor or local bus using any of a variety of bus architectures. For example, these architectures include, but are not limited to, industry standard architecture (ISA) bus, microchannel architecture (MAC) bus, enhanced ISA bus, video electronics standards association (VESA) local bus, and peripheral component interconnect (PCI) bus.
[0075] The computer device typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the computer device and includes both volatile and nonvolatile media, removable and non-removable media.
[0076] The system memory can include computer system readable media in the form of volatile memory, such as random-access memory (RAM) and / or cache memory. The computer device can further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system can be used for reading from and writing to non-removable, non-volatile magnetic media. In these instances, each drive can be connected to the bus by one or more data media interfaces. The memory can include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the erosion trench intelligent labeling method of embodiments of the present application.
[0077] Program / utility, having a set (at least one) of program modules, can be stored in, for example, memory by way of example, without limitation, operating system, one or more application programs, other program modules, and program data, each of or some combination of which can include implementation of a network environment. The program modules are generally executed by processing unit to implement the erosion trench intelligent labeling method of embodiments of the present application described herein.
[0078] The computer device can also communicate with one or more external devices such as a keyboard, a pointing device, a display, etc. via an input / output (I / O) interface. Further, the computer device can communicate with one or more devices that enable a user to interact with the computer device, such as a user input device (e.g., a keyboard, a pointing device, a display, etc.). Additionally, the computer device can communicate with one or more devices that enable the computer device to communicate with one or more other computer devices. For example, the computer device can communicate with other computer devices via an I / O interface and a network adapter. The communication can be a wired communication or a wireless communication.
[0079] The processing unit executes the various program applications and data processing by running the programs stored in the system memory, such as implementing the erosion trench intelligent labeling method of embodiments of the present application.
[0080] The present application also provides a non-transitory computer readable storage medium storing computer instructions, wherein the program is executed by a processor to implement the erosion trench intelligent labeling method of embodiments of the present application.
[0081] The computer storage medium of the embodiments of the present application can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. More specific examples (non-exhaustive list) of the computer-readable storage medium include an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, the computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by an instruction execution system, apparatus, or device to use or in conjunction with it.
[0082] The computer-readable signal medium can include a data signal propagated in a baseband or as part of a carrier wave, in which computer-readable program code is carried. Such propagated data signals can take a variety of forms, including but not limited to electro-magnetic signals, optical signals, or any suitable combination thereof. The computer-readable signal medium can also be any computer-readable medium that is not a storage medium and that can be used to carry or store program code for use by or in connection with an instruction execution system, apparatus, or device.
[0083] The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to wireless, wire line, optical fiber, RF, etc., or any suitable combination of the above. The computer program code for carrying out operations of the present application can be written in one or more programming languages or combinations of languages including an object-oriented programming language such as Java, Smalltalk, C++, or conventional procedural programming languages such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).
[0084] In summary, the above only describes the preferred embodiments of the present application, and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
[0085] The systems, apparatuses, modules, or units illustrated by one or more embodiments described above can be specifically implemented by a computer chip or entity, or by a product with some certain function. A typical implementation device is a computer. Specifically, the computer can be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0086] It should also be noted that the terms "comprising", "containing", or any other variant thereof are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements in the list, but can also include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising a" does not exclude the existence of additional identical elements in the process, method, article, or apparatus that includes the element.
[0087] Each of the embodiments in the specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other. Each embodiment focuses on the difference from other embodiments. In particular, for the system embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the part of the method embodiments.
Claims
1. A method for intelligently marking erosion trenches, characterized in that, include: S1: Preprocess the raw satellite image containing erosion grooves to generate a true-color image; S2: Based on the criterion for judging the backbone line of erosion gullies, use ArcGIS to identify erosion gullies in true color images and generate a mask map of the backbone line of erosion gullies. S3: Segment the true-color image and gully backbone mask map with the same grid and geographic coordinates to generate image tiles and backbone tiles that can be input into Labelme for processing; S4: Import the image slices and backbone slices into Labelme, and use Labelme's built-in AI module to draw the erosion trench mask map of the image slices with reference to the backbone slices; Labelme's built-in AI module is the Sam2 module. By receiving control points placed manually on the image slice as input, the Sam2 module automatically identifies the control points with reference to the backbone slice and generates a pixel-level erosion groove mask map along the boundary line between the target erosion groove and the surrounding environment. The step of drawing an erosion trench mask map of an image slice by referencing the backbone slice using Labelme's built-in AI module includes: When the image slice contains fewer than or equal to two types of background features and contains only a single erosion groove, a positive sample control point is placed in the erosion groove of the image slice with reference to the backbone slice to guide the Sam2 module to draw the erosion groove mask map of the image slice. When the image slice contains two or fewer background features and at least two erosion grooves, a positive sample control point is placed in each erosion groove of the image slice, referring to the backbone slice, to guide the Sam2 module to draw the erosion groove mask map of the image slice. When there are more than two types of background features in the image slice and the image slice contains only a single erosion gully, referring to the direction of the erosion gully backbone line in the backbone line slice, multiple positive sample control points are placed in the erosion gully of the image slice along the direction of the erosion gully backbone line, and multiple negative sample control points are randomly placed outside the erosion gully of the image slice to guide the Sam2 module to draw the erosion gully mask map of the image slice. When the image slice contains more than two types of background features and contains multiple erosion gullies, the erosion gully backbone lines in the backbone line slice are copied into the image slice to guide the Sam2 module to draw the erosion gully mask map of the image slice.
2. The intelligent marking method for erosion trenches according to claim 1, characterized in that, The original satellite images include: multispectral images and panchromatic images.
3. The intelligent marking method for erosion trenches according to claim 2, characterized in that, In step S1, ENVI is used to preprocess the raw satellite image containing erosion trenches. The preprocessing process includes: Radiometric calibration, atmospheric correction, and orthorectification are performed on the multispectral image, radiometric calibration and orthorectification are performed on the panchromatic image, and image fusion is performed on the calibrated and corrected multispectral image and panchromatic image to obtain a true color image.
4. The intelligent marking method for erosion trenches according to claim 1, characterized in that, The criteria for determining the backbone of the erosion trench include: The normalized vegetation index of the erosion gully is less than or equal to 0.3, the normalized vegetation index of the outer area of the erosion gully is greater than or equal to 0.5, and the texture contrast between the erosion gully and its outer area is greater than or equal to 15. The slope angle of the erosion gully wall is greater than 30 degrees; The aspect ratio of the erosion trench is visually measured based on true-color images, and the aspect ratio of the erosion trench is within a preset range; The tail end of the erosion gully is a fan-shaped depositional zone.
5. The intelligent marking method for erosion trenches according to claim 4, characterized in that, Python was used to synchronously segment true-color images and gully backbone mask maps with the same grid and geographic coordinates, and image slices and backbone slices with the same geographic coordinates were paired.
6. A computer device, characterized in that, include: At least one processor; And, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the intelligent marking method for erosion trenches as described in any one of claims 1 to 5.
7. A readable storage medium, characterized in that, It stores computer instructions for causing the computer to execute the intelligent marking method for erosion trenches as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Port water area traffic condition identification method based on satellite image and SAM
CN118135426A
Satellite remote sensing image mariculture identification method and system based on deep learning
CN120808193A