Code Monkey home page Code Monkey logo

road-segmentation's Introduction

Road Segmentation

For the second project of the EPFL's Machine Learning master course (CS-433), we tackled the road segmentation challenge. Given a set of labeled satellite images, we had to construct a classifier to recognise the roads in these sorts of pictures. (full details: https://www.aicrowd.com/challenges/epfl-ml-road-segmentation)

intoout

We implemented the famous U-Net classifier and came up with some custom networks of our own. After noticing that some of the simpler classifiers had a tendency to create "ragged" roads in their segmented images we tried introducing our custom loss function "ragged loss". Ragged loss penalises classifiers who create irregular roads with ragged edges or holes in their segmented output images.

rag

Reproduce our results

To reproduce our results, first make sure you have all the dependencies installed (as seen in requirements.txt).

Then, just execute run.py. This will use a pre-trained model found in the models directory. The submission output will be in the out directory.

Unet

The best results were achieved using UNet. Its implementation is contained in the following files:

  • helpers.py: Helper functions
  • images_dataset.py: A class to make manipulation the dataset more convenient
  • predict.py: Code used to get predictions given a model
  • train.py: Code used to train a new model
  • unet.py: U-Net implementation

Baseline

The directory baseline_conv_network holds the provided baseline for the challenge

Preprocessing

The directory Preprocessing holds augmenting_data.py which was used to generate the augmented images

Custom Networks

We've implemented two additional custom networks:

  • encoder: a network that only utilises the encoder instead of the traditional encoder-decoder architecture
  • simple_encoder-decoder: a simple encoder-decoder network, equipped with custom loss function ragged loss

road-segmentation's People

Contributors

quinten-d avatar charbel-11 avatar amine-lamouchi 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.