Giter Site home page Giter Site logo

cs-433-project-2-still-no-idea's Introduction

Project Road Segmentation

This is the code and report for the Road Segmentation project of the CS-433 class.

Report

The report can be found in Report.pdf

Required libraries

To run the notebooks in local you will need the following libraries :

  • matplotlib
  • pyTorch v1.5.1 and torchvision v0.6.1 using conda install pytorch==1.5.1 torchvision==0.6.1 cudatoolkit=10.2 -c pytorch
  • scikit-image
  • opencv-python

In run.py you can update the line 26 root_dir = "" with the path to this directory if needed. Then you can execute run.py in local, which will give a file final_submission.csv.

Code organization

The code is split into two main parts:

  • The UNet architecture is contained in the Unet.ipynb file
  • The CNN architecture is contained in the Road_segmentation.ipynb or run.py file

Both file were run on Google colab and contains a variable root_dir which indicates the directory with the data and the pretrained model. This root directory must have the following structure :

  • images/
    • all images for the training set
  • groundtruth/
    • all groundtruth for the training set
  • test_set_images/
    • test_i/ : for i from 1 to 50
      • test_i.png
  • results/ : the folder to save the prediction
  • convmodel100.pth : pretrained CNN with 100 epochs
  • modelUnet.pth : pretrained UNet with 100 epochs

mask_to_submission.py transforms the submission found in a results directory into a submission.csv file

Alternatively, you can run run.py with the complete repo. The structure for the CNN is already there.

Pretrained models

convmodel100.pth contains the pretrained CNN with 100 epochs modelUnet.txt contains a link to get the pretrained UNet with 100 epochs. The file is too big for GitHub

Results

results_cnn/ contains the predictions made by the CNN
results_postproc/ contains the postprocessed predictions made by the CNN
results_unet/ contains the predictions made by the UNet

AIcrowd

The best submission is Submission #109779

Authors

cs-433-project-2-still-no-idea's People

Contributors

sanimys avatar

Watchers

James Cloos avatar Matteo Pagliardini 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.