Oil tank recognition method and device based on remote sensing image, storage medium and terminal

By using the feature classification and segmentation method of the random forest model, combined with features of color, brightness, corner points, and directional gradient histogram, the problem of poor accuracy in identifying oil tanks in remote sensing images is solved, and the segmentation accuracy and efficiency of oil tank identification are improved.

CN115601641BActive Publication Date: 2025-11-04LIAONING UNIVERSITY OF PETROLEUM AND CHEMICAL TECHNOLOGY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211159125.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-22
Publication Date
2025-11-04
Estimated Expiration
2042-09-22

AI Technical Summary

Technical Problem

Existing methods for identifying oil tanks based on remote sensing images have poor accuracy, mainly because oil tanks are large, have similar colors, and are less affected by lighting, which imposes various limitations on the segmentation model and reduces recognition efficiency.

Method used

A feature classification and segmentation method based on a random forest model is adopted. The first random forest model is used for feature classification, and the sample set is trained using color, brightness, corner points and directional gradient histogram features. The second random forest model is combined to perform feature segmentation under multi-color conditions. The segmentation accuracy is improved by nearest neighbor amplification and morphological transformation. Finally, the oil tank identification result is generated by screening and combination.

Benefits of technology

It improves the segmentation accuracy and efficiency of oil tank identification, reduces the constraints in the identification process, and achieves more efficient oil tank identification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115601641B_ABST
    Figure CN115601641B_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on remote sensing image oil tank identification method and device, storage medium, terminal, it is related to image processing technical field, main purpose is to solve the problem of poor accuracy of existing based on remote sensing image oil tank identification. Including: obtaining the oil tank remote sensing image data to be identified;Based on the first random forest model that has completed model training, the oil tank remote sensing image data is classified, and the oil tank remote sensing image data containing target color to be segmented is obtained;Under the condition that the target color is at least two colors, based on the second random forest model that has completed model training, the oil tank remote sensing image data to be segmented is segmented, and the oil tank segmentation image data corresponding to different colors is obtained;The oil tank segmentation image data is filtered and combined, and the oil tank identification result of the oil tank remote sensing image data is obtained.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of image processing, and in particular to an oil tank recognition method and device based on remote sensing images, a storage medium and a terminal. BACKGROUND

[0002] With the continuous development of remote sensing technology, the detection of specific targets has become a key research direction of remote sensing images and computer vision. Among them, oil tanks, as the most important storage containers for petroleum and petrochemical products, naturally become an important research target of remote sensing technology and computer vision.

[0003] At present, the existing oil tank remote sensing image recognition is usually based on satellite images to determine the shape segmentation of the oil tank image. However, due to the large size of the oil tank, the similar color and the light which does not have a great influence on the color of the oil tank in the image, the segmentation model is subject to many restrictions, resulting in poor segmentation accuracy and thus reducing the oil tank recognition efficiency. SUMMARY

[0004] Therefore, the present application provides an oil tank recognition method and device based on remote sensing images, a storage medium and a terminal, which mainly aims to solve the problem of poor recognition accuracy of existing oil tanks based on remote sensing images.

[0005] According to one aspect of the present application, an oil tank recognition method based on remote sensing images is provided, comprising:

[0006] Obtaining oil tank remote sensing image data to be recognized;

[0007] Performing feature classification on the oil tank remote sensing image data based on a first random forest model that has completed model training, to obtain oil tank remote sensing image data to be segmented containing a target color, wherein the first random forest model is obtained by training based on a training sample set containing color features, brightness features, corner features and histogram of oriented gradient features;

[0008] Under the condition that the target color is at least two colors, performing feature segmentation on the oil tank remote sensing image data to be segmented based on a second random forest model that has completed model training, to obtain oil tank segmentation image data corresponding to different colors, wherein the second random forest model is composed of random forest models obtained by model training of at least two color features;

[0009] Performing screening and combination on the oil tank segmentation image data to obtain an oil tank recognition result of the oil tank remote sensing image data.

[0010] Further, the screening and combination of the oil tank segmentation image data to obtain the oil tank recognition result of the oil tank remote sensing image data comprises:

[0011] The position information corresponding to the at least two color features is combined to generate an oil tank identification result of the oil tank remote sensing image data.

[0012] The position information corresponding to the at least two color features is combined to generate an oil tank identification result of the oil tank remote sensing image data.

[0013] Further, before the feature segmentation of the to-be-segmented oil tank remote sensing image data based on the second random forest model with completed model training to obtain the oil tank segmentation image data corresponding to different colors under the condition that the target color is at least two colors, the method further comprises:

[0014] The nearest neighbor value amplification processing is performed on the to-be-segmented oil tank remote sensing image data to obtain an amplified oil tank remote sensing image data, and the amplified oil tank remote sensing image data is determined as the to-be-segmented oil tank remote sensing image data.

[0015] After the feature segmentation of the to-be-segmented oil tank remote sensing image data based on the second random forest model with completed model training to obtain the oil tank segmentation image data corresponding to different colors under the condition that the target color is at least two colors, the method further comprises:

[0016] The morphological transformation is performed on the oil tank segmentation image data to obtain the oil tank segmentation image data to be screened and combined.

[0017] Further, before the feature classification of the oil tank remote sensing image data based on the first random forest model with completed model training to obtain the to-be-segmented oil tank remote sensing image data containing the target color, the method further comprises:

[0018] A first initial training sample set is obtained, and the first initial training sample set contains all oil tank remote sensing image data as first training samples;

[0019] Color features, brightness features, corner features, and histogram of oriented gradients features are extracted from the first initial training sample set, and the first training samples in the first initial training sample set are labeled with features to obtain a first training sample set;

[0020] The first random forest model is trained based on the first training sample set, so that the feature classification is performed based on the first random forest model with completed model training.

[0021] Further, before the feature segmentation of the to-be-segmented oil tank remote sensing image data based on the second random forest model with completed model training to obtain the oil tank segmentation image data corresponding to different colors under the condition that the target color is at least two colors, the method further comprises:

[0022] obtaining a second training sample set containing at least two colors of the target color, the second training sample set containing all tank remote sensing image data with different color features and as second training samples;

[0023] classifying the second training sample set based on different colors to obtain at least two sub-training sample sets, and respectively training at least two sub-random forest models based on the sub-training sample sets to obtain sub-random forest models matched with different colors and completed model training;

[0024] combining the sub-random forest models to obtain the second random forest model.

[0025] Further, the obtaining of the tank remote sensing image data to be identified includes:

[0026] obtaining tank remote sensing image data obtained by remotely sensing and photographing a tank;

[0027] cropping the tank remote sensing image data according to a preset size threshold to obtain tank remote sensing image data of a plurality of block regions, and determining the tank remote sensing image data as the tank remote sensing image data to be identified.

[0028] Further, the method further includes:

[0029] performing identification verification on the tank identification result, the identification verification being used to evaluate at least one of identification accuracy of a tank position, a tank color verification, and a tank brightness;

[0030] if the tank identification result passes the identification verification, outputting the tank identification result;

[0031] if the tank identification result does not pass the identification verification, updating the tank remote sensing image data to be identified to the first initial training sample set and / or the second training sample set, so as to retrain the first random forest model and the second random forest model.

[0032] According to another aspect of the present application, a tank identification device based on remote sensing image is provided, including:

[0033] an obtaining module, configured to obtain tank remote sensing image data to be identified;

[0034] a classification module, configured to perform feature classification on the tank remote sensing image data based on a first random forest model completed model training to obtain tank remote sensing image data to be segmented containing a target color, the first random forest model being obtained by training based on a training sample set containing color features, brightness features, corner features, and histogram of oriented gradient features;

[0035] The segmentation module is configured to perform feature segmentation on the to-be-segmented oil tank remote sensing image data based on a second random forest model that has completed model training, to obtain oil tank segmentation image data corresponding to different colors, when the target color is at least two colors, and the second random forest model is composed of random forest models obtained by model training of at least two color features.

[0036] The combination module is configured to filter and combine the oil tank segmentation image data to obtain an oil tank recognition result of the oil tank remote sensing image data.

[0037] Further, the combination module is specifically configured to perform connected domain construction on the oil tank segmentation image data corresponding to at least two color features respectively by a circular mapping method, to obtain position information of the oil tank in the oil tank segmentation image data; and combine the position information corresponding to at least two color features to generate the oil tank recognition result of the oil tank remote sensing image data.

[0038] Further, the device further comprises:

[0039] The processing module is configured to perform nearest neighbor value amplification processing on the to-be-segmented oil tank remote sensing image data to obtain amplified oil tank remote sensing image data, and determine the amplified oil tank remote sensing image data as the to-be-segmented oil tank remote sensing image data.

[0040] The transformation module is configured to perform morphological transformation on the oil tank segmentation image data to obtain the oil tank segmentation image data to be filtered and combined.

[0041] Further, the device further comprises an extraction module, a training module,

[0042] The acquisition module is further configured to acquire a first initial training sample set, and the first initial training sample set contains all oil tank remote sensing image data as first training samples.

[0043] The extraction module is configured to extract color features, brightness features, corner features, and histogram of oriented gradient features from the first initial training sample set, and perform feature labeling on the first training samples in the first initial training sample set to obtain a first training sample set.

[0044] The training module is configured to perform model training on a first random forest model based on the first training sample set, to perform feature classification based on the first random forest model that has completed model training.

[0045] Further,

[0046] The acquisition module is further configured to acquire a second training sample set containing at least two colors in the target color, and the second training sample set contains all tank remote sensing image data with different color features and as second training samples.

[0047] The training module is further configured to classify the second training sample set based on different colors, obtain at least two sub-training sample sets, and perform model training on at least two sub-random forest models based on the sub-training sample sets, to obtain sub-random forest models that have completed model training and are matched with different colors.

[0048] The combination module is further configured to combine the sub-random forest models to obtain the second random forest model.

[0049] Further, the acquisition module is specifically configured to acquire tank remote sensing image data obtained by remotely sensing a tank, crop the tank remote sensing image data according to a preset size threshold to obtain tank remote sensing image data of a plurality of block regions, and determine the tank remote sensing image data as the to-be-identified tank remote sensing image data.

[0050] Further, the device further comprises:

[0051] The verification module is configured to perform identification verification on the tank identification result, and the identification verification is used to evaluate at least one of identification accuracy of a tank position, a tank color verification, and a tank brightness.

[0052] The output module is configured to output the tank identification result if the tank identification result passes the identification verification.

[0053] The update module is configured to update the to-be-identified tank remote sensing image data to the first initial training sample set and / or the second training sample set if the tank identification result fails the identification verification, to retrain the first random forest model and the second random forest model.

[0054] According to another aspect of the present application, a storage medium is provided, and the storage medium stores at least one executable instruction, and the executable instruction causes a processor to perform operations corresponding to the above-mentioned tank identification method based on remote sensing images.

[0055] According to still another aspect of the present application, a terminal is provided, and the terminal comprises a processor, a memory, a communication interface, and a communication bus, and the processor, the memory, and the communication interface complete communication with each other through the communication bus.

[0056] The memory is configured to store at least one executable instruction, and the executable instruction causes the processor to perform operations corresponding to the above-mentioned tank identification method based on remote sensing images.

[0057] By means of the technical solutions described above, the technical solutions provided by the embodiments of the present application have at least the following advantages:

[0058] The present application provides an oil tank recognition method and device based on remote sensing images, a storage medium and a terminal. Compared with the prior art, the embodiments of the present application obtain remote sensing image data of an oil tank to be recognized; perform feature classification on the remote sensing image data of the oil tank based on a first random forest model that has completed model training, to obtain remote sensing image data of an oil tank to be segmented containing a target color, the first random forest model being obtained by training based on a training sample set containing color features, brightness features, corner features and histogram of oriented gradients features; under the condition that the target color is at least two colors, perform feature segmentation on the remote sensing image data of the oil tank to be segmented based on a second random forest model that has completed model training, to obtain oil tank segmentation image data corresponding to different colors, the second random forest model being composed of random forest models obtained by model training of at least two color features; and perform screening and combination on the oil tank segmentation image data, to obtain an oil tank recognition result of the remote sensing image data of the oil tank, so as to realize color feature segmentation in a combination mode of multiple single sub-random forest models, to recognize the color of the oil tank, reduce the limitation condition, greatly improve the segmentation accuracy, and thus improve the oil tank recognition efficiency.

[0059] The above description is only a summary of the technical solutions of the present application. In order to enable one skilled in the art to better understand the technical means of the present application, the content of the specification can be implemented, and in order to enable the above and other purposes, features and advantages of the present application to be more apparent and easy to understand, the following specific embodiments of the present application are described. BRIEF DESCRIPTION OF DRAWINGS

[0060] Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The accompanying drawings are included to provide a description of the preferred embodiments and are not meant to limit the present application. Moreover, the same reference numerals in the attached drawings indicate the same or similar components. In the drawings:

[0061] Figure 1 A flowchart of an oil tank recognition method based on remote sensing images provided by an embodiment of the present application is shown;

[0062] Figure 2 A flowchart of an oil tank segmentation method provided by an embodiment of the present application is shown;

[0063] Figure 3 A block diagram of an oil tank recognition device based on remote sensing images provided by an embodiment of the present application is shown;

[0064] Figure 4A structure schematic diagram of a terminal provided by an embodiment of the present application is shown. DETAILED DESCRIPTION

[0065] Exemplary embodiments of the present disclosure will be described in greater detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided so that the present disclosure can be more thoroughly understood and so that the scope of the present disclosure can be conveyed to those skilled in the art.

[0066] For oil tank remote sensing image recognition, shape segmentation of oil tank images is generally based on satellite images, but due to the large size of the oil tank, the similar color and the light that does not have too much influence on the color of the oil tank in the image, the segmentation model is subject to many restrictions, resulting in poor segmentation accuracy and thus reducing the oil tank recognition efficiency. An embodiment of the present application provides an oil tank recognition method based on remote sensing images, as shown in Figure 1 The method comprises the following steps.

[0067] 101. Obtain oil tank remote sensing image data to be recognized.

[0068] In the oil tank recognition process, the current execution end can be a service end for processing the collected oil tank remote sensing image data, including but not limited to a terminal service end or a cloud service end. The current execution end communicates with the remote sensing image acquisition device to obtain all the oil tank remote sensing image data collected by the remote sensing image acquisition device to perform step 102.

[0069] It should be noted that the oil tank in the embodiment of the present application includes but is not limited to any color and shape of oil tank device, and can contain liquid or gaseous substances, such as gasoline and ethanol. In specific practical applications, different colors of oil tanks contain different substances, for example, white oil tanks contain light oil products such as gasoline and ethanol, yellow oil tanks contain heavy oil, butter and tar, green oil tanks contain fire-fighting water, and red oil tanks contain fire-fighting foam, etc. Therefore, based on the recognition of the color of the oil tank, the recognition of the substance and other application scenarios are not limited in the embodiment of the present application.

[0070] 102. Perform feature classification on the oil tank remote sensing image data based on the first random forest model that has completed model training, to obtain oil tank remote sensing image data containing target color to be segmented.

[0071] In the embodiment of the present application, in order to preliminarily find the oil tank object from the oil tank remote sensing image, so as to exclude the non-oil tank part in the image data, first, the first random forest model based on the completed model training is used to classify the features of the oil tank remote sensing image data, and the oil tank remote sensing image data to be segmented is obtained. At this time, as the target color containing the oil tank feature in the oil tank remote sensing image data to be segmented, the feature segmentation can be further performed based on the oil tank remote sensing image data to be segmented, and the finally recognized oil tank image is obtained. The first random forest model is obtained by training based on the training sample set containing the color feature, the brightness feature, the corner point feature and the histogram of oriented gradient feature. At this time, the sample image in which the color feature, the brightness feature, the corner point feature and the histogram of oriented gradient feature are extracted and labeled is contained in the training sample set, so as to train the random forest model based on the training sample set.

[0072] It should be noted that in the embodiment of the present application, the random forest model is a classifier for training and predicting samples by using multiple trees, wherein the number of features is randomly selected, the training data is randomly selected, and the most frequently predicted label is taken as the final prediction label for the same prediction data, so as to complete the label classification.

[0073] 103. Under the condition that the target color is at least two colors, the second random forest model based on the completed model training is used to perform feature segmentation on the oil tank remote sensing image data to be segmented, and the oil tank segmentation image data corresponding to different colors is obtained.

[0074] In the embodiment of the present application, in order to distinguish and recognize the oil tank with multiple colors, if the target color is at least two colors, it indicates that the oil tank to be recognized in the image is composed of at least two colors. Therefore, the second random forest model based on the completed model training is further used to perform feature segmentation on the oil tank remote sensing image data to be segmented, and the final oil tank segmentation image is obtained. The second random forest model is composed of random forest models obtained by model training of at least two color features. That is, if there are several target colors, the corresponding several random forest models are used for model training, and then the feature recognition results of the multiple random forest models are combined. At this time, each target color corresponds to a training sample set, so as to train the random forest model by using the training sample set corresponding to each target color. The model parameters and the model structure in the random forest models corresponding to different target colors can be the same or different, which is not limited in the embodiment of the present application.

[0075] 104. The oil tank segmentation image data is screened and combined, and the oil tank recognition result of the oil tank remote sensing image data is obtained.

[0076] In the embodiment of the present application, since the second random forest model is composed of random forest models obtained by model training of at least two color features, in order to obtain an accurate oil tank recognition result, after obtaining a plurality of oil tank segmentation image data in the second random forest model, the oil tank segmentation image data is screened and combined to obtain the final oil tank recognition result.

[0077] It should be noted that in the embodiment of the present application, the preferred target color can be three, and after segmentation by the second random forest model obtained by combining three separate sub-random forest models, three oil tank segmentation image data are obtained, and then the three oil tank segmentation image data are screened and combined to obtain the oil tank recognition result.

[0078] In another embodiment of the present application, in order to further illustrate and limit, the step of screening and combining the oil tank segmentation image data to obtain the oil tank recognition result of the oil tank remote sensing image data comprises:

[0079] The oil tank segmentation image data corresponding to the at least two color features are respectively connected domain constructed by a circular mapping method to obtain position information of the oil tank in the oil tank segmentation image data;

[0080] The position information corresponding to the at least two color features is combined to generate the oil tank recognition result of the oil tank remote sensing image data.

[0081] In order to reduce the isolated points and burrs of the random forest model prediction segmentation, reduce the interference of white noise and discrete points, and make the segmented oil tank shape more complete, the screening in the embodiment of the present application is connected domain construction screening, that is, after determining the color features of the target color, the radii of the connected domain areas corresponding to each color in the segmentation image data are obtained, then the connected domain radius range is determined according to the size of the oil tank in the segmentation image data, and the position information of the oil tank is determined by drawing a circle according to the radius to complete the construction of the connected domain. After determining the position information corresponding to the at least two color features, the position information obtained by combining the segmentation results of the three groups of random forest models is merged in a combination manner, so that the oil tank recognition result is more complete. Since the oil tank segmentation image data is obtained by model segmentation and recognition as input parameters of the three groups of random forest models, when combining, the position information corresponding to the image data with the color features of the oil tank can be directly superimposed and combined, so that the superimposed image data is used as the oil tank recognition result.

[0082] In another embodiment of the present application, in order to further illustrate and limit, before the step of performing feature segmentation on the to-be-segmented oil tank remote sensing image data based on the second random forest model which has completed model training to obtain oil tank segmentation image data corresponding to different colors under the condition that the target color is at least two colors, the method further comprises:

[0083] The nearest neighbor value magnification processing is performed on the to-be-segmented tank remote sensing image data to obtain magnified tank remote sensing image data, and the magnified tank remote sensing image data is determined as the to-be-segmented tank remote sensing image data.

[0084] After the to-be-segmented tank remote sensing image data is segmented based on the second random forest model trained by the model to obtain the tank segmentation image data corresponding to different colors under the condition that the target color is at least two colors, the method further comprises:

[0085] The morphological transformation is performed on the tank segmentation image data to obtain the tank segmentation image data to be screened and combined.

[0086] In order to segment the to-be-segmented tank remote sensing image data based on the second random forest model obtained by combining a plurality of sub-random forest models, before the feature segmentation, the to-be-segmented tank remote sensing image data is magnified by using the nearest neighbor value method to improve the segmentation accuracy of small targets. In the nearest neighbor value method, each output value is the gray value of the input pixel closest to the point, so that the image data can be magnified by copying the pixels. Specifically, the coordinate transformation calculation formula of the nearest neighbor value method is as follows: X src =X dst *(width src / width dst );Y src =Y dst *(Heidth src / Heidth dst ). Wherein, X dst and Y dst are the horizontal and vertical coordinates of a pixel in the to-be-segmented remote sensing image data, Width dst and Heidth dst are the length and width of the to-be-segmented remote sensing image data; Width src and Heidth src are the width and height of the original image data; X scr and Y scr are the to-be-segmented remote sensing image data at the point (X dst and Y dstcorresponding original image data. At this time, the process of copying pixels by the nearest neighbor method also enlarges the feature information of the small target by several times, and the increase of feature information directly improves the recognition rate and segmentation rate of the random forest model for the oil tank, making the detection and segmentation of the small target by the random forest model become easier, and the nearest neighbor method is simple and does not make the model more complex, and is more suitable for use in the identification process of small targets in remote sensing image data.

[0087] In addition, since there may be some misclassified elements in the oil tank identification result, in order to remove these elements and improve the identification accuracy, morphological transformation is added to the random forest model. Among them, morphological transformation is a simple operation based on image shape, including erosion and dilation, which are two basic morphological operators. Erosion is used to remove small white noise, and dilation is opposite to erosion and is used to increase the size of the foreground object, thereby increasing the elements of the target region to expand the source image. In the embodiment of the present application, the morphological transformation added to the random forest model is opening operation, that is, after erosion by opening operation, advanced morphological transformation of dilation is performed. The opening operation can remove isolated small points and burrs without changing the position and shape of the oil tank in the identification result, thereby improving the identification accuracy.

[0088] In another embodiment of the present application, in order to further illustrate and limit, before the step of classifying features based on the first random forest model which has completed model training to obtain the oil tank remote sensing image data containing target color to be segmented, the method further comprises:

[0089] Obtaining a first initial training sample set;

[0090] Extracting color features, brightness features, corner features and direction gradient histogram features from the first initial training sample set, and marking features of the first training sample in the first initial training sample set to obtain a first training sample set;

[0091] Model training of the first random forest model based on the first training sample set, so as to classify features based on the first random forest model which has completed model training.

[0092] In the embodiment of the present application, in order to classify the features of the oil tank remote sensing image data based on the first random forest model, so as to accurately extract the image data containing the features of the oil tank, the random forest model needs to be trained based on the color features, brightness features, corner features and histogram of oriented gradient features before the feature classification. Specifically, the first initial training sample set contains all the oil tank remote sensing image data as the first training sample, and all the features as the training label are extracted from the first initial training sample set, that is, the color features, brightness features, corner features and histogram of oriented gradient features are extracted. Among them, the color features, brightness features, corner features and histogram of oriented gradient features are extracted from the first initial training sample set, and the first training sample in the first initial training sample set is labeled with features to obtain the first training sample set. The feature extraction and labeling can be performed manually or based on a feature extraction model, which is not limited in the embodiment of the present application.

[0093] It should be noted that when the training data in the first training sample set is used to train the random forest model, since the essence of the random forest belongs to the ensemble learning method in machine learning, the basic unit of the algorithm is the decision tree, which collects multiple decision trees together through the idea of ensemble learning. Each decision tree can be judged and classified, and finally the most classification is taken as the random forest decision result. Therefore, two aspects need to be explained when training the random forest model: first, when training each tree, N sets of data sets are randomly selected from all training samples N for training; second, at each tree node, a subset of all features is randomly selected to calculate the best classification method. After the training of the random forest model is completed, the image features of the oil tank remote sensing image data are input into the model to classify the image data.

[0094] In another embodiment of the present application, in order to further illustrate and limit, before the step of performing feature segmentation on the to-be-segmented oil tank remote sensing image data based on the second random forest model which has completed model training to obtain the oil tank segmented image data corresponding to different colors, the method further comprises:

[0095] Obtaining a second training sample set containing at least two colors of the target color;

[0096] Classifying the second training sample set based on different colors to obtain at least two sub-training sample sets, and performing model training on at least two sub-random forest models based on the sub-training sample sets to obtain the sub-random forest models which have completed model training and match different colors;

[0097] Combining the sub-random forest models to obtain the second random forest model.

[0098] In a specific implementation scenario, since most of the oil tanks are silver-white, the color of the oil tank changes due to the influence of light during remote sensing shooting. Some oil tanks change from silver-white to dark gray. In addition to being affected by light, the colors of oil tanks for different purposes are also different. The sample data selected by the random forest model has randomness. Therefore, in order to improve the segmentation accuracy and improve the recognition efficiency of the random forest model for the oil tank, the sample image data in the second training sample set is divided into at least two categories, preferably three categories, such as silver-white, dark gray and other colors. Then, the sample features are extracted and three sub-random forest models are trained to obtain the trained sub-random forest models matched with different colors, as shown in FIG. 8. Among them, the second training sample set contains all the oil tank remote sensing image data with different color features as the second training samples. When training each sub-random forest model based on the second training sample, different color features correspond to respective sub-random forest models. The model parameters of the sub-random forest model to be trained can be configured in advance, which is not limited in the embodiments of the present application. Figure 2

[0099] In another embodiment of the present application, in order to further illustrate and limit, the step of obtaining the oil tank remote sensing image data to be identified includes:

[0100] Obtaining the oil tank remote sensing image data obtained by remote sensing shooting of the oil tank;

[0101] Cropping the oil tank remote sensing image data according to a preset size threshold to obtain a plurality of block region oil tank remote sensing image data, and determining the oil tank remote sensing image data to be identified.

[0102] Since the oil tank remote sensing image data to be identified is obtained by remote sensing equipment, in order to efficiently and accurately identify the oil tank remote sensing image data, the oil tank remote sensing image data is preprocessed. Specifically, first, the oil tank remote sensing image data obtained by remote sensing shooting is obtained, and then the oil tank remote sensing image data is cropped, that is, the oil tank remote sensing image data is cropped according to a preset size threshold to obtain a plurality of block region oil tank remote sensing image data. The preset size threshold can be a preconfigured pixel size threshold, such as 300*300 pixels. Therefore, after cropping, the oil tank remote sensing image data is in the form of a block region as the oil tank remote sensing image data to be identified. After cropping the image data into small size images, the operation speed of the random forest model can be accelerated, unnecessary operations for oil tank segmentation are reduced, the feature extraction speed is accelerated, and the efficiency of the random forest model for oil tank extraction is improved.

[0103] In another embodiment of the present application, in order to further illustrate and limit, the step further includes:

[0104] Identifying and verifying the oil tank identification result;​

[0105] If the oil tank identification result passes the identification verification, the oil tank identification result is output.

[0106] If the oil tank identification result does not pass the identification verification, the remote sensing image data of the oil tank to be identified is updated to the first initial training sample set and / or the second training sample set, so as to retrain the first random forest model and the second random forest model.

[0107] In order to meet the identification needs of the oil tank, after obtaining the oil tank identification result, the oil tank identification result is subjected to identification verification to determine whether the identification result has high evaluation, so as to be put into use. The identification verification is used to evaluate the identification accuracy of at least one of the oil tank position, the oil tank color verification, and the oil tank brightness. At this time, if the identification verification is passed, the oil tank identification result is output. If the identification verification is not passed, the remote sensing image data of the oil tank to be identified is updated to the first initial training sample set or the second training sample set, so as to train the first random forest model and the second random forest model based on the remote sensing image data of the oil tank to be identified which does not pass the identification verification, and improve the identification accuracy of the model.

[0108] It should be noted that for the identification verification of the oil tank position, specifically, the oil tank region can be drawn based on the color region in the oil tank identification result, and compared with the oil tank map collected in advance. If the overlapping part between the drawn oil tank region and the oil tank map after comparison is greater than a preset threshold, it is determined that the oil tank position passes the identification verification. If it is less than or equal to the preset threshold, it does not pass the identification verification. For the oil tank color verification, specifically, the color features in the oil tank identification result can be compared with the pre-configured color content. If the color difference value is less than a preset difference range, the oil tank color verification is passed. If the color difference value is greater than the preset difference range, the oil tank color verification is not passed. For the identification verification of the oil tank brightness, specifically, the color brightness obtained from the oil tank identification result can be compared with the brightness threshold of the remote sensing image shooting. If the comparison result is less than the brightness error, the identification verification of the oil tank brightness is not passed. If the comparison result is greater than or equal to the brightness error, the identification verification of the oil tank brightness is passed.

[0109] The embodiment of the present application provides a kind of based on remote sensing image's oil tank identification method, compared with prior art, the embodiment of the present application is by obtaining the remote sensing image data of oil tank to be identified;The first random forest model based on the model training that has been completed is carried out feature classification to the remote sensing image data of oil tank, and the remote sensing image data of oil tank to be segmented containing target color is obtained, and the first random forest model is obtained by training based on the training sample set containing color feature, brightness feature, corner point feature, histogram of oriented gradient feature;Under the condition that the target color is at least two colors, the second random forest model based on the model training that has been completed is carried out feature segmentation to the remote sensing image data of oil tank to be segmented, and the oil tank segmentation image data corresponding to different colors is obtained, and the second random forest model is composed of random forest model obtained by model training of at least two color features;The oil tank segmentation image data is filtered and combined, and the oil tank identification result of the remote sensing image data of oil tank is obtained, realizes color feature segmentation in the form of multiple single sub-random forest model combination, to identify the color of oil tank, reduces the restriction condition, greatly improves the segmentation accuracy, to improve the efficiency of oil tank identification.

[0110] Further, as to the above Figure 1 The embodiment of the present application provides an oil tank identification device based on remote sensing image, as shown in the figure, the device comprises: Figure 3

[0111] The acquisition module 21 is used for acquiring the remote sensing image data of oil tank to be identified;

[0112] The classification module 22 is used for carrying out feature classification to the remote sensing image data of oil tank based on the first random forest model that has been completed model training, and the remote sensing image data of oil tank to be segmented containing target color is obtained, and the first random forest model is obtained by training based on the training sample set containing color feature, brightness feature, corner point feature, histogram of oriented gradient feature;

[0113] The segmentation module 23 is used for carrying out feature segmentation to the remote sensing image data of oil tank to be segmented based on the second random forest model that has been completed model training under the condition that the target color is at least two colors, and the oil tank segmentation image data corresponding to different colors is obtained, and the second random forest model is composed of random forest model obtained by model training of at least two color features;

[0114] The combination module 24 is used for filtering and combining the oil tank segmentation image data, and the oil tank identification result of the remote sensing image data of oil tank is obtained.

[0115] ​Further, the combination module is specifically configured to respectively perform connected domain construction on the tank segmentation image data corresponding to at least two color features by a circular mapping method to obtain position information of the tank in the tank segmentation image data; and combine the position information corresponding to the at least two color features to generate a tank recognition result of the tank remote sensing image data.

[0116] Further, the device further comprises:

[0117] The processing module is configured to perform nearest neighbor value amplification processing on the to-be-segmented tank remote sensing image data to obtain amplified tank remote sensing image data, and determine the amplified tank remote sensing image data as the to-be-segmented tank remote sensing image data.

[0118] The transformation module is configured to perform morphological transformation on the tank segmentation image data to obtain the tank segmentation image data to be screened and combined.

[0119] Further, the device further comprises an extraction module and a training module.

[0120] The acquisition module is further configured to acquire a first initial training sample set, and the first initial training sample set contains all tank remote sensing image data as first training samples.

[0121] The extraction module is configured to extract color features, brightness features, corner point features, and histogram of oriented gradient features from the first initial training sample set, and perform feature labeling on the first training samples in the first initial training sample set to obtain a first training sample set.

[0122] The training module is configured to perform model training on a first random forest model based on the first training sample set, and perform feature classification based on the first random forest model after the model training is completed.

[0123] Further,

[0124] The acquisition module is further configured to acquire a second training sample set containing at least two colors in the target color, and the second training sample set contains all tank remote sensing image data with different color features as second training samples.

[0125] The training module is further configured to classify the second training sample set based on different colors to obtain at least two sub-training sample sets, and perform model training on at least two sub-random forest models based on the sub-training sample sets to obtain sub-random forest models after the model training is completed and matched with different colors.

[0126] The combination module is further configured to combine the sub-random forest models to obtain the second random forest model.

[0127] Further, the acquisition module is specifically configured to acquire tank remote sensing image data obtained by remotely photographing a tank, crop the tank remote sensing image data according to a preset size threshold, obtain tank remote sensing image data of a plurality of block regions, and determine the tank remote sensing image data as the to-be-identified tank remote sensing image data.

[0128] Further, the device further comprises:

[0129] The verification module is configured to perform identification verification on the tank identification result, and the identification verification is used to evaluate the identification accuracy of at least one of the tank position, the tank color, and the tank brightness.

[0130] The output module is configured to output the tank identification result if the tank identification result passes the identification verification.

[0131] The update module is configured to update the to-be-identified tank remote sensing image data to the first initial training sample set and / or the second training sample set if the tank identification result fails the identification verification, so as to retrain the first random forest model and the second random forest model.

[0132] The embodiment of the present application provides a tank identification device based on remote sensing image, compared with the prior art, the embodiment of the present application acquires to-be-identified tank remote sensing image data, classifies features of the tank remote sensing image data based on a first random forest model which has completed model training, obtains to-be-segmented tank remote sensing image data containing target colors, the first random forest model is obtained by training a training sample set containing color features, brightness features, corner features and histogram of oriented gradient features, under the condition that the target colors are at least two colors, features of the to-be-segmented tank remote sensing image data are segmented based on a second random forest model which has completed model training, and tank segmentation image data corresponding to different colors is obtained, the second random forest model is composed of random forest models obtained by model training of at least two color features, the tank segmentation image data is filtered and combined, and tank identification result of the tank remote sensing image data is obtained, color feature segmentation is performed in a plurality of single sub-random forest model combination mode, tank color is identified, the limitation condition is reduced, the segmentation accuracy is greatly improved, and the tank identification efficiency is improved.

[0133] According to an embodiment of the present application, a storage medium is provided, the storage medium stores at least one executable instruction, and the computer executable instruction can execute the tank identification method based on remote sensing image in any method embodiment.

[0134] Figure 4A structure diagram of a terminal according to an embodiment of the present application is shown, and embodiments of the present application do not limit the specific implementation of the terminal.

[0135] As shown in Figure 4 The terminal can include a processor 302, a communications interface 304, a memory 306, and a communications bus 308.

[0136] The processor 302, the communications interface 304, and the memory 306 can communicate with each other through the communications bus 308.

[0137] The communications interface 304 is configured to communicate with network elements such as clients or other servers.

[0138] The processor 302 is configured to execute a program 310, and can execute the related steps in the above-mentioned oil tank identification method based on remote sensing images.

[0139] Specifically, the program 310 can include program code including computer operation instructions.

[0140] The processor 302 can be a central processing unit (CPU) or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present application. The one or more processors included in the terminal can be the same type of processor, such as one or more CPUs; or can be different types of processors, such as one or more CPUs and one or more ASICs.

[0141] The memory 306 is configured to store the program 310. The memory 306 can include a high-speed RAM memory, and can also include a non-volatile memory such as at least one disk memory.

[0142] The program 310 can be specifically used to cause the processor 302 to perform the following operations:

[0143] Obtain remote sensing image data of an oil tank to be identified;

[0144] Classify features of the remote sensing image data of the oil tank based on a first random forest model that has completed model training, to obtain remote sensing image data of an oil tank to be segmented containing a target color, the first random forest model being obtained by training based on a training sample set containing color features, brightness features, corner features, and histogram of oriented gradients features;

[0145] In the case that the target color is at least two colors, feature segmentation is performed on the to-be-segmented oil tank remote sensing image data based on a second random forest model trained by a completed model, to obtain oil tank segmentation image data corresponding to different colors, the second random forest model being composed of random forest models obtained by model training of at least two color features;

[0146] The oil tank segmentation image data is filtered and combined to obtain an oil tank recognition result of the oil tank remote sensing image data.

[0147] Obviously, those skilled in the art should understand that the modules or steps of the present application described above can be realized by general computing devices, which can be concentrated on a single computing device or distributed on a network composed of multiple computing devices, and optionally, they can be realized by program codes executable by the computing devices, so that they can be stored in storage devices and executed by the computing devices, and in some cases, the steps shown or described can be executed in different orders, or they can be manufactured into individual integrated circuit modules, or multiple modules or steps can be manufactured into a single integrated circuit module. Thus, the present application is not limited to any specific combination of hardware and software.

[0148] The above only describes the preferred embodiments of the present application and is not intended to limit the present application. Those skilled in the art can make various modifications and changes to the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A method for identifying oil tanks based on remote sensing images, characterized in that, include: Acquire remote sensing image data of the oil tank to be identified; Based on the first random forest model that has completed model training, the remote sensing image data of the oil tank is classified by feature classification to obtain remote sensing image data of the oil tank containing the target color. The first random forest model is trained on a training sample set that includes color features, brightness features, corner features, and orientation gradient histogram features. Given that the target color is at least two colors, the remote sensing image data of the oil tank to be segmented is segmented based on the second random forest model that has been trained, so as to obtain segmented image data of oil tanks corresponding to different colors. The second random forest model is composed of random forest models obtained by training at least two color features respectively. The segmented image data of the oil tank is filtered and combined to obtain the oil tank identification result of the remote sensing image data of the oil tank. The step of filtering and combining the segmented image data of the oil tank to obtain the oil tank identification result of the remote sensing image data of the oil tank includes: By constructing connected components for the segmented image data of the oil tank corresponding to at least two color features using a circular mapping method, the location information of the oil tank in the segmented image data of the oil tank can be obtained. The location information corresponding to at least two color features is combined to generate the oil tank identification result of the remote sensing image data of the oil tank; Before the second random forest model, which has already been trained, performs feature segmentation on the remote sensing image data of the oil tank to be segmented, to obtain segmented image data of oil tanks corresponding to different colors, the method further includes: Obtain a second training sample set containing at least two of the target colors. The second training sample set contains all remote sensing image data of oil tanks with different color features as the second training samples. The second training sample set is classified based on different colors to obtain at least two sub-training sample sets. At least two sub-random forest models are trained based on the sub-training sample sets to obtain sub-random forest models that are matched with different colors and have completed model training. The sub-random forest models are combined to obtain the second random forest model.

2. The method according to claim 1, characterized in that, Before performing feature segmentation on the remote sensing image data of the oil tank to be segmented based on a second random forest model that has completed model training, under the condition that the target color is at least two colors, to obtain segmented image data of oil tanks corresponding to different colors, the method further includes: The remote sensing image data of the oil tank to be segmented is subjected to nearest neighbor value amplification processing to obtain amplified remote sensing image data of the oil tank, and the amplified remote sensing image data of the oil tank is determined as the remote sensing image data of the oil tank to be segmented. The method further includes, after performing feature segmentation on the remote sensing image data of the oil tank to be segmented based on a second random forest model that has completed model training, under the condition that the target color is at least two colors, to obtain segmented image data of oil tanks corresponding to different colors: Morphological transformation is performed on the segmented image data of the oil tank to obtain the segmented image data of the oil tank to be screened and combined.

3. The method according to claim 1, characterized in that, Before performing feature classification on the remote sensing image data of the oil tank based on the first random forest model that has completed model training, to obtain the remote sensing image data of the oil tank to be segmented containing the target color, the method further includes: Obtain a first initial training sample set, which contains all remote sensing image data of oil tanks as the first training samples; Color features, brightness features, corner features, and orientation gradient histogram features are extracted from the first initial training sample set, and the first training samples in the first initial training sample set are labeled with features to obtain the first training sample set. The first random forest model is trained based on the first training sample set, and feature classification is performed based on the first random forest model after the model training is completed.

4. The method according to claim 1, characterized in that, The acquisition of remote sensing image data of the oil tank to be identified includes: Acquire remote sensing image data of oil tanks obtained from remote sensing photography; The remote sensing image data of the oil tank is cropped according to a preset size threshold to obtain remote sensing image data of the oil tank in multiple block areas, and these block areas are identified as remote sensing image data of the oil tank to be identified.

5. The method according to any one of claims 1-4, characterized in that, The method further includes: The oil tank identification results are verified, and the verification is used to evaluate the accuracy of at least one of the following: oil tank location, oil tank color verification, and oil tank brightness. If the oil tank identification result passes the identification verification, then the oil tank identification result is output; If the oil tank identification result fails the identification verification, the remote sensing image data of the oil tank to be identified is updated to the first initial training sample set and / or the second training sample set, so as to retrain the first random forest model and the second random forest model.

6. A tank identification device based on remote sensing images, characterized in that, include: The acquisition module is used to acquire remote sensing image data of the oil tank to be identified; The classification module is used to perform feature classification on the remote sensing image data of the oil tank based on the first random forest model that has been trained, so as to obtain remote sensing image data of the oil tank to be segmented containing the target color. The first random forest model is trained based on a training sample set containing color features, brightness features, corner features, and orientation gradient histogram features. The segmentation module is used to perform feature segmentation on the remote sensing image data of the oil tank to be segmented based on a second random forest model that has been trained, under the condition that the target color is at least two colors, to obtain segmented image data of the oil tank corresponding to different colors. The second random forest model is composed of random forest models obtained by training at least two color features respectively. The combination module is used to filter and combine the segmented image data of the oil tank to obtain the oil tank identification result of the remote sensing image data of the oil tank; The combination module is specifically used to construct connected components for the oil tank segmentation image data corresponding to at least two color features using a circular mapping method to obtain the location information of the oil tank in the oil tank segmentation image data; and to combine the location information corresponding to at least two color features to generate the oil tank identification result of the oil tank remote sensing image data. The acquisition module is further configured to acquire a second training sample set containing at least two colors from the target colors. The second training sample set contains all remote sensing image data of oil tanks with different color features as second training samples. The training module is also used to classify the second training sample set based on different colors to obtain at least two sub-training sample sets, and to train at least two sub-random forest models based on the sub-training sample sets to obtain sub-random forest models that have completed model training and are matched with different colors. The combination module is also used to combine the sub-random forest models to obtain the second random forest model.

7. A storage medium storing at least one executable instruction that causes a processor to perform an operation corresponding to the oil tank identification method based on remote sensing images as described in any one of claims 1-5.

8. A terminal, comprising: The processor, memory, communication interface, and communication bus are provided, wherein the processor, memory, and communication interface communicate with each other via the communication bus. The memory is used to store at least one executable instruction, which causes the processor to perform the operation corresponding to the oil tank identification method based on remote sensing images as described in any one of claims 1-5.

Citation Information

Patent Citations

  • A Multi-source Remote Sensing Data Classification Method Based On the Classification Sample Points Extracted By the UAV

    AU2020101054A4

  • Remote sensing image Yellow River ice detection method based on random forest algorithm

    CN110956101A