This repository provides codes for training and testing algorithms for semantic segmentation of objects on C-band radar images, income from satellite Sentinel-1. The following architectures of convolutional neural networks are presented in the repository:
The following convolutional networks are used as basic networks for segmenters:
- ResNet-34/ResNet-50
- Xception
Used as a machine learning framework PyTorch. Agricultural fields are selected as segmentation objects in the images.
During training, the following variations of network training policies were used:
- Loss functions
- Dice
- BCE
- Dice + BCE
- Focal
- Optimizers
- Adam
- AdamW
- RMSProp
- SGD
NOTE: Installation instructions are provided for Linux.
Install the virtual environment in the project:
pip3 install -r requirements.txtYou can also run the project in Docker container. Pull docker image from repository:
docker pull nikkotov98/kotov_sar:devCreate a docker container based on the downloaded image:
docker run -it --gpus all -v /local_data_root/:/docker_data_root/ /local_code_root/:/docker_code_root/ --name container_name nikkotov98/kotov_sar:devYou can also use the official image from Nvidia:
docker pull nvcr.io/nvidia/pytorch:21.06-py3Start training the corresponding algorithm with the following command (optionally, the output of the terminal is written to the log file):
python3 train_xxx.py &> log_name.logStart testing the corresponding algorithm on the saved scales with the following command:
python3 test.pySegmentation of a large satellite image with the chosen architecture and the chosen stored weights is done by the script:
python3 segment_full_image.pyExamples of the operation of the segmentation algorithm are presented (performed using the network DeeplabV3+ with base network ResNet-50).
![]() |
![]() |
| Dice | F1 | |
|---|---|---|
| Deeplabv3+/ResNet34 | 0.665 | 0.598 |
| Deeplabv3+/ResNet50 | 0.686 | 0.621 |
| Deeplabv3+/Xception | 0.668 | 0.605 |
| IncFCN | 0.722 | 0.669 |
| MPResNet | 0.666 | 0.603 |
| U-Net/ResNet34 | 0.689 | 0.624 |
| U-Net/ResNet50 | 0.5 | 0.603 |
The weights of the trained networks can be downloaded from the Yandex.Disk.
- Kotov Nikita ([email protected])

