Remote sensing image road extraction method based on genetic programming and ensemble classification
Through methods based on genetic programming and ensemble classification, combined with feature construction and multi-base classifier combination, the problem of complex environments and illumination changes in road extraction from remote sensing images is solved, and road extraction effects with high accuracy and efficient processing are achieved.
Patent Information
- Application Number
- CN202410250058.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-05
- Publication Date
- 2024-09-06
AI Technical Summary
Road extraction from remote sensing images faces the difficulty of accurate detection caused by complex ground coverage, environmental changes, lighting changes and other factors. Traditional methods perform poorly in complex scenes. Deep learning methods require a large amount of computing resources and may be over-fitting, making it difficult to achieve efficient processing and Generalization ability.
Using methods based on genetic programming and ensemble classification, through feature construction and multi-base classifier combination, crossover and mutation operations are used to automatically evolve the optimal combination scheme to achieve high-accuracy road extraction.
It improves the accuracy and generalization ability of road extraction from remote sensing images, can effectively process small-scale data sets, has robustness and efficient processing capabilities, and reduces computing resource requirements.
Smart Images

Figure CN118608932A
Abstract
Description
Technical Field
[0001] The invention relates to the fields of artificial intelligence technology, remote sensing technology, image processing and computer vision, and in particular to a remote sensing image road extraction method based on genetic programming and integrated classification. Background Art
[0002] Road extraction from remote sensing images is an important task in the field of remote sensing image processing, which usually involves automatically detecting and extracting road information from images acquired by sensors such as satellites or drones. The application of road extraction is very wide, covering many aspects such as urban road planning and disaster emergency response.
[0003] There are some challenges and difficulties in extracting roads from remote sensing images. First, complex land cover and different environmental conditions make roads appear diverse and changeable in images, which increases the difficulty of accurate detection. Second, the resolution and noise level of remote sensing images affect the accuracy of road extraction, especially in large areas. In addition, factors such as lighting changes, shadow effects, and seasonal changes also increase the complexity of the algorithm. On the other hand, road extraction needs to take into account different road types, intersections, and complex urban structures, which requires the algorithm to have strong generalization capabilities. In summary, the difficulty of road extraction from remote sensing images lies in coping with complex and changeable land conditions, improving the robustness and generalization ability of the algorithm, and realizing efficient processing of large-scale data. Overcoming these difficulties will promote the continuous development of road extraction technology towards higher accuracy and wider application.
[0004] At present, traditional feature-based road extraction methods usually use features such as texture, color, and shape in images to identify roads. They have good performance in some scenarios, especially when there are obvious differences between the road and the environment. However, for complex environments and situations with large changes in lighting conditions, traditional feature-based methods may not perform well. Although deep learning-based methods can better adapt to complex scenes and lighting changes, they require a large amount of labeled training data, and the model training and inference process may require large computing resources. In addition, for small-scale data sets, overfitting problems may occur. Summary of the invention
[0005] The purpose of the present invention is to solve the above problems. A method for extracting roads from remote sensing images based on genetic programming and integrated classification is developed. The tree / model of genetic programming is used as an integrated classifier that can perform feature construction. First, more effective information is extracted from the image through feature construction, and then a high-accuracy prediction result is generated through the combination of multiple base classifiers. Through the evolutionary operations such as crossover and mutation of the genetic programming method, the optimal combination scheme of multiple base classifiers can be automatically evolved.
[0006] The technical solution adopted by the present invention is: a method for extracting roads from remote sensing images based on genetic programming and integrated classification, comprising the following steps:
[0007] S1, input the image for road extraction and perform preprocessing. The preprocessing includes two steps: sampling and feature extraction. One pixel is one sample.
[0008] S2, initialize the population, connect multiple features of the sample to form a high-dimensional feature, input the feature into the automatically constructed integrated classifier, perform classification to obtain the probability that the sample belongs to each category;
[0009] S3, updates the population using crossover, mutation and elite strategies;
[0010] S4, use the designed fitness evaluation function to evaluate the fitness value of each individual in the population, and save the excellent individuals with the highest fitness value in the population in hof;
[0011] S5, determine whether the maximum number of iterations of the population has been reached; if not, repeat S3-S4, otherwise terminate the evolution and select the best individual to test on the test set.
[0012] S6, repeat S1-S5, select the best individual obtained from the repeated experiments to classify all pixels in the image that needs road extraction, save the predicted value of each pixel, and realize road extraction through semantic segmentation.
[0013] Furthermore, the specific steps of S1 include:
[0014] S11: input the image for which road extraction is required;
[0015] S12: Based on the image for which road extraction is required, RGB features of pixels, neighborhood RGB features and gray-level co-occurrence matrix texture features are extracted one by one, wherein four pixels above, below, left and right of the sample point are taken as the neighborhood of the sample point. For the sample point at the boundary, the feature of the sample point itself is repeated as the feature of a missing pixel point, so as to ensure the consistency of feature dimensions;
[0016] S13: randomly selecting pixels according to the ratio of road to non-road of 1:1 as training set and test set, one pixel as a sample, wherein the training set contains 600 samples and the test set contains 400 samples, the training set and the test set do not contain each other, and there are no repeated sample points;
[0017] S14: Extract features of training set and test set.
[0018] Furthermore, the specific steps of S2 include:
[0019] S21: Design the program structure of the population, set the function set, terminal set and genetic programming related parameters, where the function set includes six functions for feature construction: addition, subtraction, multiplication, division, IFAND and COMB1 functions, five base classifiers including Support Vector Machine (SVM), Logistic Regression (LR), Random Forest (RF), Extremely Randomized Trees (ERF) and k-Nearest Neighbors (KNN) and the COMB function set for connecting multiple base classifiers;
[0020] S22: The features of the training set and the test set are input into the genetic programming individual as the terminal set, and the GP tree individual is generated through the input-output correspondence of each node. Each individual contains a high-dimensional feature construction module and an automatic integrated classification module;
[0021] S23: Generate an initialized population. The population size is set to 100. The individual generation method is “Ramped half-and-half”. The tree depth range is [2,10].
[0022] Furthermore, the specific steps of S3 include:
[0023] S31: input initialization population;
[0024] S32: Perform crossover, mutation, and elite strategies on the initialized population with a probability of 0.8:0.19:0.01 to update the population.
[0025] Further, the specific steps of S32 include:
[0026] S321: cross operation;
[0027] Same-type crossover of different structure trees: Use the same-type subtree crossover to generate two new individuals; the operator identifies all common internal nodes of the same type in the two parent trees and randomly selects one of the common internal nodes as the crossover point; starting from the crossover point, the subtrees are exchanged to create two new trees; the same function is assigned in two different tree representations with matching input and output types to ensure the validity of this crossover;
[0028] S322: mutation operation;
[0029] Select a node of a tree for subtree mutation, randomly generate a subtree based on the input and output of the node to replace the branch rooted at that point, and generate a new tree;
[0030] S323: Elite Strategy;
[0031] After crossover and mutation, the best performing individuals in the population are retained to ensure that these excellent solutions are not lost.
[0032] Further, the specific steps of S4 include:
[0033] S41: Input the features of the training set, use the function set of the feature construction module in the individual to construct high-dimensional features, and calculate the balanced classification accuracy based on the predicted values of the population individuals and the labels of the training set;
[0034] S42: Based on the high-dimensional features of the constructed training set, three-fold cross validation is used to calculate the predicted category of each base classifier in the integrated module for the training set samples in the individual;
[0035] S43: The prediction values of each base classifier for the sample category of the training set are integrated using the voting integration method, as follows:
[0036]
[0037] For each sample, the base classifier votes and selects the category with the most votes as the final prediction category, where is the final predicted category of the i-th sample, class j is the predicted category of the jth classifier, N is the number of base categories, 1(class j =c) is an indicator function, where c is 1, indicating that the prediction result of the j-th classifier for the i-th sample is road, and conversely, c is 0, indicating that it is non-road;
[0038] S44: Calculate the balanced classification accuracy of individuals in the population using the integrated sample category prediction value and sample label;
[0039] S45: Use the balanced classification accuracy of individuals in the population to update the fitness value of individuals in the population, and record the global optimal individual in the population. The calculation of individual fitness value is as follows:
[0040]
[0041] Where N is the total number of categories, here the value of N is 2; TP i is the number of true positive examples of the ith category, FN i is the number of false negatives for the ith class.
[0042] Furthermore, the specific steps of S5 include:
[0043] S51: Input the features extracted from S1 and the global optimal individual obtained from S4;
[0044] S52: Use the features of the training set to train the global optimal individual;
[0045] S53: Use the trained global optimal individual to construct high-dimensional features for the test set pixels based on the features extracted in S1 and perform binary classification.
[0046] Furthermore, the specific steps of S6 include:
[0047] S61: Repeat S1-S5 to select the individual with the highest prediction value in the test set in multiple experiments;
[0048] S62: Use the features of the training set to train the global optimal individual. The features extracted in S1 are used to construct high-dimensional features for the pixels in the image where road extraction is required and perform binary classification. That is, road extraction is achieved through the semantic segmentation method, and the predicted values of all pixel categories are saved.
[0049] The beneficial effects produced by the present invention are:
[0050] 1. The feature construction module is introduced to extract more features that help improve classification accuracy;
[0051] 2. It can automatically design feature-based integrated classifiers with variable feature dimensions;
[0052] 3. It has the advantages of good generalization ability, good interpretability and few adjustable parameters;
[0053] 4. A solution is given for the task of road extraction from remote sensing images supported by small sample data. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] Figure 1 is a flow chart of the method of the present invention;
[0055] Figure 2a The remote sensing data used in the experiment of the present invention is one;
[0056] Figure 2b The remote sensing data 2 used in the experiment of the present invention;
[0057] Figure 3 For the present invention Figure 2a and Figure 2b Road extraction results on . DETAILED DESCRIPTION
[0058] The present invention will be further described below in conjunction with the accompanying drawings.
[0059] like Figure 1 As shown, the present invention is a remote sensing image road extraction method based on genetic programming and integrated classification, comprising the following steps:
[0060] S1, input the image for road extraction and perform preprocessing. The preprocessing includes two steps: sampling and feature extraction. One pixel is one sample. The specific steps include:
[0061] S11: input the image for which road extraction is required;
[0062] S12: Based on the image for which road extraction is required, RGB features of pixels, neighborhood RGB features and gray-level co-occurrence matrix texture features are extracted one by one, wherein four pixels above, below, left and right of the sample point are taken as the neighborhood of the sample point. For the sample point at the boundary, the feature of the sample point itself is repeated as the feature of a missing pixel point, so as to ensure the consistency of feature dimensions;
[0063] S13: randomly selecting pixels according to the ratio of road to non-road of 1:1 as training set and test set, one pixel as a sample, wherein the training set contains 600 samples and the test set contains 400 samples, the training set and the test set do not contain each other, and there are no repeated sample points;
[0064] S14: extract features of training set and test set;
[0065] S2, initialize the population, connect multiple features of the sample to form a high-dimensional feature, input the feature into the automatically constructed integrated classifier, perform classification to obtain the probability of the sample belonging to each category; the specific steps include:
[0066] S21: Design the program structure of the population, set the function set, terminal set and genetic programming related parameters, where the function set includes six functions for feature construction: addition, subtraction, multiplication, division, IFAND and COMB1 functions, as well as five base classifiers SVM, LR, RF, ERF and KNN for ensemble classifier construction and the COMB function set for connecting multiple base classifiers;
[0067] S22: The features of the training set and the test set are input into the genetic programming individual as the terminal set, and the GP tree individual is generated through the input-output correspondence of each node. Each individual contains a high-dimensional feature construction module and an automatic integrated classification module;
[0068] S23: Generate an initial population, the population size is set to 100, the individual generation method is "Ramped half-and-half", and the tree depth range is [2,10];
[0069] S3, using crossover, mutation and elite strategies to update the population; the specific steps include:
[0070] S31: input initialization population;
[0071] S32: Perform crossover, mutation and elite strategies on the initialized population with a probability of 0.8:0.19:0.01 to update the population; the specific steps include:
[0072] S321: cross operation;
[0073] Same-type crossover of different structure trees: Use the same-type subtree crossover to generate two new individuals; the operator identifies all common internal nodes of the same type in the two parent trees and randomly selects one of the common internal nodes as the crossover point; starting from the crossover point, the subtrees are exchanged to create two new trees; the same function is assigned in two different tree representations with matching input and output types to ensure the validity of this crossover;
[0074] S322: mutation operation;
[0075] Select a node of a tree for subtree mutation, randomly generate a subtree based on the input and output of the node to replace the branch rooted at that point, and generate a new tree;
[0076] S323: Elite Strategy;
[0077] After crossover and mutation, the best performing individuals in the population are retained to ensure that these excellent solutions are not lost;
[0078] S4, using the designed fitness evaluation function to evaluate the fitness value of each individual in the population, and save the excellent individuals with the highest fitness value in the population in hof; the specific steps include:
[0079] S41: Input the features of the training set, use the function set of the feature construction module in the individual to construct high-dimensional features, and calculate the balanced classification accuracy based on the predicted values of the population individuals and the labels of the training set;
[0080] S42: Based on the high-dimensional features of the constructed training set, three-fold cross validation is used to calculate the predicted category of each base classifier in the integrated module for the training set samples in the individual;
[0081] S43: The prediction values of each base classifier for the sample category of the training set are integrated using the voting integration method, as follows:
[0082]
[0083] For each sample, the base classifier votes and selects the category with the most votes as the final prediction category, where is the final predicted category of the i-th sample, class jis the predicted category of the jth classifier, N is the number of base categories, 1(class j =c) is an indicator function, where c is 1, indicating that the prediction result of the j-th classifier for the i-th sample is road, whereas c is 0, indicating that it is non-road (background);
[0084] S44: Calculate the balanced classification accuracy of individuals in the population using the integrated sample category prediction value and sample label;
[0085] S45: Use the balanced classification accuracy of individuals in the population to update the fitness value of individuals in the population, and record the global optimal individual in the population. The calculation of individual fitness value is as follows:
[0086]
[0087] Where N is the total number of categories, here the value of N is 2; TP i is the number of true positive examples of the ith category, FN i is the number of false negatives for the ith class.
[0088] S5, determine whether the maximum number of iterations of the population has been reached; if not, repeat S3-S4, otherwise terminate the evolution and select the best individual to test on the test set; the specific steps include:
[0089] S51: Input the features extracted from S1 and the global optimal individual obtained from S4;
[0090] S52: Use the features of the training set to train the global optimal individual;
[0091] S53: Use the trained global optimal individual to construct high-dimensional features for the test set pixels based on the features extracted in S1 and perform binary classification.
[0092] S6, repeat S1-S5, select the best individual obtained from the repeated experiment to classify all the pixels in the image that needs to be extracted, save the predicted value of each pixel, and realize road extraction through semantic segmentation; the specific steps include:
[0093] S61: Repeat S1-S5 to select the individual with the highest prediction value in the test set in multiple experiments;
[0094] S62: Use the features of the training set to train the global optimal individual. The features extracted in S1 are used to construct high-dimensional features for the pixels in the image where road extraction is required and perform binary classification. That is, road extraction is achieved through the semantic segmentation method, and the predicted values of all pixel categories are saved.
[0095] In order to further illustrate the superiority of the present invention in the problem of road extraction from remote sensing images, Table 1 shows the balanced classification accuracy of the present invention method and representative traditional classifiers KNN, ERF method and feature-based deep learning method MLP on two road extraction remote sensing image data of the Deepglobe road extraction dataset, and the data is shown in Figure 2.
[0096] Table 1 shows the results of road extraction accuracy on the remote sensing image road extraction dataset, where: Figure 2a and Figure 2b There are two categories: road and non-road, and the image size is 1024×1024. Figure 2a Central Africa Road: The road is 992338:56238 (17.65:1), Figure 2b Central African roads: roads are 1009751:38825 (26.01:1). The experimental results are obtained by testing the training set with 600 pixels and the test set with 400 pixels, as well as on the entire image. The population size is set to 100, the number of generations is set to 50, and the method of the present invention and the comparative method are independently run 30 times to obtain the experimental results. Table 1 shows the maximum balanced classification accuracy of the test set. By comparison, it can be seen that the method proposed in the present invention is an effective method for road extraction from remote sensing images based on genetic programming and integrated classification. Specifically, the novel program structure, function set, terminal set, and multiple inputs enable the method to extract more high-dimensional features that are helpful for classification, and automatically generate the optimal combination of base classifiers, and the voting mechanism makes the method highly stable. Compared with the traditional KNN, ERF classifier and feature-based deep learning method MLP method, the accuracy of road extraction from remote sensing images is improved, proving its effectiveness in road extraction tasks. Figure 3 The figure shows the road extraction effect of the present invention.
[0097] In summary, the remote sensing image road extraction method based on genetic programming and integrated classification proposed in the present invention can effectively handle the remote sensing image road extraction task.
[0098] Table 1 Maximum balanced classification accuracy of the test set on the Deepglobe road extraction dataset (%)
[0099]
[0100] Although the above describes the specific implementation mode of the present invention in conjunction with the accompanying drawings, it is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art on the basis of the technical solution of the present invention without creative work are still within the scope of protection of the present invention.
Claims
1. A method for extracting roads from remote sensing images based on genetic programming and integrated classification, characterized in that: The following steps are involved: S1, input the image for road extraction and perform preprocessing. The preprocessing includes two steps: sampling and feature extraction. One pixel is one sample. S2, initialize the population, connect multiple features of the sample to form a high-dimensional feature, input the feature into the automatically constructed integrated classifier, perform classification to obtain the probability that the sample belongs to each category; S3, updates the population using crossover, mutation and elite strategies; S4, use the designed fitness evaluation function to evaluate the fitness value of each individual in the population, and save the excellent individuals with the highest fitness value in the population in hof; S5, determine whether the maximum number of iterations of the population has been reached; If not, repeat S3-S4, otherwise end the evolution and select the best individual to test on the test set. S6, repeat S1-S5, select the best individual obtained from the repeated experiments to classify all pixels in the image that needs road extraction, save the predicted value of each pixel, and realize road extraction through semantic segmentation.
2. The method for extracting roads from remote sensing images based on genetic programming and integrated classification according to claim 1, characterized in that: The specific steps of S1 include: S11: input the image for which road extraction is required; S12: Based on the image for which road extraction is required, RGB features of pixels, neighborhood RGB features and gray-level co-occurrence matrix texture features are extracted one by one, wherein four pixels above, below, left and right of the sample point are taken as the neighborhood of the sample point. For the sample point at the boundary, the feature of the sample point itself is repeated as the feature of a missing pixel point, so as to ensure the consistency of feature dimensions; S13: randomly selecting pixels according to the ratio of road to non-road of 1:1 as training set and test set, one pixel as a sample, wherein the training set contains 600 samples and the test set contains 400 samples, the training set and the test set do not contain each other, and there are no repeated sample points; S14: Extract features of training set and test set.
3. The method for extracting roads from remote sensing images based on genetic programming and integrated classification according to claim 1, characterized in that: The specific steps of S2 include: S21: Design the program structure of the population, set the function set, terminal set and genetic programming related parameters, where the function set includes six functions for feature construction: addition, subtraction, multiplication, division, IFAND and COMB1 functions, as well as five base classifiers for ensemble classifier construction: support vector machine, logistic regression, random forest, extreme random forest, k nearest neighbor, and the COMB function set for connecting multiple base classifiers; S22: The features of the training set and the test set are input into the genetic programming individual as the terminal set, and the GP tree individual is generated through the input-output correspondence of each node. Each individual contains a high-dimensional feature construction module and an automatic integrated classification module; S23: Generate an initial population. The population size is set to 100. The individual generation method is "Ramped half-and-half". The tree depth range is [2,10].
4. The method for extracting roads from remote sensing images based on genetic programming and integrated classification according to claim 1, characterized in that: The specific steps of S3 include: S31: input initialization population; S32: Perform crossover, mutation, and elite strategies on the initialized population with a probability of 0.8:0.19:0.01 to update the population.
5. The method for extracting roads from remote sensing images based on genetic programming and integrated classification according to claim 2, characterized in that: The specific steps of S32 include: S321: cross operation; Same-type crossover of different structure trees: Use the same-type subtree crossover to generate two new individuals; the operator identifies all common internal nodes of the same type in the two parent trees and randomly selects one of the common internal nodes as the crossover point; starting from the crossover point, the subtrees are exchanged to create two new trees; the same function is assigned in two different tree representations with matching input and output types to ensure the validity of this crossover; S322: mutation operation; Select a node of a tree for subtree mutation, randomly generate a subtree based on the input and output of the node to replace the branch rooted at that point, and generate a new tree; S323: Elite Strategy; After crossover and mutation, the best performing individuals in the population are retained to ensure that these excellent solutions are not lost.
6. The method for extracting roads from remote sensing images based on genetic programming and integrated classification according to claim 1, characterized in that: The specific steps of S4 include: S41: Input the features of the training set, use the function set of the feature construction module in the individual to construct high-dimensional features, and calculate the balanced classification accuracy based on the predicted values of the population individuals and the labels of the training set; S42: Based on the high-dimensional features of the constructed training set, three-fold cross validation is used to calculate the predicted category of each base classifier in the integrated module for the training set samples in the individual; S43: The prediction values of each base classifier for the sample category of the training set are integrated using the voting integration method, as follows: For each sample, the base classifier votes and selects the category with the most votes as the final prediction category, where is the final predicted category of the i-th sample, class j is the predicted category of the jth classifier, N is the number of base categories, 1(class j =c) is an indicator function, where c is 1, indicating that the prediction result of the j-th classifier for the i-th sample is road, and conversely, c is 0, indicating that it is non-road; S44: Calculate the balanced classification accuracy of individuals in the population using the integrated sample category prediction value and sample label; S45: Use the balanced classification accuracy of individuals in the population to update the fitness value of individuals in the population, and record the global optimal individual in the population. The calculation of individual fitness value is as follows: Where N is the total number of categories, here the value of N is 2; TP i is the number of true positive examples of the ith category, FN i is the number of false negatives for the ith class.
7. The method for extracting roads from remote sensing images based on genetic programming and integrated classification according to claim 1, characterized in that: The specific steps of S5 include: S51: Input the features extracted from S1 and the global optimal individual obtained from S4; S52: Use the features of the training set to train the global optimal individual; S53: Use the trained global optimal individual to construct high-dimensional features for the test set pixels based on the features extracted in S1 and perform binary classification.
8. The method for extracting roads from remote sensing images based on genetic programming and integrated classification according to claim 1, characterized in that: The specific steps of S6 include: S61: Repeat S1-S5 to select the individual with the highest prediction value in the test set in multiple experiments; S62: Use the features of the training set to train the global optimal individual. The features extracted in S1 are used to construct high-dimensional features for the pixels in the image where road extraction is required and perform binary classification. That is, road extraction is achieved through the semantic segmentation method, and the predicted values of all pixel categories are saved.
