Monitoring method and system for high-density bamboo shrub and application
Through Sentinel-2 data processing and deep learning technology, a high-density bamboo shrub recognition model was established, which solved the problems of low monitoring accuracy and data dependence in the existing technology of medium and high-density bamboo shrubs, and achieved high-precision and low-cost monitoring effect.
Patent Information
- Application Number
- CN202411618421.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-13
- Publication Date
- 2025-03-11
AI Technical Summary
The existing technology is difficult to effectively monitor high-density bamboo shrubs, traditional methods are costly and have limited coverage, and remote sensing technology has problems such as low precision classification accuracy and time-series data dependence.
Sentinel-2 data is used to obtain the true reflectivity of the ground surface through radiation calibration processing, and the combination of three bands of green light, near-infrared and short-wave infrared 2 is selected to perform positive sample enrichment and partial depth dimensionality reduction percentage stretching optimization. Combined with deep learning technology, a recognition model of high-density bamboo shrubs is established.
High-precision monitoring of high-density bamboo shrubs is achieved, reducing dependence on high-quality phenological time series data, improving the reliability and timeliness of monitoring, and filling the gap in the remote sensing scale monitoring of high-density bamboo shrubs.
Smart Images

Figure CN119600435A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of plant information identification, and in particular relates to a monitoring method, system and application of high-density bamboo thickets. Background Art
[0002] Due to the cessation of early forest management in the Giant Panda National Park, some bamboo species that are the staple food of giant pandas, such as Brachypodium album, Psoralea corylifolia, and Psoralea corylifolia, spread rapidly through asexual reproduction and occupied the understory space, causing the entire forest to regenerate and succeed slowly or stop, forming a high-density bamboo thicket.
[0003] Different from natural forests with scattered structures and rich vegetation distribution, high-density bamboo thickets have sparse trees, and low bamboo shrubs are the main understory. At the same time, the density is extremely high, with bamboo shrub coverage exceeding 90%. This structure makes it difficult for wild animals such as giant pandas to enter or cross. At the same time, the sparse trees cannot form the concealment conditions required for the activities of individual and populations of wild animals such as giant pandas, making this type of vegetation impossible or difficult for wild animals to use, making it one of the most typical damaged (degraded) habitat types within the Giant Panda National Park. Therefore, the monitoring and evaluation of high-density bamboo thickets has always been the focus and difficulty of achieving refined monitoring of damaged habitats.
[0004] Traditional methods of monitoring damaged land mainly rely on the collection of historical land use and forest survey data to preliminarily determine the approximate distribution of damaged habitats, and conduct targeted field surveys of ground plots and sample lines to ultimately determine the location, area and distribution of damaged habitats. Although this method has a high accuracy rate, the survey cost is too high, and frequent monitoring activities will also increase human interference with the habitat.
[0005] In recent years, a survey method using small drones as an auxiliary means has gradually evolved, but it also has problems such as high cost, inability to effectively monitor the entire area, and slow update of results.
[0006] As an emerging monitoring method in the field of vegetation monitoring, remote sensing has the characteristics of wide bandwidth, short revisit period, high spatial resolution, and rich radiation information. Vegetation remote sensing generally uses the "red edge" of vegetation as a feature and combines satellite-borne multi-spectral payloads to form vegetation indices such as NDVI (Normalized Difference Vegetation Index) to monitor vegetation. It can quickly and effectively distinguish vegetation from non-vegetation objects over a large range, but the accuracy of refined vegetation classification is low. This is because vegetation indices such as NDVI are relative indicators, which are affected by the satellite's side swing angle, atmospheric disturbances, sensor performance, solar irradiance, etc., and are not absolutely indicative. At the same time, vegetation indices generally have a "saturation" phenomenon, which makes it difficult to effectively distinguish various subdivided vegetation by relying solely on spectral information.
[0007] One solution to this problem is to use remote sensing time series data to monitor subdivided vegetation, that is, to distinguish subdivided vegetation by using the specific phenological characteristics of the subdivided vegetation on long-term remote sensing images, which presents a different time series spectral curve from other vegetation. Although this method has high monitoring accuracy, it requires complete phenological period remote sensing data as support, and has high requirements for the number of data periods and data quality. If key phenological data is missing or the data quality is low, the monitoring accuracy will drop significantly. Therefore, this method is not suitable for cloudy and rainy climate zones. At the same time, high dependence on time series data means that monitoring cannot be carried out in real time and the monitoring timeliness will lag behind.
[0008] Another solution is to use deep learning technology to monitor subdivided vegetation, that is, by inputting a large number of subdivided vegetation image samples, the neural network automatically learns its features, forms a classification model, and then uses the model to perform end-to-end semantic segmentation monitoring of subdivided vegetation. The advantage of this method is that there is no need to explore the vegetation mechanism, and the model can be completed by letting the network automatically learn the features. The disadvantage is that deep learning usually uses RGB true color visible light three-band images as input. If the monitored subject has no obvious semantic features, the training is difficult to converge and the model accuracy is low. For high-density bamboo shrubs, it is difficult to distinguish them from other subdivided vegetation only from the texture, shape, edge and visible light pixel brightness, that is, there is no obvious semantic information; directly using deep learning technology is likely to have low accuracy. If remote sensing multispectral data is used as input, although multi-channel spectral information can be automatically learned and refined by the model, a large amount of spectral redundant information will cause the model to have low learning ability, which requires longer training time, deeper layers and a larger parameter scale model to compensate for it in order to complete training convergence. There are also problems such as complex data, high cost and high time overhead.
[0009] Therefore, there is currently no mature and reliable monitoring technology for high-density bamboo thickets. Summary of the invention
[0010] The purpose of the present invention is to provide a monitoring method, system and application of high-density bamboo thickets.
[0011] To achieve the above-mentioned purpose, the technical solution adopted by the present invention is: a method for establishing a model for identifying high-density bamboo shrubs, the method comprising the following steps:
[0012] S1, sentinel-2 data acquisition and preprocessing;
[0013] Acquire the sentinel-2 data of the area to be monitored, obtain the gain and offset, perform radiation calibration, convert the DN value into radiance, and then convert the radiance into atmospheric apparent reflectance, solve the real surface reflectance data, and remove atmospheric interference;
[0014] S2, from the data obtained in S1, select the three band combinations of green light, near infrared and short-wave infrared 2;
[0015] S3, optimize data processing mode;
[0016] 3-1 Perform positive sample enrichment optimization on the band combination obtained in step S2;
[0017] 3-2 Perform bit depth reduction percentage stretch optimization on the data after positive sample enrichment optimization to obtain a sample set;
[0018] S4. Perform neural network deep learning on the sample set to obtain a high-density bamboo shrub model.
[0019] Correspondingly, a method for monitoring high-density bamboo thickets, steps S1 to S4 are the same as the method for establishing a model for identifying high-density bamboo thickets. After obtaining the high-density bamboo thicket model, the image to be tested is input into the high-density bamboo thicket model to obtain a high-density bamboo thicket pattern.
[0020] Preferably, in step S1, the conversion formula for converting the DN value into radiance is as follows:
[0021] L λ =k*DN+c, where L λ is the radiance, k is the gain, c is the offset, DN is the remote sensing image pixel brightness value, and records the grayscale signal of the object.
[0022] Preferably, in step S1, the conversion formula for converting the radiance into the atmospheric apparent reflectance is: where ρ λ is the atmospheric apparent reflectance, ESUN λ is the solar irradiance, θ is the solar altitude angle, and d is the distance between the sun and the earth.
[0023] Preferably, in step 3-1, the step of performing positive sample enrichment optimization includes:
[0024] 3-1-1 Obtaining sample data
[0025] Generate a sample grid using the original samples obtained by ground sampling, align the sample grid with the band combination data obtained in step S2, and randomly shuffle the samples into a data set consisting of training, validation, and testing;
[0026] 3-1-2 Calculate the percentage of positive sample pixels and obtain the positive sample set
[0027] Traverse all training data sets and determine the proportion of positive samples in each training data. The judgment formula is as follows:
[0028] Among them, ρ is the pixel ratio, M sizeis the sample data size, M label is the number of positive sample pixels in the sample data;
[0029] If the calculated pixel ratio exceeds 0.1, it will enter the positive sample set, otherwise the data enrichment process ends;
[0030] 3-1-3 Obtaining enriched positive samples
[0031] For the data entering the positive sample set, a positive sample pixel is randomly selected as the cropping center, and the positive sample center is randomly expanded and cropped to obtain the local area positive sample; the local area positive sample is then scaled, and then vertically / horizontally flipped, and the background value is used to fill the data size to the required size.
[0032] Preferably, in step 3-2, the bit depth dimension reduction percentage stretch optimization comprises the following steps:
[0033] 3-2-1 Perform grayscale histogram statistics on the preferred bands of a single sample data to obtain the pixel value distribution range within the geographical range of the sample;
[0034] 3-2-2 Remove the "long tail" distribution that appears in the pixel value distribution range;
[0035] 3-2-3 Stretch the effective pixels. The range stretching formula is:
[0036]
[0037] In the formula, ρ 16bit is the gray value of any point in the 16-bit remote sensing data, ρ max and ρ min are the upper and lower limits of the grayscale value after long tail truncation, ρ 8bit is the 8-bit grayscale value of the point after the bit depth reduction percentage is applied, ρ outmax and ρ outmin are the lower and upper bounds of the low-dimensional depth.
[0038] Preferably, in step S4, focal loss is selected as the cost function.
[0039] Accordingly, a computer device / equipment / system comprises a memory, a processor and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the method.
[0040] Accordingly, a computer-readable storage medium stores a computer program / instruction thereon, which implements the steps of the method when executed by a processor.
[0041] Accordingly, a computer program product comprises a computer program / instruction, which implements the steps of the method when executed by a processor.
[0042] Accordingly, a terminal device includes at least one processor and at least one memory; at least one program is stored in the memory and is configured to be executed by the processor to perform the method.
[0043] The present invention has the following beneficial effects:
[0044] The present invention provides a method for monitoring high-density bamboo thickets, which is particularly suitable for monitoring high-density bamboo thickets in damaged habitats in the Giant Panda National Park. The present invention utilizes the unique mechanism of high-density bamboo thickets, combines and optimizes the band input, and designs a number of targeted algorithms to adjust the ratio of positive and negative and difficult and easy samples of high-density bamboo thickets, thereby achieving effective monitoring of high-density bamboo thickets on a single-period remote sensing image. Compared with conventional methods, the method of the present invention not only achieves high-precision monitoring, but also does not need to rely on high-quality phenological time series data. Monitoring can be achieved with only a single-period remote sensing image, and reliability and timeliness are greatly improved. Specifically:
[0045] 1. The method of the present invention fills the gap in the remote sensing scale monitoring of high-density bamboo thickets. Before the present invention, there was no effective remote sensing monitoring technology that could be applied to high-density bamboo thickets. Starting from the perspective of remote sensing mechanism, the present invention analyzes the sentinel-2 data through a large number of measured plots, screens out three optimal characteristic bands of high-density bamboo thickets at the remote sensing scale, and uses deep learning technology to realize remote sensing monitoring of high-density bamboo thickets. Compared with traditional methods, it has a wider coverage range and consumes less time for a single monitoring. It can provide continuous monitoring services and grasp the periodic changes of damaged land. In addition, the non-contact feature can also minimize the damage caused by human activities to the giant panda habitat.
[0046] 2. The technical solution proposed in the present invention fully combines the advantages of traditional remote sensing inversion and deep learning models. The present invention obtains three optimal multispectral feature bands through remote sensing mechanism analysis, and automatically learns the highlighted features through neural networks, which can achieve better monitoring effects with less data and greatly reduce the amount of network calculation. At the same time, the structure of the three feature bands can be directly applied to most deep learning networks (usually using true color input) without the need for multi-channel model transformation.
[0047] 3. When existing methods perform deep learning data processing, they usually use conventional augmentation methods for superposition, without optimizing the characteristics of remote sensing images. The present invention fully considers the characteristics of small and scattered high-density bamboo bushes in target objects in remote sensing images, and designs an augmentation pipeline for enriching positive samples from random positive sample pixels after statistical filtering, which can effectively solve the model bias caused by sample imbalance. At the same time, a bit depth reduction percentage stretching algorithm is designed to address the feature mixing problem caused by bit depth redundancy of remote sensing data. By stretching the feature interval from a statistical perspective and increasing the distance between each reflection peak, the relative characteristics of high-density bamboo bushes can be highlighted, making the model easier to learn and converge faster. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Figure 1 Flow chart of the high-density bamboo thicket monitoring method;
[0049] Figure 2 A comparison of drone images of high-density bamboo thickets (left) and natural forests (right);
[0050] Figure 3 Schematic diagram of typical vegetation ground reflectance spectrum (400-900nm);
[0051] Figure 4 This is one of the satellite spectral response curves of a typical high-density bamboo shrub in the Giant Panda National Park;
[0052] Figure 5 This is the second satellite spectral response curve of a typical high-density bamboo shrub in the Giant Panda National Park;
[0053] Figure 6 This is the positive sample enrichment flow chart;
[0054] Figure 7 This is the grayscale histogram of the SWIR2 band of the Sentinel-2 satellite (Giant Panda Forest Park area on August 1, 2024);
[0055] Figure 8 for Figure 7 Grayscale histogram of the SWIR2 band bit reduction percentage after stretching. DETAILED DESCRIPTION
[0056] The present invention provides a method for monitoring high-density bamboo thickets, which is particularly suitable for monitoring high-density bamboo thickets in damaged habitats of the Giant Panda National Park. The overall process of the method is as follows: Figure 1 As shown, the specific steps include:
[0057] S1, sentinel-2 data acquisition and preprocessing
[0058] Sentinel-2, the Sentinel-2 remote sensing satellite, carries a multispectral imager (MSI). The combined revisit period of A and B satellites is about 5 days. It has four bands: red, green, blue, and near-infrared at a resolution of 10 meters, and three red edges and two short-wave infrared at a resolution of 20 meters, a total of five bands. Sentinel-2 data can be downloaded for free through Copernicus Open Access Hub, USGSEarthExplorer, Google Earth Engine, Amazon Web Services, Planetary Computer and other platforms. Data acquisition is simple and low-cost.
[0059] For the L1C-level original sentinel-2 data with cloud cover less than 10% in the Giant Panda National Park obtained from any of the above public channels, first obtain the DN digital signal value gain and offset of each pixel according to the data XML header file, perform radiation calibration processing, and convert the DN value into radiance. The conversion formula is as follows:
[0060] L λ =k*DN+c. Among them, L λ is the radiance, k is the gain, c is the offset, DN is the remote sensing image pixel brightness value, and records the grayscale signal of the object.
[0061] Then convert the radiance into the atmospheric apparent reflectance, the conversion formula is as follows:
[0062] where ρ λ is the atmospheric apparent reflectance, ESUN λ is the solar irradiance, θ is the solar altitude angle, and d is the distance between the sun and the earth.
[0063] After obtaining the apparent reflectivity, the 6S model (Second Simulation of a Satellite Signal in the Solar Spectrum) is used to solve the real surface reflectivity data to remove atmospheric interference. For bands with a resolution lower than 10m, GDAL Warp is used for resampling, and the interpolation method is bilinear interpolation. The interpolation technology is used to convert the 20m resolution image data into 10m resolution image data. The preferred solution is to convert the obtained 32-bit floating-point surface real reflectivity into 16-bit unsigned integer for storage using a linear formula in order to reduce storage and memory overhead.
[0064] S2, optimal band combination
[0065] The existing real-time monitoring methods usually use three bands of visible light (true color) as data input, but it is difficult to identify high-density bamboo thickets using only visible light bands. The Sentinel-2 satellite has multi-spectral channels. Using multiple spectral channels can improve recognition accuracy, but excessive redundant data will increase training costs and time. Therefore, based on the canopy reflectance characteristics of high-density bamboo thickets, it is necessary to deconstruct sensitivity and screen the optimal bands of multi-spectral combinations as data input from the perspective of remote sensing mechanism.
[0066] Based on a large amount of previous actual sampling and survey data, the inventors have accumulated a large amount of high-density bamboo shrub structure and vector patch information, aligned the patch with the current Sentinel-2 image, changed the band combination, and analyzed the sensitive bands. There are significant differences in the information of high-density bamboo shrubs and natural forests. The drone images of the two are compared. Figure 2 As shown; the left picture is a high-density bamboo thicket, and the right picture is a natural forest. Specifically, the previous sampling results show:
[0067] From an ecological definition, the canopy of high-density bamboo shrubs is generally small and low, with a single canopy height usually not exceeding 3 meters and a range usually not exceeding 10 meters. On Sentinel-2, it exists as a mixed pixel smaller than the sensor resolution. Therefore, in the multi-band channel texture, it appears as a uniform or small amount of particles (trees), which is clearly distinguished from the composition of natural forests (because natural forests have a variety of tree species and different heights, and the canopy often exceeds the single pixel scale, it usually appears as unevenly randomly distributed multi-particle features on the satellite scale).
[0068] From a spectral point of view, although high-density bamboo shrubs have a higher coverage, they have less opportunities to absorb and refract light in the vertical scale compared to natural forests. This is because low bamboo shrubs make it easier for solar radiation to reach the ground and reflect back to satellite sensors for imaging. Therefore, high-density bamboo shrubs show high reflectivity characteristics, that is, they appear as higher brightness in the image.
[0069] From the perspective of the physical and chemical properties of vegetation, vegetation appears green in the visible light band. This is because vegetation absorbs more red light and blue-violet light for photosynthesis, and reflects green light. At the same time, due to the existence of the leaf structure, it has strong reflection characteristics in the near infrared. Therefore, the red light absorption and near infrared strong reflection characteristics, namely the "red edge", can easily distinguish vegetation from other ground objects. However, the spectral response of different vegetation in visible light is basically the same, but it shows great differences in the near infrared band ( Figure 3 ). Therefore, near infrared can be used to distinguish different vegetation types.
[0070] Although different vegetation has different spectral responses in the near infrared, this difference is a trend rather than an absolute value response. These spectral responses are affected by satellite sensors, lighting, angles, and clouds. By superimposing satellite images of the corresponding period on the measured patches, the inventors drew the response curves of typical features (high-density bamboo shrubs, natural forests, and contiguous artificial forests) in the two areas of the Giant Panda National Park in the sentinel-2 spectral range ( Figure 4 , 5 ), and found that the spectrum of high-density bamboo thickets at the satellite scale showed typical green plant characteristics in the visible light (VIS) band, and its reflectivity was slightly higher than that of the surrounding natural forests and contiguous artificial forests. In the near-infrared (NIR) channel, the spectral difference between bamboo thickets, natural forests and artificial forests reached the maximum, and from visible light to near-infrared channels, high-density bamboo thickets showed the highest rate of change. With the increase of wavelength, the reflectance spectra of the three showed a downward trend between the two short-wave infrared channels (SWIR1 and SWIR2), but the bamboo thickets always maintained a higher reflectance characteristic than the other two. In the SWIR2 range, the spectra of contiguous artificial forests and natural forests showed a significant downward trend, and the difference further decreased, but the high-density bamboo thickets still maintained a relatively high reflectance characteristic. At the same time, compared Figure 4 , 5 It can be seen that although the spectral response curves of high-density bamboo thickets in two different areas have the same trend, the absolute values of reflectance in different areas are quite different; therefore, high-density bamboo thickets cannot be distinguished from natural forests by threshold alone.
[0071] Based on the above characteristics of high-density bamboo thickets, a combination of three bands, green light (Green), near infrared (NIR) and shortwave infrared 2 (SWIR2), was selected as the feature extraction input of high-density bamboo thickets.
[0072] 2-1 Use green light and near infrared to filter non-vegetation objects
[0073] The green light band is used to distinguish "green" vegetation from other non-green objects. In addition, because vegetation has a leaf structure, the complex leaf cavity structure and the multiple scattering control of near-infrared radiation in the cavity will cause the vegetation to have high reflectivity characteristics in the NIR band. Therefore, the NIR band is used as a supplement to filter out non-vegetation green objects that do not have leaf structures.
[0074] 2-2 Extracting the characteristics of high-density bamboo bushes
[0075] After filtering out non-vegetation features, extract the characteristics of high-density bamboo shrubs to distinguish them from other vegetation types; specifically, the following are included:
[0076] The 2-2-1 high-density bamboo thicket shows a global extreme reflectance in the NIR band, which is significantly higher than other nearby vegetation types.
[0077] 2-2-2 The highest change rate from VIS to NIR. Among the reflectance jumps from VIS to NIR, high-density bamboo shrubs have the highest jump compared to other nearby vegetation types.
[0078] 2-2-3 In the SWIR2 band, high-density bamboo thickets show high reflectance characteristics, while other vegetation generally converges to low values.
[0079] 2-3 Feature Learning and Application
[0080] The features extracted in step 2-2 are all relative features from the comparison between high-density bamboo thickets and surrounding vegetation, with spatial heterogeneity, irregular distribution and diverse values, which are difficult to accurately define and quantify using mathematical formulas. Therefore, the preferred solution is: using Green-NIR-SWIR2 three-band images as input data, the data size can be selected as 3*512*512 (where the size structure is the number of bands, image high-direction pixels and image wide-direction pixels, respectively), and using deep learning technology to simulate human brain thinking to automatically learn this relative feature in the preferred band, forming a pixel-based semantic segmentation network, and finally realizing the recognition of high-density bamboo thickets.
[0081] Since deep learning allows end-to-end training, that is, the network automatically learns and optimizes from the original image input to the classification output, without relying on manually designed rules (feature extraction, edge detection, segmentation algorithm, etc.) and features (such as color, texture, edge, shape, etc.), it has advantages in the remote sensing monitoring task of high-density bamboo shrubs with complex backgrounds and spatial heterogeneity. The specific steps are: using the segformer-b4 network, the input remote sensing image data is divided into multiple equal-sized patches, and each small patch is mapped to a token. These tokens interact and weight the tokens through multiple self-attention encoders of different sizes, learn multi-scale context (surrounding) feature information, and continuously abstract to high dimensions through a deep multi-layer structure (16 layers). Each layer will recalculate the features based on the output results of the upper layer, and continuously strengthen the global information fusion, thereby producing richer and more abstract high-dimensional features of high-density bamboo shrubs. After obtaining the high-dimensional features, the high-dimensional features are mapped back to the corresponding position of each token through MLP (pixel-by-pixel classification head), and the category probability map of the position is obtained (such as 0 represents background and 1 represents high-density bamboo shrubs). The highest probability category is selected as the category of the position, and then the pixel-by-pixel classification result of high-density bamboo shrubs with the same size as the input image is obtained.
[0082] The optimal band combination fully exploits the potential of multispectral sensors and provides a theoretical basis for the identification of high-density bamboo shrubs from the perspective of radiation transmission mechanism. The optimal band combination reduces information redundancy, provides clear semantic information for the model at the input level, and effectively reduces the difficulty of mining high-dimensional (abstract) features. At the same time, the three-band input combination is compatible with most visual deep learning network structures designed for common imaging tasks, without the need to redesign the model, reducing the cost of optimization and migration.
[0083] S3. Optimize data processing mode
[0084] In order to improve the training effect of the deep learning model, the present invention optimizes it through two improved data processing algorithms: positive sample enrichment and sample bit depth reduction percentage stretching.
[0085] 3-1 Positive sample enrichment optimization
[0086] Since the imaging angle and object scale of remote sensing images are quite different from those of ordinary images, natural objects in remote sensing images generally have the characteristics of "rotation invariance", "scale invariance" and "separability". Using these remote sensing image characteristics, a positive sample enrichment algorithm and management process are designed. The process is as follows: Figure 6 As shown, the specific operations are as follows:
[0087] 3-1-1 Obtaining sample data
[0088] The sample grid (actual ground survey patch) is generated using the original samples obtained by ground sampling. The sample grid is aligned with the optimized sentinel-2 three-band image (the preferred band combination data obtained in step S2), and is synchronously cropped to 512×512 samples with an overlap rate of 0.1. The samples are randomly shuffled into a training: validation: test data set of 7:2:1.
[0089] 3-1-2 Calculate the percentage of positive sample pixels and obtain the positive sample set
[0090] All training data sets are traversed separately, and the proportion of positive samples (high-density bamboo shrubs) in each training data is determined by the following formula.
[0091] Among them, ρ is the pixel ratio, M size is the sample data size, M label is the number of positive sample pixels in the sample data.
[0092] If the calculated pixel ratio exceeds 0.1, it will enter the positive sample set, otherwise the data enrichment process ends.
[0093] 3-1-3 Obtaining enriched positive samples
[0094] For the data entering the positive sample set, a positive sample pixel is randomly selected as the cropping center, and the positive sample center is randomly expanded and cropped in the range of (150×150) to (350×350) pixels to obtain the local area positive sample.
[0095] Then the positive samples in the local area are scaled at a random ratio of 0.8 to 1.2, and vertically / horizontally flipped with a probability of 0.6. Finally, the background value is used to fill the data size to 512×512.
[0096] Repeat the above process 5 to 10 times according to the enrichment needs.
[0097] The purpose of this treatment is to ensure that the augmented data after the enrichment process still retains 100% of the positive sample pixels in a certain random area, thereby avoiding the probability of obtaining only pure negative sample areas after random cropping and scaling by conventional methods, which exacerbates the imbalance of positive and negative samples. Moreover, in remote sensing images, due to the generally small scale of objects, the proportion of positive sample pixels is lower, and the probability of obtaining pure negative samples is very high. At the same time, randomly selecting the center point of different positive pixels in the sample for segmentation can effectively utilize the remote sensing "divisibility" principle. In the limited high-density bamboo shrub samples, more high-density bamboo shrub positive samples with different centers, angles, and sizes can be produced through random positive segmentation and subsequent enrichment pipelines, thereby increasing the proportion of positive samples and balancing the distribution of data sets. Through the positive sample enrichment algorithm, the proportion of positive samples in the overall training samples can be increased, while minimizing the risk of overfitting, guiding the model to learn more positive sample features, and improving monitoring accuracy.
[0098] 3-2 Sample bit depth reduction percentage stretch optimization
[0099] This paper proposes a sample bit depth reduction percentage stretching algorithm from the perspective of remote sensing data, which can enhance the band characteristics and improve the recognition effect. On the one hand, high-density bamboo shrubs have high reflectivity characteristics in the SWIR2 band that are different from the surrounding vegetation types. Figure 4 , 5It can be seen that this feature is relative, so it is necessary to amplify this relative feature to highlight the difference with other objects, while ensuring that the original feature distribution trend remains unchanged, so as to help the model better learn the common characteristics of heterogeneous high-density bamboo shrubs. On the other hand, remote sensing images usually show an overall trend of being too dark, resulting in too small a distinction between objects. In the field of image processing, the pixel value distribution of an image that looks normal and is easy to distinguish should satisfy the normal distribution as much as possible, without overexposure and too dark. However, due to the large number of objects and complex imaging conditions in remote sensing images, a large number of pixel channels are occupied by objects with a small but bright proportion (such as clouds and fog), and the pixels of the objects are distributed in a smaller range, resulting in the overall image being too dark and the reflection difference between the objects being reduced. Therefore, based on the above-mentioned remote sensing image characteristics and the relative characteristics of the SWIR2 reflectivity of high-density bamboo shrubs, a sample bit depth reduction percentage stretching algorithm is designed, as follows:
[0100] 3-2-1 Perform grayscale histogram statistics on the three preferred bands (green light, near infrared and short-wave infrared) of a single sample data to obtain the pixel value (brightness) distribution range within the geographical range of the sample.
[0101] Statistical examples include Figure 7 As shown. Figure 7 , pixels are concentrated in a short interval (such as Figure 7 Medium gray value 1000-11000).
[0102] 3-2-2 Remove the "long tail" distribution that appears in histogram statistics. Figure 7 As shown in the figure, there are a small number of widely distributed "long tail" pixels outside the interval where the pixels are concentrated. "Long tail" refers to low-frequency pixels with extremely high (low) brightness values. These pixels usually occupy most of the brightness interval but are rare in number. They are invalid contributions to the overall image, so they need to be cut off and removed. The removal method is: cut the upper and lower limits of the valid pixels in the histogram statistics inward by 1%, thereby removing the "long tail" and retaining only the valid pixels with a large proportion.
[0103] 3-2-3 Stretch the range of effective pixels. Since the pre-processed sentinel-2 remote sensing image is a 16-bit data type, after trimming the "long tail", the effective pixels need to be stretched. Considering that the amount of 16-bit data is 256 times that of 8-bit, in order to reduce calculation and storage overhead, the 16-bit remote sensing image data after removing the "long tail" is stretched to the 8-bit color range according to the following linear formula.
[0104]
[0105] In the formula, ρ i6bit is the gray value of any point in the 16-bit remote sensing data, ρ max and ρ minare the upper and lower limits of the grayscale value after long tail truncation, ρ 8bit is the 8-bit grayscale value of the point after the bit depth reduction percentage is applied, ρ outmax and ρ outmin are the lower and upper bounds of the low-dimensional depth.
[0106] Will Figure 7 After stretching to 8-bit color range, the specific Figure 8 shown. Figure 7 The pixel values are concentrated in the range of 1000-10000, and a lot of effective information is compressed in this range. Figure 8 , the pixel value distribution is closer to the normal distribution, the effective information is stretched to the entire grayscale space, and there are no too many invalid pixels occupying the grayscale. Therefore, through the bit depth reduction percentage stretching algorithm, while removing the long tail effect and effectively enhancing the contrast of the ground objects in the remote sensing image, it can also reduce the space occupation, realize the contrast stretching of the effective pixel area, increase the reflection difference between high-density bamboo shrubs and other vegetation in the SWIR2 band, simplify the abstraction of the feature map, and reduce the difficulty of model learning.
[0107] S4, segformer neural network deep learning, obtain high-density bamboo shrub model
[0108] After realizing the algorithm optimization of band optimization and data processing based on remote sensing mechanism, the high-density bamboo shrub sample set was sent to the segformer deep learning model for tuning and training.
[0109] The segformer model structure is: using vision-transformer as the backbone and segformer-b4 as the downstream segmentation network, while combining the advantages of convolutional neural network (CNN) and transformer, using encoders of different sizes based on self-attention, to achieve a multi-scale feature extraction and fusion mechanism similar to CNN, taking into account the global capture ability of transformer. It has advantages in the task of extracting high-density bamboo shrubs with scattered distribution and different scales.
[0110] The training set obtained in step S3 that has completed positive sample enrichment and bit depth reduction percentage stretching is input into the segformer model, and conventional data augmentation is performed. AdamW is selected as the optimizer, and the initial learning rate is 0.00006.
[0111] Considering that even if positive sample enrichment is completed, there is still the problem of uneven distribution of difficult and easy samples, so focal loss is used as the cost function, the formula is as follows:
[0112] FL pt=-α t (1-pt) γ log(pt)
[0113] In the formula, α t is the balance factor (optional: 0.6), used to adjust the weight ratio of positive and negative samples, γ is the focus factor (optional: 2), used to adjust the weight ratio of difficult and easy samples, and pt is the predicted probability of the target.
[0114] Focal loss can adjust the sample back propagation weight through the focus and balance factor to achieve biased learning for difficult samples. Using focal loss can balance the back propagation direction at the model level, reduce the model's bias towards easy samples, focus on learning difficult samples, and improve model robustness. The batch size is set to 12, 50 epochs are trained, and the accuracy is verified once per epoch. The early stop mechanism is used. After 5 consecutive rounds of verification, if the accuracy does not continue to increase, the training is terminated to obtain a high-density bamboo shrub model to prevent model overfitting.
[0115] S5. Inference and post-processing of high-density bamboo shrubs to obtain high-density bamboo shrub patches
[0116] Based on the optimal high-density bamboo shrub model trained in step S4, any sentinel-2 image to be detected is input, and the image is optimally rearranged in the order of G, NIR, and SWIR2, and the bit depth reduction percentage stretching is performed according to the method of step S2 before being sent to the model. Since the image used for inference is much larger than the training size, a sliding window is applied to the inference image to reduce the pressure on the hardware video memory, and the reverse sliding window is used to restore the original image size after the inference is completed. The inference is completed and an 8-bit prediction grid is obtained.
[0117] Since high-density bamboo shrubs will not appear above the forest line, the target location digital elevation model (DEM data) and the target forest line threshold (forest line data) are input, the DEM data is clipped and resampled to the sentinel-2 satellite scale, and the predicted grid is aligned with the DEM data. It is determined whether each grid pixel value satisfies both the elevation less than the forest line and the predicted value is high-density bamboo shrubs. If both are met, the pixel prediction value is retained, otherwise the predicted grid value is assigned a value of 0.
[0118] The post-processed prediction grid is subjected to morphological processing, small isolated patches are filtered out, and vectorization is completed to obtain high-density bamboo shrub prediction patches.
[0119] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Unless otherwise specified, the technical means used in the embodiments are conventional means well known to those skilled in the art. The data obtained are all average values obtained after at least 3 repetitions, and all the data obtained in each repetition are valid data.
[0120] Example
[0121] In this embodiment, the training and reasoning hardware environment is: the CPU is Intel i9 11900, the GPU is NVIDIA RTX3090, the memory is 64G DDR4, the software environment is Windows 10 Pro, the CUDA version is 12.6, the Python version is 3.9, and PyTorch 2.4.1 is used as the basic deep learning framework, GDAL is used as the raster and vector processing library, Py6s is used as the atmospheric correction library model, and MMsegmentation is used as the model development framework. The implementation code is written in Python.
[0122] 1. Obtain remote sensing data and preprocess it
[0123] Taking the Yingjing area of the Giant Panda National Park as the experimental area, four scenes of sentinel-2 multispectral data with high data quality (cloud cover less than 10%) on July 8, 2023 and August 1, 2024 were selected. Python was used to perform radiometric calibration on the sentinel-2 data bands, and py6s was used for atmospheric correction and cropped to the Yingjing area of the Giant Panda National Park respectively.
[0124] 2. Optimal band combination
[0125] The G (green light), NIR (near infrared), and SWIR2 (shortwave infrared 2) bands in the current image are selected respectively, and based on the NIR, the SWIR2 band is bilinearly interpolated to a resolution of 10m, and the bands are aligned in the order of G-NIR-SWIR2 and saved as a 3-channel 16-bit image.
[0126] 3. Optimize data processing
[0127] The high-density bamboo shrub patches in the Yingjing area obtained by field sampling were rasterized to obtain 8-bit label data with the background labeled as 0 and the high-density bamboo shrub patches labeled as 1.
[0128] Align the images and labels, and perform sliding cropping with an overlap ratio of 0.1 to obtain 528 samples of size 512×512 (image + label is one sample). Randomly sort the samples and divide them into a sample set with a ratio of 7:2:1 for training: validation: test.
[0129] The training set was taken out separately and positive sample enrichment was performed to obtain 375 positive enriched samples. All of them were put into the training set to ensure that the positive sample enrichment would not affect the verification and test results.
[0130] Write the bit depth reduction percentage stretching code in the data loader and make it a required step in data loading. Other data enhancement projects remain fully enabled by default.
[0131] 4. Segformer neural network deep learning to obtain high-density bamboo shrub model
[0132] The segformer-b4 model was selected and written as the deep learning network, batch_size was set to 12, AdamW was used as the optimizer, the initial learning rate was set to 0.00006, and the cost function was focal loss. The balance factor was set to 0.6, the focus factor was set to 2, and the epoch was set to 50. Verification was performed every epoch, and the best model was retained. Linear warm-up learning was performed from 0 to 2 epochs, and then normal learning was performed. An early stop mechanism was set. If the accuracy did not continue to increase after 5 consecutive rounds of verification, it was considered that convergence had been achieved and training was terminated to prevent overfitting of the model.
[0133] The accuracy of the model is verified on the test set. The accuracy evaluation indicators include: IoU (intersection over union), accuracy, precision and F1 score. IoU is defined as the ratio of the intersection of the predicted area and the true area to the union of the predicted area and the true area. Accuracy is defined as the ratio of the number of correctly predicted samples to the total number of samples. Precision is defined as the ratio of the number of correctly predicted samples to the total number of predicted samples that are positive. F1 score is the harmonic mean of accuracy and precision. The best model obtained through training is inferred on all test set data and the above indicators are calculated.
[0134] At the same time, a control group was set up: sentinel-2R-GB conventional visible light data was used as input, the preprocessing steps were the same, except that the positive sample enrichment and bit depth reduction percentage stretching algorithms were not run, and the segformer-b4 model was also used, the training parameters remained the same, and training was performed for 50 epochs.
[0135] The comparison results are shown in Table 1.
[0136] Table 1 Comparison of model accuracy of different methods
[0137] method Accuracy (%) Accuracy (%) IoU F1 score Overall accuracy (%) Method of the present invention 74.38 71.99 57.68 73.16 87.10 Control group 43.99 78.04 39.15 56.27 71.95
[0138] The results show that there is a huge difference between the accuracy and precision indicators of the control group, indicating that the model of the control group has not completed effective convergence and has a great bias in performance. That is, most of the monitored high-density bamboo bushes are indeed true values, but there are a large number of missed detections, and a large number of actual high-density bamboo bushes are missed as background. The IoU indicator gap is huge, indicating that the control group cannot obtain effective high-density bamboo bush boundaries. The accuracy and precision scores of the method of the present invention are both high, and the scores are close, indicating that the method of the present invention can better extract the boundaries of high-density bamboo bushes, and in the remote sensing monitoring of high-density bamboo bushes, not only can most high-density bamboo bushes be found, but most of the high-density bamboo bushes found are correct true values, which is also proved by the F1 score of 73.16.
[0139] The embodiments described above are only descriptions of the preferred modes of the present invention and are not intended to limit the scope of the present invention. Without departing from the design spirit of the present invention, various deformations, modifications, and substitutions made to the technical solutions of the present invention by ordinary technicians in this field should all fall within the protection scope determined by the claims of the present invention.
Claims
1. A method for establishing a model for identifying high-density bamboo thickets, characterized in that: The method comprises the following steps: S1, sentinel-2 data acquisition and preprocessing; Acquire the sentinel-2 data of the area to be monitored, obtain the gain and offset, perform radiation calibration, convert the DN value into radiance, and then convert the radiance into atmospheric apparent reflectance, solve the real surface reflectance data, and remove atmospheric interference; S2, from the data obtained in S1, select the three band combinations of green light, near infrared and short-wave infrared 2; S3, optimize data processing mode; 3-1 Perform positive sample enrichment optimization on the band combination obtained in step S2; 3-2 Perform bit depth reduction percentage stretch optimization on the data after positive sample enrichment optimization to obtain a sample set; S4. Perform neural network deep learning on the sample set to obtain a high-density bamboo shrub model.
2. A method for monitoring high-density bamboo thickets, characterized in that: The method comprises the following steps: S1, sentinel-2 data acquisition and preprocessing; Acquire the sentinel-2 data of the area to be monitored, obtain the gain and offset, perform radiation calibration, convert the DN value into radiance, and then convert the radiance into atmospheric apparent reflectance, solve the real surface reflectance data, and remove atmospheric interference; S2, from the data obtained in S1, select the three band combinations of green light, near infrared and short-wave infrared 2; S3, optimize data processing mode; 3-1 Perform positive sample enrichment optimization on the band combination obtained in step S2; 3-2 Perform bit depth reduction percentage stretch optimization on the data after positive sample enrichment optimization to obtain a sample set; S4, performing neural network deep learning on the sample set to obtain a high-density bamboo shrub model; S5. Input the image to be tested into the high-density bamboo thicket model to obtain a high-density bamboo thicket image.
3. The method according to claim 1 or 2, characterized in that: In step S1, the conversion formula for converting the DN value into radiance is as follows: L λ =k*DN+c, where L λ is the radiance, k is the gain, c is the offset, DN is the remote sensing image pixel brightness value, and records the grayscale signal of the object.
4. The method according to claim 1 or 2, characterized in that: In step S1, the radiance is converted into the atmospheric apparent reflectance, and the conversion formula is as follows: where ρ λ is the atmospheric apparent reflectance, ESUN λ is the solar irradiance, θ is the solar altitude angle, and d is the distance between the sun and the earth.
5. The method according to claim 1 or 2, characterized in that: In step 3-1, the steps for optimizing the positive sample enrichment include: 3-1-1 Obtaining sample data Generate a sample grid using the original samples obtained by ground sampling, align the sample grid with the band combination data obtained in step S2, and randomly shuffle the samples into a data set consisting of training, validation, and testing; 3-1-2 Calculate the percentage of positive sample pixels and obtain the positive sample set Traverse all training data sets and determine the proportion of positive samples in each training data. The judgment formula is as follows: Among them, ρ is the pixel ratio, M size is the sample data size, M label is the number of positive sample pixels in the sample data; If the calculated pixel ratio exceeds 0.1, it will enter the positive sample set, otherwise the data enrichment process ends; 3-1-3 Obtaining enriched positive samples For the data in the positive sample set, a positive sample pixel is randomly selected as the cropping center, and the positive sample center is randomly expanded and cropped to obtain the positive sample in the local area; The positive samples in the local area are scaled, flipped vertically / horizontally, and then the data size is filled with background values to the required size.
6. The method according to claim 1 or 2, characterized in that: In step 3-2, the bit depth reduction percentage stretch optimization includes the following steps: 3-2-1 Perform grayscale histogram statistics on the preferred bands of a single sample data to obtain the pixel value distribution range within the geographical range of the sample; 3-2-2 Remove the "long tail" distribution that appears in the pixel value distribution range; 3-2-3 Stretch the effective pixels. The range stretching formula is: In the formula, ρ 16bit is the gray value of any point in the 16-bit remote sensing data, ρ max and ρ min are the upper and lower limits of the grayscale value after long tail truncation, ρ 8bit is the 8-bit grayscale value of the point after the bit depth reduction percentage is applied, ρ outmax and ρ outmin are the upper and lower bounds of the low-dimensional depth respectively.
7. The method according to claim 1 or 2, characterized in that: In step S4, focal loss is selected as the cost function.
8. A computer device / equipment / system comprising a memory, a processor and a computer program stored in the memory, characterized in that: The processor executes the computer program to implement the steps of the method according to any one of claims 1 to 7.
9. A computer-readable storage medium having a computer program / instruction stored thereon, characterized in that: When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
A vegetation planting area identification method and system based on a convolutional neural network algorithm
CN109815916A
Cloud mask-oriented non-uniform category sample equalization method
CN111291818A
Method for constructing green and healthy vegetation remote sensing recognition index
CN114519821A
Target object detection method and apparatus, electronic device and storage medium
WO2022160597A1