Goal of this project is to prototype and showcase a segmentation model on a custom geo-dataset.
- Pytorch along with Pytorch Lightning [1] is used for prototyping the model. Pytorch Lightning is used to scale the model training on multiple GPUs/TPUs.
- Due to time / computational constraints, the model was trained only for 50 epochs and the results obtained can be further improved.
- UNet architecture similar to [2] was used for the task. Due to unavailability of pre-trained models trained on required classes, we preferred custom model.
- The trainer supports both 3 channels (RGB) and 12 channels (bands) for training and inference.
- Note: We used [0-11] zero indexed counting for channels/bands.
- 'src/main.py' can be used for training and inference.
- 'src/sandbox' contains prototype code.
- Code is designed to be modular. This will make prototyping different models, hyperparameter tuning easier.
- Due to time constraint we have not written a commandline application for running training and inference.
- DATASET_PATH can be replaced by path to {Dataset}. The dataset folder contains {Dataset/images} and {Dataset/labels}.
- The code for graphing loss values are still in progress.
The input 'tif.' image contains 12 channels.
Individual channels with countours:
From exif data [3]:
- Pixel Scale < 10 10 0 >
- Model Tie Point < 0 0 0 726830 5544990 0 >
- Gt Model Type < Projected >
- Gt Raster Type < Pixel Is Area >
- Gt Citation < WGS 84 / UTM zone 31N >
- Geog Citation < WGS 84 >
- Geog Angular Units < Angular Degree >
Example output after inference.
The (left) image shows the output of the model trained only on the RGB channels (4,3,2)The (right) image shows the output of model trained on all the channels (1-12)
Since the model is not trained till convergance, the results are not directly usable.
- https://pytorch-lightning.readthedocs.io/en/latest/
- https://medium.com/analytics-vidhya/creating-a-very-simple-u-net-model-with-pytorch-for-semantic-segmentation-of-satellite-images-223aa216e705
- https://www.metadata2go.com
- https://www.pcigeomatics.com/geomatica-help/COMMON/concepts/TiePoint_explain.html