Skip to content

Intra-class Feature Variation Distillation for Semantic Segmentation (ECCV 2020)

License

Notifications You must be signed in to change notification settings

YukangWang/IFVD

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Intra-class Feature Variation Distillation for Semantic Segmentation (ECCV 2020)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published