DSTL Satellite Feature Detection

Ibrahim Muhammad

VanDev Slack: @ibrahim

Twitter: @ibrahimm

Outline

  • Competition Details
  • My Journey
  • 4th Place solution
  • Other approaches
  • Resources

DSTL Competition

Classes

  • Classes are not disjoint
  • Class imbalance

Labels

Dataset

  • 20 Bands
    • Panchromatic (1 x 3348 x 3392)
    • RGB (3 x 3348 x 3392)
    • Multispectral (8 x 837 x 848)
    • Shortwave IR (8 x 134 x 136)
  • WorldView 3 Sensor
  • 25 Scenes
  • 20 GB of images (zipped)
  • Geometries in WKT and GeoJSON

 

Spectral Signatures

Submission

Evaluation

  • Intersection over Union
  • Average for all 10 classes

Winning Solution 0.49

My Journey

Background

Tools

  • Python 3
  • Jupyter
  • Keras / Tensorflow
  • Matplotlib
     

Image libraries

  • Shapely
  • Descartes
  • OpenCV

Preprocessing

  • Scaling WKT to pixels dimensions
  • Burning masks from WKT
  • Resizing bands
  • Concatenated bands for input (20 x 3350 x 3400)
  • Scaling images between 0 and 1

Model: Autoencoder

Training

  • Split
    • 80% training (20 images)
    • 20% validation (5 images)

Computational Challenges

  • Out of Memory
    • Generators with Keras
  • Slow - Lack of GPUs
    • Macbook pro
    • Nvidia GPUs
      • Azure Notebooks
      • AWS Spot P2 instances

Pixel by Pixel

  • Simpler
  • One model

Postprocessing

  • Create vector geometries from rasters
    • Raster to WKT
  • Prepare submission file

Kaggle Competition 

  • Pre and post processing Kernels
  • Mainly Python and Keras
  • Full pipelines you can start off from and improve
  • Prevalent U-nets for high scores

4th Place Solution

deepsense.io

Preprocessing

  • Resizing
  • Alignment
  • Zero mean and unit variance
  • Concatenating bands

Data Augmentation

  • Random flipping
  • Random Rotation
  • Color Jiittering

Training

  • 256x256 pixel patches
  • Half of the patches contained positive pixels to handle class imbalance
  • Each class model took two days on a single GTX 1070

U-net Architecture

ReLU

Convolution Layers

Max Pooling

U-net Architecture

Network Architecture

Up-conv and copy and crop in Keras

    up6 = merge([UpSampling2D(size=(2, 2))(conv5), conv4], mode='concat', concat_axis=1)
    conv6 = Convolution2D(256, 3, 3, activation='relu', border_mode='same')(up6)
    conv6 = Convolution2D(256, 3, 3, activation='relu', border_mode='same')(conv6)

Special Models

  • Waterway
    • Linear regression and random forest per pixel
  • Large and small vehicles
    • Not enough data

Predictions

  • Sliding window with stride 64 on 256x256 patches
    • Improve predictions on boundaries
  • Averaged results for flipped and rotated version of image

Other Approaches

Other Techniques

  • Using fewer bands (e.g. M bands only)
  • Hard Negatives
  • Ensemble on polygons (Union or intersection)
  • Augmenting data for classes with fewer examples
  • Dropout

Convolution Encoder Decoder

Satellite Feature Detection Datasets

Papers and Blogs

Code

Kaggle Satellite Feature Detection

By Ibrahim Muhammad

Kaggle Satellite Feature Detection

  • 179
Loading comments...

More from Ibrahim Muhammad