Git Product home page Git Product logo

deeplab-v3's Introduction

DeepLab V3

Overview

This project implements the DeepLab V3 architecture for the semantic image segmentation task trained and evaluated using the Cityscapes dataset. It uses atrous convolutions in both the ResNet-101 backbone architecture and atrous spatial pyramid pooling layer. This implementation has been built using the PyTorch framework.

How to run

In order to run the project, use the following command:

python main.py <dataset-folder> <model-checkpoint-folder> <losses-folder> --is-training-model

In order to evaluate the project, use the following command:

python main.py <dataset-folder> <model-checkpoint-folder> <losses-folder> --is-evaluating-model --checkpoint-path <checkpoint-path>

Note that in both cases, the three required arguments are defined as follows:

  1. dataset-folder: The path of the Cityscapes dataset
  2. model-checkpoint-folder: The path to save model checkpoints every 5 epochs. This can be changed using the --save-checkpoint-index option
  3. losses-folder: The path to save the average training and validation losses every 5 epochs. This can be changed using the --save-checkpoint-index option

Training protocol

In this project, I used a momentum of 0.9, weight decay of 5e-4, and a polynomial learning rate scheduler as defined in the paper. The model has been trained for 65 epochs using the learning rate of 1e-2. Then, the last 5 epochs has been trained using a learning rate of 1e-3.

Final score

In this project, I am able to achieve a mean intersection over union score of 0.700.

Model checkpoint

Since the model checkpoint file is quite large of a size, I have placed it in a public Dropbox folder found here. In order to load this, place this inside <model-checkpoint-folder> and pass the filename without the extension to the --checkpoint-path option.

Example

Here is an example of a mask produced by the model and the original image:

Mask image:

Original image:

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.