Git Product home page Git Product logo

space's Introduction

Satellite Image Difference

Description

With a given two images of the same place from the different dates we need to figure out binary mask with changes

Selim's pretrained models

Train

  1. Put data as shown below in tree structure of folders
  2. Put pretrained models from Selim in a /models/pretrained folder. We need those for siamese net.
  3. Change paths to the proper one in the config/ files
  4. Run the training proccess with train.py. The first argument should be path to the config file
python train.py config/config_unet++_resnext50.json
python train.py config/config_siamese_seresnext50.json
  1. After that you'll have:

    • saved models in /models/saved folder, logs of training
    • logs of training proccess in /logs
    • predicted non binary masks in /predicted_masks
  2. In the /notebooks/final_submission.ipynb generated a final submission file via averaging outputs from those two models

Solution description

  1. I splited initial large image into small ones applying after that augmentation

  2. Trained Unet++ with resnext50 backbone using Segmentation models on 1 channel image difference image

  3. Trained Siamese net with seresnext50 backbone using models architecture from xview2_solution on RGB channel images

image

Result

image

Project Organization

├── LICENSE
├── Makefile           <- Makefile with commands like `make data` or `make train`
├── README.md
├── data
│   ├── Images                 <- Original 4 channel images from first and second dates.
│   ├── Images_composit        <- Composed 8 channel images from original images.
│   ├── mask                   <- Binary masks of images differences.
│   ├── Rucode.xls             <- Table to match images from the same location.
│   └── sample_submission.csv  <- Sample submission file.
│
├── models             <- Trained and serialized models
│   ├── pretrained     <- Pretrained models for siamese models from Selim.
│   └── saved          <- Trained on the competition data models.
|
├── notebooks          <- Jupyter notebooks.
│
├── logs               <- Logs of training process: loss, IoU
|
├── config             <- Configuration files for each type of model
|
├── predicted_masks    <- Predicted probability masks in pickle format 
│
├── requirements.txt   <- The requirements file for reproducing the analysis environment,
│                         `pip install -r requirements.txt`
│
├── setup.py           <- makes project pip installable (pip install -e .) so src can be imported
├── train.py           <- Training process with evaluation on the end.
├── eval.py            <- Mask evaluation using the trained model.
├── src                <- Source code for use in this project.
│   ├── __init__.py    <- Makes src a Python module
│   │
│   ├── models.py      <- Siamese models from Selim
│   ├── dataset.py     <- Dataset class for satellite images
│   └── utils.py       <- Small preprocess functions like normalization and decoding
│
└── tox.ini            <- tox file with settings for running tox; see tox.readthedocs.io

Project based on the cookiecutter data science project template. #cookiecutterdatascience

space's People

Contributors

maloyan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.