Giter VIP home page Giter VIP logo

pytorch-deeplab's Introduction

pytorch-deeplab

This repository contains codes for converting DeepLab ResNet 101 trained in caffe to pytorch model.

First, you need to have pycaffe and pytorch. Secondly, you should download the caffe models from http://liangchiehchen.com/projects/DeepLabv2_resnet.html. Put them in data folder.

Then,

python convert2.py data/init.caffemodel model/deeplab101_init.pth
python convert2.py data/train_iter_20000.caffemodel model/deeplab101_trainaug.pth
python convert2.py data/train2_iter_20000.caffemodel model/deeplab101_trainvalaug.pth

The models generated by convert2.py expect RGB image ranging [0, 1]. You can use standard trn.Normalize([0.485, 0.456, 0.406],[0.229, 0.224, 0.225]).

You can train on train_aug and evaluate on val of PASCAL VOC2012 by

python deeplab_main.py 0 train
python deeplab_main.py 0 eval

During evaluation you will also need to run EvalSegResults.m in the matlab folder to compute the mean IOU.

Acknowledgement

A large part of the code is borrowed from https://github.com/ruotianluo/pytorch-resnet

Performance

The converted DeepLab ResNet 101 model achieves mean IOU of 75.382% on the validation set of PASCAL VOC2012. Note that this is only with the original resolution branch, without the 0.5 and 0.75 resolution.

pytorch-deeplab's People

Contributors

chenxi116 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

longzhao-huang

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.