Land utilization classification method and device based on land parcel units, equipment and medium
Through the land use classification method based on plot units, the problems of low efficiency and insufficient accuracy of land use classification in the prior art are solved, and more efficient and fine land use classification are achieved.
Patent Information
- Application Number
- CN202411163210.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-23
- Publication Date
- 2025-02-18
AI Technical Summary
The existing land use classification method takes pixels as the basic unit, resulting in the same land use type being divided into different categories, reducing the accuracy and efficiency of classification.
The land use classification method based on plot units is adopted, and the boundary vector files and remote sensing image data of the target area are obtained, and feature conversion and geometric conversion are performed. Combined with multi-band remote sensing images and plot unit information, the preset land classification model is used for Classification.
It avoids the incorrect division of the same land use type, improves the degree of refinement and efficiency of land use classification, reduces the amount of calculation and model training time, and improves the accuracy of classification.
Smart Images

Figure CN119478478A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of land use type classification, and in particular to a land use classification method, device, equipment and medium based on plot units. Background Art
[0002] At present, the formulation of urban sustainable development plans requires the understanding of the historical process and evolution of land use over a long period of time, and also requires the classification accuracy of land use types. Many experts and scholars have conducted useful discussions and research on urban land use with the help of artificial intelligence algorithms in the computer field.
[0003] The existing land use classification methods mainly use pixels as the basic unit to achieve land use classification. Specifically, algorithms are used to identify and classify remote sensing images of land, and urban land is classified based on pixels as the basic unit. However, land use classification based on pixels will result in the same land type being divided into different categories, which in turn leads to low efficiency in land use identification and classification, affecting the accuracy and efficiency of land use classification. Summary of the invention
[0004] The present application provides a land use classification method, device, equipment and medium based on plot units, which realizes land use classification with plots as basic classification units. Since the plots are used as the basic classification units, the classification characteristics of the plot units divided by the road network in the urban land are fully followed, and the classification errors of different land use types within the same land are avoided, the refinement of land use classification is improved, and multiple pixels are merged into one classification object, which reduces the amount of calculation and the time consumed for training models, adjusting models and final classification, and solves the problems of low recognition and classification efficiency and insufficient accuracy of existing land use classification methods.
[0005] In a first aspect, the present application provides a land use classification method based on plot units, comprising:
[0006] Acquire a boundary vector file and remote sensing image data of a target classification area, wherein the remote sensing image data includes a multi-band remote sensing image;
[0007] Performing feature conversion based on the remote sensing image data to obtain multi-dimensional array data;
[0008] Performing geometric transformation according to the boundary vector file to obtain geometric shape data, wherein the geometric shape data includes land parcel unit information;
[0009] According to the multi-band remote sensing image, the geometric shape data and the multi-dimensional array data, classification is performed through a preset land classification model to obtain a land use classification result.
[0010] Optionally, performing feature conversion based on the remote sensing image data to obtain multidimensional array data includes:
[0011] Perform feature extraction based on the remote sensing image data to obtain fused feature data, wherein the fused feature data includes spectral feature data and texture feature data;
[0012] Based on the fused feature data, data conversion is performed in combination with the multi-band remote sensing image to obtain multi-dimensional array data.
[0013] Optionally, the land use classification result is obtained by performing classification based on the multi-band remote sensing image, the geometric shape data and the multi-dimensional array data through a preset land classification model, including:
[0014] According to the plot unit information, the multidimensional array data and the multi-band remote sensing image are processed by a preset classification algorithm to obtain a data set to be classified;
[0015] Classify the data set to be classified using a preset land classification model to obtain land use classification data;
[0016] Visualization processing is performed based on the land use classification data to obtain a land use classification result, and the land use classification result includes a land use classification map.
[0017] Optionally, the processing of the multidimensional array data and the multi-band remote sensing image by a preset classification algorithm according to the plot unit information to obtain a data set to be classified includes:
[0018] For the multi-band remote sensing image, pixel operation is performed on the multi-dimensional array data to obtain pixel mean data, wherein the pixel mean data corresponds one-to-one to the multi-band remote sensing image;
[0019] Extracting vertex coordinates of the geometric shape of the boundary of the plot from the plot unit information;
[0020] Determining that the multidimensional array data corresponds to a preset two-dimensional data format;
[0021] According to the two-dimensional data format, based on the vertex coordinates, the pixel mean data and the multi-dimensional array data, a data set to be classified is constructed.
[0022] Optionally, for the multi-band remote sensing image, performing pixel operation on the multi-dimensional array data to obtain pixel mean data includes:
[0023] Determining characteristic pixel values of all characteristic images in the multidimensional array data, and determining characteristic bands of the multi-band remote sensing image;
[0024] Accumulate pixels based on the characteristic pixel values to obtain the number of pixels;
[0025] For each of the characteristic bands, the number of pixels is averaged to obtain the pixel mean data.
[0026] Optionally, before classifying using a preset land classification model, the method further includes:
[0027] Acquire remote sensing image samples of the sample area;
[0028] Performing data processing according to the remote sensing image samples to obtain a sample plot training set, wherein the sample plot training set includes classification label sample data, boundary shape sample data, and multi-dimensional feature sample data;
[0029] Perform pixel calculation on the sample plot training set to obtain a sample pixel mean;
[0030] Data is constructed based on the sample pixel mean, the classification label sample data, the boundary shape sample data, and the multi-dimensional feature sample data to obtain a sample data set with land plots as units;
[0031] Model training is performed based on the sample data set to obtain a random forest model, and the random forest model is used as the land classification model.
[0032] Optionally, performing data processing based on the remote sensing image samples to obtain a sample plot training set includes:
[0033] Performing image preprocessing based on the remote sensing image samples to obtain a sample label data set, wherein the sample label data set includes multi-band remote sensing image samples and classification label sample data corresponding to the multi-band remote sensing image samples;
[0034] Performing feature conversion based on the multi-band remote sensing image samples to obtain multi-dimensional feature sample data;
[0035] Performing geometric extraction based on the classification label sample data to obtain boundary shape sample data, wherein the boundary shape sample data includes a sample plot geometric boundary corresponding to the sample area;
[0036] The geometric boundaries of the sample plots are cropped based on the multi-band remote sensing image samples and the multi-dimensional feature sample data to obtain a sample plot training set.
[0037] In a second aspect, the present application provides a land use classification device based on plot units, comprising:
[0038] A data acquisition module, used to acquire a boundary vector file and remote sensing image data of a target classification area, wherein the remote sensing image data includes a multi-band remote sensing image;
[0039] A feature conversion module, used for performing feature conversion based on the remote sensing image data to obtain multi-dimensional array data;
[0040] A geometric conversion module, used for performing geometric conversion according to the boundary vector file to obtain geometric shape data, wherein the geometric shape data includes plot unit information;
[0041] The classification module is used to classify the land according to the multi-band remote sensing image, the geometric shape data and the multi-dimensional array data through a preset land classification model to obtain a land use classification result.
[0042] In a third aspect, the present application provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus;
[0043] Memory, used to store computer programs;
[0044] The processor is used to implement the steps of the land use classification method based on plot units as described in any embodiment of the first aspect when executing the program stored in the memory.
[0045] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the land use classification method based on plot units as described in any embodiment of the first aspect.
[0046] In summary, the embodiment of the present application obtains the boundary vector file and remote sensing image data of the target classification area, performs feature conversion based on the remote sensing image data to obtain multidimensional array data, performs geometric conversion according to the boundary vector file to obtain geometric shape data, the geometric shape data includes plot unit information, and classifies the land through a preset land classification model based on the multi-band remote sensing image, geometric shape data and multidimensional array data included in the remote sensing image data to obtain a land use classification result, thereby realizing land use classification based on plots as basic classification units, avoiding classification errors in which the same land is divided into different land use types, improving the refinement of land use classification, and solving the problems of low recognition and classification efficiency and insufficient accuracy in existing land use classification methods. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0048] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0049] Figure 1 A schematic diagram of a flow chart of a land use classification method based on plot units provided in an embodiment of the present application;
[0050] Figure 2 This is a schematic diagram of the steps of a land use classification method based on plot units provided by an optional embodiment of the present application;
[0051] Figure 3 It is a land use classification flow chart provided by an optional embodiment of the present application;
[0052] Figure 4 A structural block diagram of a land use classification device based on plot units provided in an embodiment of the present application;
[0053] Figure 5 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0054] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0055] In related technologies, since the random forest algorithm is suitable for classification tasks, it has been widely used in remote sensing image land use classification tasks. In existing land use classification methods based on the random forest algorithm, the algorithm mostly uses pixels as the basic unit for the recognition and classification of remote sensing images. Among various types of urban land use, the same plot is composed of multiple pixels. Classification based on pixels will cause the same land type to be divided into different categories, which will affect the accuracy of land use classification; secondly, the algorithm with pixels as classification units has a large amount of calculation, which will increase the calculation energy consumption and time, and reduce the efficiency of classification.
[0056] To solve the above problems, one of the concepts of the present application is to improve the classification unit and develop a new land use classification method, so as to improve the classification accuracy and efficiency. Specifically, the present application obtains the boundary vector file and remote sensing image data of the target classification area, then performs feature conversion based on the remote sensing image data to obtain multidimensional array data, and performs geometric conversion based on the boundary vector file to obtain geometric shape data, the geometric shape data contains the plot unit information, and then classifies according to the multi-band remote sensing image, geometric shape data and multidimensional array data contained in the remote sensing image data through a preset land classification model to obtain the land use classification result, and realizes the land use classification with the plot as the basic classification unit. Since the plot is the basic classification unit, the classification characteristics of each plot unit divided by the road network of the urban land are fully followed, and the classification error of the same land being divided into different land types is avoided, and the refinement of the land use classification is improved, and multiple pixels are merged into one classification object, which reduces the amount of calculation, and also reduces the time consumed by training the model, adjusting the model and the final classification, and solves the problems of low recognition and classification efficiency and insufficient accuracy existing in the existing land use classification method.
[0057] To facilitate the understanding of the embodiments of the present application, further explanation will be given below in conjunction with the drawings and specific embodiments. The embodiments do not constitute a limitation on the embodiments of the present application.
[0058] Figure 1 A flow chart of a land use classification method based on plot units provided in an embodiment of the present application. Figure 1 As shown, the land use classification method based on plot units provided in the embodiment of the present application may specifically include the following steps:
[0059] Step 110: Acquire a boundary vector file and remote sensing image data of the target classification area, wherein the remote sensing image data includes a multi-band remote sensing image.
[0060] Specifically, the target classification area refers to an area that needs to be classified. The target classification area may include at least one land area to be classified, such as all / part of the land area of at least one city, etc., and the embodiment of the present application does not limit this. Taking a certain city as an example, all / part of the land area of the city can be used as the target classification area. It should be noted that this embodiment does not limit the size of the target classification area and the number of classification areas.
[0061] In this embodiment, the boundary vector file is also called a plot boundary vector file. The boundary vector file can actually be used to determine the geometric shape of each plot in the target classification area. The boundary vector file can include the target classification area and the coordinates of each plot in the target classification area. This embodiment does not impose any restrictions on this.
[0062] Multi-band remote sensing images (or multi-band remote sensing images, etc.) refer to remote sensing images containing multiple spectral bands (or remote sensing images containing multiple characteristic bands). Multi-band remote sensing images can be obtained by using drones or satellites to photograph the target classification area.
[0063] In actual implementation, taking Guangx City as an example, the main urban area of Guangx City includes four districts, all of which can be used as target classification areas. They can then be photographed by drones or satellites to obtain remote sensing image data containing multiple spectral bands. Subsequently, ArcGIS road network sorting and other operations can be used to form plot boundary vector files of the four districts in the main urban area of Guangx City.
[0064] Step 120: Perform feature conversion based on the remote sensing image data to obtain multi-dimensional array data.
[0065] In this embodiment, the multi-dimensional array data may include multi-band remote sensing images and a variety of feature maps corresponding to the multi-band remote sensing images, which is not limited in this embodiment.
[0066] In a specific implementation, this embodiment can first perform feature conversion on the remote sensing image data, thereby obtaining a variety of feature maps of the multi-band remote sensing image, including but not limited to: spectral feature map and texture feature map, and then convert the multi-band remote sensing image, spectral feature map and texture feature map into multi-dimensional array data, so that the multi-dimensional array data can simultaneously express the multi-band remote sensing image and its corresponding multiple features.
[0067] Step 130 , performing geometric transformation according to the boundary vector file to obtain geometric shape data, wherein the geometric shape data includes land unit information.
[0068] Specifically, the geometric shape data can be used to represent the geometric boundary of the plot, and the plot unit information includes the vertex coordinates of the geometric shape of the plot boundary, where the vertex coordinates can be represented in the form of (x, y), which is not limited in the embodiment of the present application.
[0069] In a specific implementation, the boundary vector file can be input into the algorithm through a preset algorithm for geometric conversion, and the geometric shape and vertex coordinates of each block in the boundary vector file can be identified by the algorithm, so that the target classification area can be distinguished according to the block. Therefore, the block unit information is applied to the subsequent processing process, and the remote sensing image data can be segmented / cropped according to the block. In this way, a land use classification algorithm with the block as the basic classification unit is realized. On the basis of improving the existing classification method with the pixel as the unit, the existing random forest classification algorithm is further improved, and a new random forest land use classification algorithm with the block as the classification unit is constructed to improve the accuracy and efficiency of land use classification.
[0070] Step 140, classifying the land through a preset land classification model according to the multi-band remote sensing image, the geometric shape data and the multi-dimensional array data to obtain a land use classification result.
[0071] In this embodiment, the existing random forest model performs land use classification in units of pixels, while the land classification model in this embodiment essentially performs land use classification in units of plots. Therefore, the land classification model in this embodiment can be a classification model after algorithmically improving the existing random forest model.
[0072] In a specific implementation, this embodiment inputs multi-band remote sensing images, geometric shape data, and multi-dimensional array data into a land classification model. The land classification model can determine the plot unit based on the geometric shape data, and then import the multi-band remote sensing images and various feature maps of the multi-dimensional array data into the algorithm. The multi-band remote sensing images and various feature maps are cropped on a plot basis, and classified and identified to obtain the final land use classification result.
[0073] In actual implementation, after the input data is classified and identified by the land classification model, the classification and identification results can be further visualized to form a final land use classification map as the land use classification result. Therefore, the embodiment of the present application classifies land use based on plots of land, effectively reducing the impact of pixel noise on the accuracy and classification efficiency of land use classification, and reasonably transforming the various data of the target classification area obtained, and inputting the transformed data into the land classification model for classification and identification, thereby improving the accuracy of the land use classification model classification.
[0074] It can be seen that the embodiment of the present application obtains the boundary vector file and remote sensing image data of the target classification area, performs feature conversion based on the remote sensing image data, obtains multi-dimensional array data, performs geometric conversion according to the boundary vector file, obtains geometric shape data, and the geometric shape data includes plot unit information. According to the multi-band remote sensing image, geometric shape data and multi-dimensional array data contained in the remote sensing image data, classification is performed through a preset land classification model to obtain a land use classification result, thereby realizing land use classification with plots as the basic classification units, avoiding classification errors in which the same land is divided into different land use types, improving the refinement of land use classification, and solving the problems of low recognition and classification efficiency and insufficient accuracy in existing land use classification methods.
[0075] Reference Figure 2 , shows a schematic diagram of the steps of a land use classification method based on plot units provided by an optional embodiment of the present application. The method may specifically include the following steps:
[0076] Step 210: Acquire a boundary vector file and remote sensing image data of the target classification area, wherein the remote sensing image data includes a multi-band remote sensing image.
[0077] For the description of step 210, please refer to the above step 110, which will not be described in detail in this embodiment.
[0078] Step 220: extract features based on the remote sensing image data to obtain fused feature data, wherein the fused feature data includes spectral feature data and texture feature data.
[0079] In this embodiment, the fused feature data may include spectral feature data and texture feature data, wherein the spectral feature data may include a spectral feature map for characterizing the spectral features of the multi-band remote sensing image, and the texture feature data may include a texture feature map for characterizing the texture features of the multi-band remote sensing image. This embodiment does not impose any restrictions on this.
[0080] In actual implementation, a preset algorithm can be used to input a multi-band remote sensing image into the algorithm, calculate the spectral characteristics and texture characteristics of the remote sensing image, obtain multiple feature maps such as spectral feature maps and texture feature maps, and then obtain fused feature data.
[0081] Step 230, based on the fused feature data, combined with the multi-band remote sensing image, data conversion is performed to obtain multi-dimensional array data.
[0082] In this embodiment, the multi-band remote sensing image, the spectral feature map and the texture feature map are imported into a preset algorithm and converted into multi-dimensional array data, so that the multi-dimensional array data can be used to represent the various features of the remote sensing image. Subsequently, the multi-dimensional array data can be used to calculate all the pixels in different feature maps, that is, execute step 250.
[0083] Step 240: Perform geometric transformation according to the boundary vector file to obtain geometric shape data, wherein the geometric shape data includes land unit information.
[0084] The description of step 240 can refer to the above step 130, which will not be described in detail in this embodiment.
[0085] Step 250 , according to the land unit information, the multi-dimensional array data and the multi-band remote sensing image are processed by a preset classification algorithm to obtain a data set to be classified.
[0086] In a specific implementation, a classification algorithm can be preset, and the remote sensing image data of the target classification area and a variety of feature maps can be imported into the algorithm. The classification algorithm can process the multidimensional array data into a data set to be classified with multidimensional features in units of land plots according to the geometric shape data, wherein the data set to be classified can be in the dataframe (two-dimensional tabular data) array format.
[0087] Optionally, the above-mentioned data processing of the multidimensional array data and the multi-band remote sensing image according to the plot unit information by a preset classification algorithm to obtain a data set to be classified may specifically include the following sub-steps:
[0088] Sub-step 2501, for the multi-band remote sensing image, pixel operation is performed on the multi-dimensional array data to obtain pixel mean data, and the pixel mean data corresponds to the multi-band remote sensing image one by one.
[0089] In this embodiment, the pixel mean data can refer to the pixel average value, including the average value of all pixels corresponding to each characteristic band in the multi-band remote sensing image, so as to merge multiple pixels into one classification object, reduce the amount of calculation, and also reduce the time consumed by the final classification of the model, thereby improving the efficiency of land use classification. It can effectively reduce time consumption in both the training model and the adjustment model stage.
[0090] In the specific implementation, for multi-band remote sensing images, the average value of all pixels corresponding to each characteristic band in the multi-band remote sensing image can be calculated to obtain the pixel mean data. Specifically, the multi-dimensional array data can be cyclically operated, and the vertex coordinates in the plot unit information are used as the basis to define the vertex coordinate range of the plot. According to the vertex coordinate range of the plot, the pixel mean value of different characteristic map information corresponding to the coordinate range is calculated to obtain the pixel mean value as the pixel mean data. As a result, each plot in the target classification area corresponds to all band characteristic maps with only one pixel value, which reduces the amount of calculation.
[0091] In an optional embodiment, the embodiment of the present application performs pixel operations on the multidimensional array data for the multi-band remote sensing image to obtain pixel mean data, which may specifically include: determining characteristic pixel values of all feature maps in the multidimensional array data, and determining characteristic bands of the multi-band remote sensing image; accumulating pixels based on the characteristic pixel values to obtain the number of pixels; and for each of the characteristic bands, performing mean calculations on the number of pixels to obtain the pixel mean data.
[0092] Exemplarily, by performing a loop operation on the multidimensional array, all pixels in the different feature map information within the coordinate range of each vertex of each plot are accumulated (sum), and then the number of pixels (count) is calculated. For each characteristic band of the multi-band remote sensing image, the average number of pixels is calculated (Average = sum / count) to obtain the pixel average value.
[0093] Sub-step 2502, extracting vertex coordinates of the geometric shape of the land parcel boundary from the land parcel unit information.
[0094] Sub-step 2503, determining whether the multi-dimensional array data corresponds to a preset two-dimensional data format.
[0095] Sub-step 2504, constructing a data set to be classified according to the two-dimensional data format based on the vertex coordinates, the pixel mean data and the multi-dimensional array data.
[0096] Sub-steps 2502 to 2504 are described uniformly:
[0097] In this embodiment, the two-dimensional data format may include but is not limited to the datafrme format and the like.
[0098] In the specific implementation, a two-dimensional dataframe table can be constructed according to the dataframe format, and then the vertex coordinates of the geometric shape of the plot boundary, the pixel average values corresponding to each feature map of the multi-band remote sensing image, etc. can be added to the two-dimensional dataframe table, and the added two-dimensional dataframe table can be used as the data set to be classified.
[0099] Exemplarily, the data set to be classified may be shown in Table 1 below:
[0100]
[0101] Table 1
[0102] Step 260: classify the data set to be classified using a preset land classification model to obtain land use classification data.
[0103] Specifically, the land use classification data may include land classification data and land use data, wherein the land classification data may include but not be limited to the number of plots, the land type of each plot, the number of each land type, etc., and the land use data may include but not be limited to the land use type and quantity. Exemplarily, the land type may include but not be limited to: forest land, garden land, grassland, cultivated land, unused land, etc., which is not limited in this example; the land use data may include the land use type and quantity, such as the land use type may include but not be limited to: residential land, commercial and service land, transportation land, industrial and mining storage land, public management and service land, water bodies, etc., which is not limited in this example.
[0104] In actual implementation, before using the land classification model for classification, this embodiment may also first train the land classification model by selecting a sample area, obtaining the corresponding sample training set and test set, using the sample training set to train the model, and using the test set to test the model accuracy, thereby obtaining a trained land classification model, so that the land classification model can be used to classify land use in the target classification area.
[0105] In an optional embodiment, before the embodiment of the present application performs classification through a preset land classification model, it may further specifically include: obtaining remote sensing image samples of the sample area; performing data processing based on the remote sensing image samples to obtain a sample plot training set, wherein the sample plot training set includes classification label sample data, boundary shape sample data, and multi-dimensional feature sample data; performing pixel calculation on the sample plot training set to obtain a sample pixel mean; performing data construction based on the sample pixel mean, the classification label sample data, the boundary shape sample data, and the multi-dimensional feature sample data to obtain a sample data set with plots as units; performing model training based on the sample data set to obtain a random forest model, and using the random forest model as the land classification model.
[0106] In an optional embodiment, the embodiment of the present application performs data processing based on the remote sensing image samples to obtain a sample plot training set, which may specifically include: performing image preprocessing based on the remote sensing image samples to obtain a sample label data set, the sample label data set including multi-band remote sensing image samples and classification label sample data corresponding to the multi-band remote sensing image samples; performing feature conversion based on the multi-band remote sensing image samples to obtain multi-dimensional feature sample data; performing geometric extraction based on the classification label sample data to obtain boundary shape sample data, the boundary shape sample data including the sample plot geometric boundary corresponding to the sample area; performing cropping processing on the sample plot geometric boundary based on the multi-band remote sensing image samples and the multi-dimensional feature sample data to obtain a sample plot training set.
[0107] For example, refer to Figure 3 In this example, the implementation process of model training may include but is not limited to: ① obtaining electronic computing equipment; ② collecting remote sensing images and establishing data sets; ③ training and testing random forest models; ④ displaying the results of urban land use classification.
[0108] First, prepare relevant electronic computing equipment. For electronic computing equipment, the hardware used in this example includes but is not limited to a portable notebook, configured as: GeForceRTX3070Ti graphics card, 16-inch monitor, 1 power supply, 1 keyboard and mouse. It should be noted that this example does not impose specific restrictions on specific electronic computing equipment.
[0109] Subsequently, a land classification sample data set was produced. This example uses District A, District B, District C, and District D of Guangx City as experimental areas. The remote sensing images used are mainly derived from the 2022 Gaofen-2 remote sensing satellite images. Then, combined with the land resource status of the main urban area of Guangx City and the readability of remote sensing images, the team members manually marked the sample labels on the ArcGIS software to form 11 types of sample label files. Each type of sample label has a certain number of labels, including 55 forests, 43 gardens, 31 grasslands, 40 cultivated lands, 29 unused lands, 164 residential lands, 122 commercial and service lands, 32 transportation lands, 126 industrial and mining storage lands, 107 public management and service lands, and 81 water bodies. Subsequently, data preprocessing is performed in accordance with the technical solution, and the specific operations include: using the Python program to calculate the spectral characteristics and texture characteristics of the remote sensing image, and then importing the multi-band remote sensing image, spectral feature map and texture feature map into the algorithm to convert them into multidimensional array data; data preprocessing: reading the sample label file of the training set, extracting the geometric boundaries of the sample plots, cutting the multidimensional arrays of the remote sensing image and the feature map, and forming a sample plot training set with 11 classification labels, boundary shapes and image multidimensional feature information; calculating the average value of all pixels corresponding to the samples of each plot in each characteristic band of the sample (that is, merging multiple pixels into classification objects), looping all the sample multidimensional arrays in the above sample plot training set, accumulating (sum) all the pixels in the vertex coordinate range of each sample plot in different feature map information, and then calculating the number of pixels (count), and finally calculating the average value (Average=sum / count), and then creating a dataframe table, including: after looping and calculating the average values of the samples in each feature map information in turn, these values are overwritten with the image feature information of the sample plot training set. Set the dataframe format, that is, the columns are sample number, label paper, vertex coordinates of the plot boundary geometry, features Figure 1 Average value, characteristics Figure 2 Average value, characteristics Figure 3 The average value of the number, etc., forms the final input model training sample data set with plots as units. The specific format is shown in Table 2 below:
[0110]
[0111] Table 2
[0112] Then, according to the relevant technical solution, the random forest model is trained and tested in the PyCharm platform. The specific steps include: putting the prepared sample plot training set containing classification labels, boundary shapes and multi-dimensional feature information into the random forest model for training, and obtaining the trained random forest model as a land classification model by continuously adjusting the combination of feature maps and optimizing parameters.
[0113] Furthermore, the test set file is processed in the form of a sample data set, and finally a test set in the form of a dataframe array table without labels is formed. The test set is then input into the trained random forest model to generate predicted classification information, which is compared with the classification label to obtain the classification accuracy. When the classification accuracy meets the conditions for the completion of model training, the model training is completed to obtain the final land classification model.
[0114] Finally, through the PyCharm platform, import the plot boundary vector file of the area to be classified and convert it into geometric shape data in the algorithm (the geometric shape data here mainly refers to the sample plot information with classification labels and boundary shape vertex coordinates mentioned above). Then import the remote sensing image and various feature maps of the area into the algorithm. The algorithm cuts the data into a data set to be classified in the form of a dataframe array with multi-dimensional features based on the geometric shape data. Then put the data set to be classified into the trained random forest model, identify the final land use classification results, and visualize the results to form the final land use classification map. In this way, the model application verification is completed and the final classification results of the research scope are obtained.
[0115] Therefore, the embodiment of the present application uses multidimensional array data representing multi-band remote sensing images on the basis of plot units to calculate the pixel average of each band feature in the multi-band remote sensing image, so that the pixel average corresponds to each band feature one by one, and then constructs a dataframe table, uses the dataframe table as a sample data set for model training, and improves the algorithm from the model training stage to the subsequent practical stage based on the existing random classification forest model. It realizes the merging of multiple pixels into one classification object to reduce the time consumption of model training, model adjustment and final classification, and solves the problems of land use classification accuracy and low classification efficiency existing in the prior art.
[0116] It should be noted that the technical solution of this embodiment mainly includes two aspects: the first aspect is to provide a sample data set conversion method for improving the classification accuracy of the land use classification model; the second aspect is to provide an urban land use classification system for autonomously classifying and segmenting remote sensing images of land.
[0117] Step 270, performing visualization processing based on the land use classification data to obtain a land use classification result, wherein the land use classification result includes a land use classification map.
[0118] In the specific implementation, in order to facilitate users or developers to intuitively understand the data after land use classification, the land use classification data can be visualized through visualization tools to obtain a land use classification map as the final land use classification result. The land use classification map can intuitively display the type and land use classification of each plot in the target classification area.
[0119] In summary, the embodiment of the present application obtains a boundary vector file and remote sensing image data of a target classification area, where the remote sensing image data includes a multi-band remote sensing image, and then performs feature extraction based on the remote sensing image data to obtain fused feature data including spectral feature data and texture feature data, performs data conversion based on the fused feature data in combination with the multi-band remote sensing image to obtain multi-dimensional array data, and performs geometric conversion based on the boundary vector file to obtain geometric shape data including plot unit information, and then performs data processing on the multi-dimensional array data and the multi-band remote sensing image according to the plot unit information through a preset classification algorithm to obtain a data set to be classified, performs land classification on the data set to be classified through a preset land classification model to obtain land use classification data, and performs visualization processing based on the land use classification data to obtain a land use classification result including a land use classification map. The embodiment of the present application achieves: 1. Improving the existing classification method based on pixels into a classification method based on plots ① The classification method is based on the unit. Since the plot is taken as the basic classification unit, the classification characteristics of each plot unit divided by the road network of urban land are followed to avoid the classification error of the same land being divided into different land use types, and realize the refinement of urban land use classification; ② Multiple pixels are merged into one classification object, which reduces the amount of calculation and the time spent on model training, adjustment, and final application of the model for classification, improves the efficiency of the random forest land use classification model for land use classification, and reduces the power consumption of calculation; ③ In view of the shortcomings of the existing land use classification technology with pixels as the basic classification unit, a land use classification algorithm with plots as the basic classification unit is provided, which improves the existing random forest classification algorithm, and has improvements in model training, adjustment and the final model application stage, achieving the purpose of constructing a new type of random forest land use classification algorithm with plots as classification units, and improving the accuracy and efficiency of land use classification.
[0120] It should be noted that, for the purpose of simple description, the method embodiments are expressed as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present application are not limited to the described order of actions, because according to the embodiments of the present application, certain steps may be performed in other orders or simultaneously.
[0121] like Figure 4 As shown, the embodiment of the present application further provides a land use classification device 400 based on a plot unit, comprising:
[0122] The data acquisition module 410 is used to acquire the boundary vector file and remote sensing image data of the target classification area, wherein the remote sensing image data includes multi-band remote sensing images;
[0123] A feature conversion module 420 is used to perform feature conversion based on the remote sensing image data to obtain multi-dimensional array data;
[0124] A geometric transformation module 430 is used to perform geometric transformation according to the boundary vector file to obtain geometric shape data, wherein the geometric shape data includes land unit information;
[0125] The classification module 440 is used to perform classification based on the multi-band remote sensing image, the geometric shape data and the multi-dimensional array data through a preset land classification model to obtain a land use classification result.
[0126] Optionally, the feature conversion module 420 includes:
[0127] A feature extraction submodule is used to extract features according to the remote sensing image data to obtain fused feature data, wherein the fused feature data includes spectral feature data and texture feature data;
[0128] The data conversion submodule is used to perform data conversion based on the fused feature data in combination with the multi-band remote sensing image to obtain multi-dimensional array data.
[0129] Optionally, the classification module 440 includes:
[0130] A data processing submodule is used to process the multidimensional array data and the multi-band remote sensing image according to the plot unit information by a preset classification algorithm to obtain a data set to be classified;
[0131] The land classification submodule is used to classify the data set to be classified by using a preset land classification model to obtain land use classification data;
[0132] The visualization processing submodule is used to perform visualization processing based on the land use classification data to obtain a land use classification result, and the land use classification result includes a land use classification map.
[0133] Optionally, the data processing submodule includes:
[0134] A pixel operation unit, for performing pixel operation on the multidimensional array data for the multi-band remote sensing image to obtain pixel mean data, wherein the pixel mean data corresponds one-to-one to the multi-band remote sensing image;
[0135] An extraction unit, used to extract vertex coordinates of the geometric shape of the boundary of the land parcel from the land parcel unit information;
[0136] A two-dimensional data format determining unit, used to determine a preset two-dimensional data format corresponding to the multi-dimensional array data;
[0137] A construction unit is used to construct a data set to be classified according to the two-dimensional data format based on the vertex coordinates, the pixel mean data and the multi-dimensional array data.
[0138] Optionally, the pixel operation unit is specifically used to: determine the characteristic pixel values of all feature maps in the multidimensional array data, and determine the characteristic bands of the multi-band remote sensing image; accumulate pixels based on the characteristic pixel values to obtain the number of pixels; for each of the characteristic bands, calculate the mean of the number of pixels to obtain the pixel mean data.
[0139] Optionally, the land use classification device 400 based on plot units further includes:
[0140] A remote sensing image sample acquisition module is used to acquire remote sensing image samples of a sample area;
[0141] A preprocessing module, used for performing data processing according to the remote sensing image samples to obtain a sample plot training set, wherein the sample plot training set includes classification label sample data, boundary shape sample data and multi-dimensional feature sample data;
[0142] A pixel calculation module is used to perform pixel calculation on the sample plot training set to obtain a sample pixel mean;
[0143] A data construction module, used to construct data based on the sample pixel mean, the classification label sample data, the boundary shape sample data and the multi-dimensional feature sample data to obtain a sample data set with land plots as units;
[0144] The model training module is used to perform model training based on the sample data set to obtain a random forest model, and use the random forest model as the land classification model.
[0145] Optionally, the preprocessing module includes:
[0146] An image preprocessing submodule is used to perform image preprocessing based on the remote sensing image samples to obtain a sample label data set, wherein the sample label data set includes multi-band remote sensing image samples and classification label sample data corresponding to the multi-band remote sensing image samples;
[0147] A feature conversion submodule, used for performing feature conversion based on the multi-band remote sensing image samples to obtain multi-dimensional feature sample data;
[0148] A geometry extraction submodule, configured to perform geometry extraction based on the classification label sample data to obtain boundary shape sample data, wherein the boundary shape sample data includes a sample plot geometry boundary corresponding to the sample area;
[0149] The cropping processing submodule is used to perform cropping processing on the geometric boundaries of the sample plots based on the multi-band remote sensing image samples and the multi-dimensional feature sample data to obtain a sample plot training set.
[0150] It should be noted that the land use classification device based on plot units provided in the embodiments of the present application can execute the land use classification method based on plot units provided in any embodiment of the present application, and has the corresponding functions and beneficial effects of the execution method.
[0151] In a specific implementation, the above-mentioned land use classification device based on the plot unit can be integrated into a device, so that the device can classify the target classification area with the plot as the basic unit, obtain the land use classification result, and as an electronic device, improve the refinement and accuracy of the land use classification. The electronic device can be composed of two or more physical entities, or it can be composed of one physical entity, such as a personal computer (PC), a computer, a server, etc., and the embodiment of the present application does not make specific restrictions on this.
[0152] like Figure 5As shown, an embodiment of the present application provides an electronic device, including a processor 111, a communication interface 112, a memory 113 and a communication bus 114, wherein the processor 111, the communication interface 112, and the memory 113 communicate with each other through the communication bus 114; the memory 113 is used to store computer programs; the processor 111 is used to implement the steps of the land use classification method based on the plot unit provided by any of the above method embodiments when executing the program stored in the memory 113. Exemplarily, the steps of the land use classification method based on the plot unit may include the following steps: obtaining a boundary vector file and remote sensing image data of a target classification area, wherein the remote sensing image data includes a multi-band remote sensing image; performing feature conversion based on the remote sensing image data to obtain multi-dimensional array data; performing geometric conversion based on the boundary vector file to obtain geometric shape data, wherein the geometric shape data includes plot unit information; performing classification based on the multi-band remote sensing image, the geometric shape data and the multi-dimensional array data through a preset land classification model to obtain a land use classification result.
[0153] An embodiment of the present application also provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the land use classification method based on plot units provided in any of the aforementioned method embodiments are implemented.
[0154] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0155] The above description is only a specific implementation of the present application, so that those skilled in the art can understand or implement the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest range consistent with the principles and novel features applied for herein.
Claims
1. A land use classification method based on plot units, characterized in that: include: Acquire a boundary vector file and remote sensing image data of a target classification area, wherein the remote sensing image data includes a multi-band remote sensing image; Perform feature conversion based on the remote sensing image data to obtain multidimensional array data; Performing geometric transformation according to the boundary vector file to obtain geometric shape data, wherein the geometric shape data includes land parcel unit information; According to the multi-band remote sensing image, the geometric shape data and the multi-dimensional array data, classification is performed through a preset land classification model to obtain a land use classification result.
2. The method according to claim 1, characterized in that: The step of performing feature conversion based on the remote sensing image data to obtain multidimensional array data includes: Perform feature extraction based on the remote sensing image data to obtain fused feature data, wherein the fused feature data includes spectral feature data and texture feature data; Based on the fused feature data, data conversion is performed in combination with the multi-band remote sensing image to obtain multi-dimensional array data.
3. The method according to claim 1, characterized in that The land use classification result is obtained by performing classification based on the multi-band remote sensing image, the geometric shape data and the multi-dimensional array data through a preset land classification model, including: According to the plot unit information, the multidimensional array data and the multi-band remote sensing image are processed by a preset classification algorithm to obtain a data set to be classified; Classify the data set to be classified using a preset land classification model to obtain land use classification data; Visualization processing is performed based on the land use classification data to obtain a land use classification result, and the land use classification result includes a land use classification map.
4. The method according to claim 3, characterized in that: According to the plot unit information, the multidimensional array data and the multi-band remote sensing image are processed by a preset classification algorithm to obtain a data set to be classified, including: For the multi-band remote sensing image, pixel operation is performed on the multi-dimensional array data to obtain pixel mean data, wherein the pixel mean data corresponds one-to-one to the multi-band remote sensing image; Extracting vertex coordinates of the geometric shape of the boundary of the plot from the plot unit information; Determining that the multidimensional array data corresponds to a preset two-dimensional data format; According to the two-dimensional data format, based on the vertex coordinates, the pixel mean data and the multi-dimensional array data, a data set to be classified is constructed.
5. The method according to claim 4, characterized in that The step of performing pixel operation on the multidimensional array data to obtain pixel mean data for the multi-band remote sensing image includes: Determining characteristic pixel values of all characteristic images in the multidimensional array data, and determining characteristic bands of the multi-band remote sensing image; Accumulate pixels based on the characteristic pixel values to obtain the number of pixels; For each of the characteristic bands, the number of pixels is averaged to obtain the pixel mean data.
6. The method according to any one of claims 1 to 5, characterized in that: Before the classification is performed using the preset land classification model, the method further includes: Acquire remote sensing image samples of the sample area; Performing data processing according to the remote sensing image samples to obtain a sample plot training set, wherein the sample plot training set includes classification label sample data, boundary shape sample data, and multi-dimensional feature sample data; Perform pixel calculation on the sample plot training set to obtain a sample pixel mean; Data is constructed based on the sample pixel mean, the classification label sample data, the boundary shape sample data, and the multi-dimensional feature sample data to obtain a sample data set with land plots as units; Model training is performed based on the sample data set to obtain a random forest model, and the random forest model is used as the land classification model.
7. The method according to claim 6, characterized in that The data processing is performed based on the remote sensing image samples to obtain a sample plot training set, including: Performing image preprocessing based on the remote sensing image samples to obtain a sample label data set, wherein the sample label data set includes multi-band remote sensing image samples and classification label sample data corresponding to the multi-band remote sensing image samples; Performing feature conversion based on the multi-band remote sensing image samples to obtain multi-dimensional feature sample data; Performing geometric extraction based on the classification label sample data to obtain boundary shape sample data, wherein the boundary shape sample data includes a sample plot geometric boundary corresponding to the sample area; The geometric boundaries of the sample plots are cropped based on the multi-band remote sensing image samples and the multi-dimensional feature sample data to obtain a sample plot training set.
8. A land use classification device based on plot units, characterized in that: include: A data acquisition module, used to acquire a boundary vector file and remote sensing image data of a target classification area, wherein the remote sensing image data includes a multi-band remote sensing image; A feature conversion module, used for performing feature conversion based on the remote sensing image data to obtain multi-dimensional array data; A geometric conversion module, used for performing geometric conversion according to the boundary vector file to obtain geometric shape data, wherein the geometric shape data includes plot unit information; The classification module is used to classify the land according to the multi-band remote sensing image, the geometric shape data and the multi-dimensional array data through a preset land classification model to obtain a land use classification result.
9. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; The processor is used to implement the steps of the land use classification method based on plot units as described in any one of claims 1 to 7 when executing the program stored in the memory.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the land use classification method based on plot units as described in any one of claims 1 to 7 are implemented.