Code Monkey home page Code Monkey logo

ifvd's Introduction

Intra-class Feature Variation Distillation for Semantic Segmentation

Introduction

This repository contains the PyTorch implementation of:

Intra-class Feature Variation Distillation for Semantic Segmentation, ECCV 2020 [Paper]

Requirements

All the codes are tested in the following environment:

  • Linux (tested on Ubuntu 16.04 / CentOS 7.6)
  • Python 3.6.2
  • PyTorch 0.4.1
  • Single TITAN Xp GPU

Installation

  • Install PyTorch: conda install pytorch=0.4.1 cuda90 torchvision -c pytorch
  • Install other dependences: pip install opencv-python scipy
  • Install InPlace-ABN:
cd libs
sh build.sh
python build.py

The build.sh script assumes that the nvcc compiler is available in the current system search path. The CUDA kernels are compiled for sm_50, sm_52 and sm_61 by default. To change this (e.g. if you are using a Kepler GPU), please edit the CUDA_GENCODE variable in build.sh.

Dataset & Models

Please create a new folder ckpt and move all downloaded models to it.

Usage

1. Trainning with evaluation

python train.py --data-dir /path/to/cityscapes --save-name /path/to/save --gpu /device/id

2. Inference with evaluation

python val.py --data-dir /path/to/cityscapes --restore-from /path/to/pth --gpu /device/id

3. Inference only

python test.py --data-dir /path/to/cityscapes --restore-from /path/to/pth --gpu /device/id

Citation

Please consider citing this work if it helps your research:


@inproceedings{wang2020ifvd,
  title={Intra-class Feature Variation Distillation for Semantic Segmentation},
  author={Wang, Yukang and Zhou, Wei and Jiang, Tao and Bai, Xiang and Xu, Yongchao},
  booktitle={Proceedings of the European Conference on Computer Vision},
  year={2020}
}

Acknowledgment

This codebase is heavily borrowed from pytorch-segmentation-toolbox and structure_knowledge_distillation. Thanks for their excellent works.

ifvd's People

Contributors

yukangwang avatar

Watchers

James Cloos 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.