Method for extracting buildings along gas pipeline based on remote sensing image
Through the BiasCosionNet_R model based on remote sensing images, combined with multi-scale feature fusion and deconvolution technology, the problems of high labor consumption and poor edge extraction in the identification of high-consequence areas of gas pipelines are solved, and efficient and automated building extraction and attributes are achieved. acquisition, improving recognition accuracy and efficiency.
Patent Information
- Application Number
- CN202410810039.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-21
- Publication Date
- 2024-09-17
AI Technical Summary
In the existing technology, the identification of high-consequence areas of gas pipelines mainly relies on GIS and on-site surveys, which consumes a lot of manpower and material resources, the identification results are not synchronized with environmental changes, the quality is low, and there is a lack of foresight. Moreover, the semantic segmentation method is ineffective when dealing with targets of different scales. Features are confused and edge extraction is poor.
A method based on remote sensing images is used to extract and attribute attributes of buildings along the pipeline through the BiasCosionNet_R model construction. It combines multi-scale feature fusion, deconvolution and skip connection to improve edge feature clarity and automation, and uses inverse geocoding to obtain Building properties.
It achieves efficient and automated extraction of buildings along pipelines, improves the clarity of edges and internal features, reduces manpower and material consumption, generates more refined segmentation results, and obtains detailed attributes of buildings.
Smart Images

Figure CN118658030A
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of remote sensing images, in particular to a method for extracting buildings along a gas pipeline based on remote sensing images. Background Art
[0002] Pipeline transportation has the characteristics of large transportation volume and low cost, and has become the main mode of transportation of natural gas. In recent years, my country's oil and gas industry has developed rapidly, and the construction of pipeline infrastructure has been steadily advancing. By the end of 2022, the total mileage of my country's existing long-distance oil and gas pipelines will reach 18×10 4 km, of which natural gas pipeline mileage reaches 12×10 4 km.
[0003] High Consequence Areas (HCAs) refer to areas where leakage in pipelines will have a serious impact on surrounding personnel or the environment. With the increase in pipeline mileage and the continuous advancement of urbanization in my country, pipelines will inevitably pass through high-consequence areas. Accurately identifying pipeline high-consequence areas is a key link in pipeline integrity management. GB32167-2015 "Oil and Gas Pipeline Integrity Management Specification" provides specific requirements for the classification standards, working methods, and management plans for pipeline high-consequence areas, and stipulates that areas that meet specific conditions in the judgment standards are high-consequence area sections, and pipeline companies need to strengthen daily management and patrol of such sections.
[0004] At present, the identification of high-consequence areas of gas pipelines is mainly based on manual identification methods based on GIS and on-site investigations. There are problems such as heavy identification tasks, a large amount of manpower, material resources, financial resources, and time, the identification results cannot be synchronized with the changes in the surrounding environment, the quality is low, and there is a lack of foresight. The high-consequence area determination standard is mainly based on the number of households within 200m along the pipeline to divide the high-consequence area into grades. The number of households can be converted by the number of buildings. Existing semantic segmentation methods in the field of building segmentation: (1) ignore the features generated when the segmentation target changes between different scales; (2) when the network downsampling depth is too deep, it will cause the target edge features and internal features to be confused, and the building segmentation results will have the problems of detail loss and poor edge extraction effect. Summary of the invention
[0005] The purpose of the present invention is to provide a method for extracting buildings along a gas pipeline based on remote sensing images, so as to solve the above-mentioned deficiencies in the prior art.
[0006] In order to achieve the above object, the present invention provides the following technical solution: a method for extracting buildings along a gas pipeline based on remote sensing images, comprising the following steps:
[0007] S1: Image data acquisition;
[0008] S2: data preprocessing;
[0009] S3: Construction of remote sensing image object extraction model based on BiasCosionNet_R;
[0010] S4: Network model training;
[0011] S5: Extraction of building outlines along the pipeline;
[0012] S6: Obtaining the attributes of buildings along the pipeline.
[0013] Preferably, in step S1, based on the pipeline route data, ArcGIS software is used to obtain high-resolution remote sensing image data within a range of 200 m along the pipeline.
[0014] Preferably, the preprocessing in step S2 includes reducing noise, enhancing contrast, adjusting image size, normalizing, enhancing features, rotating and flipping, and Gaussian filtering.
[0015] Preferably, in step S2, the data set is divided into a training set for training the model, a test set for verifying the performance of the model and performing parameter adjustment, and a performance verification set for finally evaluating the model.
[0016] Preferably, in step S4, the preprocessed training samples are sent to the constructed BiasCosionNet_R-based feature extraction model for training.
[0017] Preferably, in step S4, verification data is used for verification and model tuning, including adjustment and optimization of the model learning rate, batch size, and loss function.
[0018] Preferably, in step S5, the obtained high-resolution remote sensing image strip map along the pipeline is input into the building outline extraction model, and the input image is cropped with overlaps through the strip large image prediction algorithm.
[0019] Preferably, the images are cut into small-size images with a length and width of 512 pixels each and stored in a linked list.
[0020] Preferably, in step S6, the identification of high-consequence areas of the gas pipeline requires the type, height, number of floors, and population of the building.
[0021] Preferably, the building types are divided into residential quarters, rural residential quarters, specific places, and flammable and explosive places.
[0022] The beneficial effects of the present invention are:
[0023] 1. Compared with the traditional method of manually extracting buildings around pipelines, this solution consumes less manpower and material resources, has a high degree of automation and high efficiency.
[0024] 2. Compared with the existing semantic segmentation model, a multi-scale feature fusion mechanism is introduced into the network to fuse features of different scales, which can capture the details and contextual information of the target at different scales and improve the clarity of the target's edges and internal features.
[0025] 3. Using deconvolution to perform upsampling operations in the deep layers of the network can effectively expand the receptive field, improve the accuracy of prediction, and generate more refined segmentation results.
[0026] 4. By connecting residual blocks, skip connections are introduced to transfer information and avoid the gradient vanishing problem. At the same time, the model can better preserve the details of the building edges in the image, improve the sharpness and clarity of the edges, thereby improving the perception of the building edges and achieving higher edge integrity.
[0027] 5. Through reverse geocoding technology and POI crawling technology, the attribute information of building outlines is obtained from multiple sources to achieve the assignment of attributes such as building population, building type, and building height. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.
[0029] Figure 1 A method step diagram provided for an embodiment of the present invention;
[0030] Figure 2 A schematic diagram of training samples and corresponding labels provided by an embodiment of the present invention;
[0031] Figure 3 A schematic diagram of sample data enhancement provided by an embodiment of the present invention;
[0032] Figure 4 A structural diagram of BiasCosionNet_R provided in an embodiment of the present invention;
[0033] Figure 5 A flowchart for extracting images of buildings along a pipeline provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0034] In order to enable those skilled in the art to better understand the technical solution of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings.
[0035] In the description of the present invention, unless otherwise specified, "multiple" means two or more than two; the terms "upper", "lower", "left", "right", "inner", "outer", "front end", "rear end", "head", "tail" and the like indicate the orientation or position relationship based on the orientation or position relationship shown in the accompanying drawings, which is only for the convenience of describing the present invention and simplifying the description, and does not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention. In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "connected" and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be directly connected or indirectly connected through an intermediate medium. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0036] like Figure 1-5 As shown, an embodiment of the present invention provides a method for extracting buildings along a gas pipeline based on remote sensing images, comprising the following steps:
[0037] S1: Image data acquisition;
[0038] Urban datasets and rural building datasets were selected, and regional high-resolution remote sensing images were cropped and building labels were made. Finally, a self-built dataset with a size of 512×512 was obtained. At the same time, based on the pipeline routing data, ArcGIS software was used to obtain high-resolution remote sensing image data within 200m along the pipeline, providing basic data for intelligent identification of buildings along the pipeline.
[0039] S2: data preprocessing;
[0040] Preprocess the images and label files in the dataset, convert the tif format files to jpg format, speed up the reading speed of model training and verification while saving storage space, normalize the label files, improve the performance of the model and the training convergence speed, use noise reduction, contrast enhancement, image size adjustment, normalization, feature enhancement, rotation and flipping, Gaussian filtering and other operations to preprocess the dataset, so as to improve and adjust the original image, expand the sample set, prevent data overfitting, and enhance the generalization ability and robustness of the model. Divide the dataset into training set, test set and validation set in a ratio of 6:2:2. 60% of the data is used to train the model, 20% of the data is used to verify the performance of the model and adjust the parameters, and the last 20% of the data is used to finally evaluate the performance of the model.
[0041] S3: Construction of remote sensing image object extraction model based on BiasCosionNet_R;
[0042] The maximum scale depth of the BiasCosionNet_R network is 3, and the maximum layer depth is 5. The transformation between different scales is used as the main feature to form a cosine effect. In the initial stage, the input image is multi-level downsampled to form a bias effect, and a residual block is added to the network to solve the problem of gradient vanishing and gradient exploding in the deep network.
[0043] First, the input image is resized to three scales: 512×512 (primary), 256×256 (secondary), and 128×128 (tertiary). Then, the image of each scale is subjected to cyclic up-down sampling in turn, with the cyclic depth set to 4. The order of the intermediate layer sizes of the cyclic up-down sampling for the primary scale is 512×512, 256×256, 128×128, 256×256, and 512×512. The order of the intermediate layer sizes of the cyclic up-down sampling for the secondary scale is 256×256, 128×128, 256×256, 512×512, and 256×256. The order of the intermediate layer sizes of the cyclic up-down sampling for the tertiary scale is 128×128, 256×256, 512×512, 256×256, and 128×128. Downsampling is performed through convolution operations, with a kernel size of 3×3, a stride of 2, and 64 kernels. Upsampling is performed through deconvolution operations, with a kernel size of 3×3, a stride of 2, and 64 kernels. Each upsampling or downsampling operation is followed by a batch normalization layer, a ReLU layer, and a max pooling layer to extract and learn effective feature representations in remote sensing images. At the end of the cyclic upsampling, the features of the three scales are upsampled, with the kernel size set to 3×3, the strides of 1, 2, and 4, and the number of kernels of 64. Finally, the three scales are uniformly restored to 512×512. Then the features of the three scales are accumulated to obtain a 512×512×192 feature matrix (FeatureMat). After accumulation, batch binary classification convolution is used with a convolution kernel size of 3×3, a stride of 1, and a number of convolution kernels of 2 to obtain a classification feature matrix (Class_FeatureMat). SoftMax is then used to normalize the prediction results (S_Class), and finally the binary classification output layer (PixelClassification) is used to obtain the remote sensing image building extraction results.
[0044] S4: Network model training;
[0045] The preprocessed training samples were sent to the BiasCosionNet_R-based ground feature extraction model for training. The program running platform CPU is Intel Core i7-9700KF, the graphics card is NVIDIA GeForceRTX 3090, the memory is 32G, the loss function uses the cross entropy loss function (categorical crossentropyloss), the batch size (batch_size) is set to 8, the learning rate (lr) is set to 0.0001, the segmentation category N_classes is 2, and the optimization function uses Adam to minimize the loss function. Dropout is used for regularization to control the complexity of the model and prevent overfitting. The validation data is used for validation and model tuning, including the adjustment and optimization of the model learning rate, batch size, and loss function. The model performance is evaluated using the test set evaluation, and finally the pipeline building contour extraction model based on BiasCosionNet_R is trained.
[0046] S5: Extraction of building outlines along the pipeline;
[0047] The obtained high-resolution remote sensing image strip map along the pipeline is input into the building contour extraction model. Through the large strip map prediction algorithm, the input image is cropped with overlap, and the image is cropped into a small-size image with a length and width of 512 pixels and stored in a linked list. Subsequently, the cropped small-size images are read from the linked list in sequence and input into the prediction model for building contour extraction. The blank areas outside the strip area in the linked list are directly skipped, and only the model reasoning is performed on the strip area to improve the building extraction efficiency. Finally, only the middle area of the building extraction results of each small image is selected for sequential splicing, and finally a large remote sensing image building prediction map without edge splicing traces is obtained.
[0048] S6: Acquisition of building attributes along the pipeline;
[0049] The identification of high-consequence areas of gas pipelines requires attributes such as building type, height, number of floors, and population. Based on the high-consequence area identification criteria and the distribution of buildings along the pipeline, the building types are divided into residential areas, rural residential areas, specific places (hospitals, prisons, markets, schools, etc.), flammable and explosive places, and other categories.
[0050] The FindContours method of OpenCV is used to obtain the outer edge contour information of each building from the Tif file containing the building outline and calculate the area. The Transform method is used to extract the longitude and latitude of the outer edge of the building, and the Centroid method is used to obtain the center point coordinates of each building. The center point building information is obtained from Baidu Maps and Amap through reverse geocoding technology and POI crawling methods. At the same time, category information is added to the building outline by combining multi-source data such as regional planning documents, and manual review is carried out on specific places and key areas such as hospitals, prisons, markets, schools, and flammable and explosive places in the recognition results.
[0051] Based on the acquisition of building types along the pipeline, and based on census data, building design specifications, local planning data, and urban building height data, the building height is quantified as 3m / floor, rural housing is quantified as 3.2 people / household, and the per capita living area of residential communities is 41㎡ / person. A program is written to estimate and assign values to the building attributes within the scope, and manual review is performed on key areas. Finally, a GeoJSON file containing building attributes such as category, area, floor height, and population is obtained, which enables the acquisition of building outlines and attributes along the pipeline.
[0052] The above description is only by way of illustration of certain exemplary embodiments of the present invention. It is undoubted that those skilled in the art can modify the described embodiments in various ways without departing from the spirit and scope of the present invention. Therefore, the above drawings and descriptions are illustrative in nature and should not be construed as limiting the scope of protection of the claims of the present invention.
Claims
1. A method for extracting buildings along a gas pipeline based on remote sensing images, characterized in that: The steps include: S1: Image data acquisition; S2: data preprocessing; S3: Construction of remote sensing image object extraction model based on BiasCosionNet_R; S4: Network model training; S5: Extraction of building outlines along the pipeline; S6: Obtaining the attributes of buildings along the pipeline.
2. The method for extracting buildings along a gas pipeline based on remote sensing images according to claim 1, characterized in that: In step S1, based on the pipeline route data, ArcGIS software is used to obtain high-resolution remote sensing image data within a range of 200 m along the pipeline.
3. The method for extracting buildings along a gas pipeline based on remote sensing images according to claim 1, characterized in that: The preprocessing in step S2 includes noise reduction, contrast enhancement, image size adjustment, normalization, feature enhancement, rotation and flipping, and Gaussian filtering.
4. The method for extracting buildings along a gas pipeline based on remote sensing images according to claim 1, characterized in that: In step S2, the data set is divided into a training set for training the model, a test set for verifying the performance of the model and adjusting parameters, and a performance verification set for finally evaluating the model.
5. The method for extracting buildings along a gas pipeline based on remote sensing images according to claim 1, characterized in that: In step S4, the preprocessed training samples are sent to the constructed BiasCosionNet_R-based feature extraction model for training.
6. The method for extracting buildings along a gas pipeline based on remote sensing images according to claim 1, characterized in that: In step S4, the validation data is used for validation and model tuning, including adjustment and optimization of the model learning rate, batch size, and loss function.
7. The method for extracting buildings along a gas pipeline based on remote sensing images according to claim 1, characterized in that: In step S5, the obtained high-resolution remote sensing image strip map along the pipeline is input into the building outline extraction model, and the input image is cropped with overlap through the strip large image prediction algorithm.
8. The method for extracting buildings along a gas pipeline based on remote sensing images according to claim 7, characterized in that: Crop it into a small-size image with a length and width of 512 pixels and store it in a linked list.
9. The method for extracting buildings along a gas pipeline based on remote sensing images according to claim 1, characterized in that: In step S6, the high-consequence area of the gas pipeline is identified by the type, height, number of floors, and population of the required buildings.
10. The method for extracting buildings along a gas pipeline based on remote sensing images according to claim 6, characterized in that: Building types are divided into residential communities, rural residences, specific places, and flammable and explosive places.
