Abstract: Land classification is one of the important application scenarios of remote sensing images. This paper introduces several common methods of land classification, and uses open source semantic segmentation code to build a land classification model.

Original: Hyperai

Key words: remote sensing data set semantic segmentation machine vision


Remote sensing image is an important data for surveying and mapping geographic information. It is of great significance to the monitoring of geographical conditions and the updating of geographical information database, and plays an increasingly important role in military, commercial, people’s livelihood and other fields. In recent years, with the improvement of the country’s satellite image acquisition ability, the efficiency of remote sensing image data collection has been greatly improved, forming a pattern of low spatial resolution, high spatial resolution, wide viewing Angle and multiple angles, radar and other sensors coexisting.

Landsat 2 in orbit is collecting remote sensing data on Earth

The satellite, the second in NASA’s Landsat program, was launched in 1975 to obtain global seasonal data at moderate resolution

A complete range of sensors meets the needs of earth observation for different purposes, but it also causes problems such as inconsistent data formats of remote sensing images, large consumption of storage space and so on, and often faces great challenges in the process of image processing.

Take land classification as an example. In the past, land classification using remote sensing images often relied on a large number of manpower for labeling and statistics, which took months or even a year. In addition to the complexity and diversity of land types, it is inevitable that there will be human statistical errors.

With the development of artificial intelligence technology, the acquisition, processing and analysis of remote sensing images have become more intelligent and efficient.

Common land classification methods

Commonly used land classification methods can be divided into three categories: GIS-based traditional classification methods, machine learning algorithm-based classification methods, and neural network semantic segmentation methods.

Traditional method: Use GIS GIS to classify

GIS is a tool frequently used in processing remote sensing images. It is full name of Geographic Information System, also known as Geographic Information System.

It integrates advanced technologies such as relational database management, efficient graphics algorithms, interpolation, zoning and network analysis to make spatial analysis simple and feasible.

Spatial analysis of the eastern tributary of Elizabeth River was carried out using GIS

Using the spatial analysis technology of GIS, the spatial location, distribution, form, formation and evolution of the corresponding land types can be obtained, and the land features can be identified and judged.

Machine learning: Using algorithms to classify

Traditional land classification methods include supervised classification and unsupervised classification.

Supervised classification, also known as training classification, refers to comparing and identifying the training sample pixel of the confirmed category with the pixel of the unknown category, and then completing the classification of the whole land type.

In supervised classification, when the accuracy of the training sample is not enough, the training area is usually re-selected or the visual modification is made to ensure the accuracy of the pixel of the training sample.

Remote sensing image after supervised classification (left), red is construction land, green is non-construction land

Unsupervised classification means that there is no need to obtain prior classification standards in advance, but the statistical classification is conducted completely according to the spectral characteristics of the pixels in the remote sensing image. This method has a high degree of automation and less human intervention.

The efficiency and accuracy of supervised classification and unsupervised classification can be greatly improved with the help of machine learning algorithms such as support vector machine and maximum likelihood method.

Neural networks: classification using semantic segmentation

Semantic segmentation is an end-to-end pixel-level classification method, which can enhance machines’ understanding of environmental scenes, and is widely used in autonomous driving, land planning and other fields.

Semantic segmentation based on deep neural network is superior to traditional machine learning methods in pixel level classification tasks.

Semantic segmentation algorithm is used to recognize and judge remote sensing images

High-resolution remote sensing images are characterized by complex scenes, rich details and uncertain spectral differences between ground objects, which can easily lead to low segmentation accuracy or even invalid segmentation.

Using semantic segmentation to process high-resolution and ultra-high-resolution remote sensing images, the pixel features of images can be extracted more accurately, and specific land types can be identified quickly and accurately, thus improving the processing speed of remote sensing images.

Common semantic segmentation open source model

Common open source models for pixel-level semantic segmentation include FCN, SEGNET, and DEEPLAB.

1. Full Convolutional Network (FCN)

Features: End-to-end semantic segmentation advantages: without limiting the size of the image, with versatility and high efficiency

Disadvantages: unable to quickly carry out real-time reasoning, processing results are not fine enough, insensitive to image details

2, SegNet

Features: The maximum pooling index is transferred to the decoder, which improves the segmentation resolution. Advantages: Fast training speed, high efficiency, and less memory consumption. Disadvantages: The test is not feed-forward, which requires optimization to determine the MAP label

3, DeepLab

Deeplab, released by Google AI, advocates using DCNN to solve the semantic segmentation task, including four versions: V1, V2, V3 and V3 +.

In order to solve the problem of information loss caused by pooling, Deeplab-V1 proposed the way of void convolution, which can increase the receiver field without increasing the number of parameters and guarantee the information not to be lost.

Deeplab-v1 model flow demonstration

Deeplab-v2 adds multi-scale parallelism on the basis of V1, and solves the problem of simultaneous segmentation of objects of different sizes.

Deeplab-v3 applies the void convolution in the cascading module and improves the ASPP module.

Deeplab-V3 + adopts SPP module on encoder-decoder structure, which can restore fine object edge. Refining segmentation results.

Model training preparation

Objective: To develop a 7 classification model for land classification based on Deeplab-V3 +

Data: 304 remote sensing images of an area from Google Earth. In addition to the original picture, it also includes the matching 7 classification map, 7 classification mask, 25 classification map and 25 classification mask image that have been professionally marked. The image resolution is 560*560, and the spatial allocation ratio is 1.2m.

The upper part is the original picture, and the lower part is the 7 classification map

The parameter code is as follows:

net = DeepLabV3Plus(backbone = 'xception') criterion = CrossEntropyLoss() optimizer = optim.SGD(net.parameters(), Lr = 0.05, momentum = 0.9, weight_decay lr_fc = = 0.00001) lambda iteration: (1 - iteration / 400000) * * 0.9 exp_lr_scheduler = lr_scheduler LambdaLR (optimizer, lr_fc, 1)

Training Details Calculation: NVIDIA T4 Training Framework: PyTorch V1.2 Iteration times: 600 EPOCH Training duration: approximately 50h IOU: 0.8285 (training data) AC: 0.7838 (training data)

Dataset links:

https://openbayes.com/console…

Detailed training process direct link:

https://openbayes.com/console…

Remote Sensing Image Land Seven Classification Public Tutorial Details

Tutorial USES

The sample demo file in the tutorial is predict.ipynb. Running this file will install the environment and show the recognition of existing models.

Project path

  • Test image path:

semantic_pytorch/out/result/pic3

  • Mask image path:

semantic_pytorch/out/result/label

  • Forecast image path:

semantic_pytorch/out/result/predict

  • List of training data: train.csv
  • Test data list: test.csv

Directions for use

The training model enters semantic_pytorch and the training model is saved in model/new_deeplabv3_cc.pt.

Deeplabv3 plus is adopted in the model. In the training parameters, Loss adopts binary cross entropy. EPOCH was 600 and the initial learning rate was 0.05.

Training instruction:

python main.py

If we are using the model we have already trained, we will use FIX_DEEPLAB_V3_CC.PT saved in the model folder and called directly in predict.py.

Prediction instruction:

python predict.py

Tutorial Address:

https://openbayes.com/console…

Model the author

Question 1: what sources and information did you consult to develop this model?

Wang Yanxin: Mainly through the technical community, GitHub and other channels, I checked some Deeplab-v3 + papers and related project cases to know in advance what the pits are and how to overcome them, so as to make full preparations for the follow-up model development when any problem is encountered at any time.

Question 2: What obstacles did you encounter along the way? How did you overcome it?

Wang Yanxi: The data amount is not enough, which leads to the mediocre performance of IOU and AC. Next time, we can try using the open remote sensing data set with more abundant data amount.

Question 3: What other directions do you want to try about remote sensing?

Wang Yanxin: This time is to classify the land. Next, I want to analyze the ocean landscape and Marine elements by combining machine learning and remote sensing technology, or try to identify and judge the seabed topography by combining acoustic technology.


The amount of data used in this training is small, and the performance of IOU and AC in the training set is not good. You can also try to use the existing public remote sensing data set for model training. Generally speaking, the fuller the training and the richer the training data, the better the model performance will be.

In the (next) article of this series, we have summarized and organized 11 mainstream public remote sensing data sets. You can choose a more perfect model according to the training ideas provided in this paper.

Reference: http://tb.sinomaps.com/CN/049… file:///Users/antonia0912/Downloads/2018-6A-50.pdf https://zhuanlan.zhihu.com/p/… http://www.mnr.gov.cn/zt/zh/z…