Giter VIP home page Giter VIP logo

casd's Introduction

Comprehensive Attention Self-Distillation for Weakly-Supervised Object Detection

Update(May 30): Please use the latest parallelized version(May30 branch;24G GPU required). The VOC07 is around 57.00% mAP(slightly better than reported and download the model below). For 12G GPU users, please use the master branch(Some functions are cut down to save memory).

This is the official implementation of:

Zeyi Huang', Yang Zou', Vijayakumar Bhagavatula, and Dong Huang, Comprehensive Attention Self-Distillation for Weakly-Supervised Object Detection, NeurIPS 2020, Arxiv version.

PWCPWCPWC

Citation:

@article{huang2020comprehensive,
  title={Comprehensive Attention Self-Distillation for Weakly-Supervised Object Detection},
  author={Huang, Zeyi and Zou, Yang and Kumar, BVK and Huang, Dong},
  journal={Advances in Neural Information Processing Systems},
  volume={33},
  year={2020}
}

Installation

Requirements

  • Python == 3.7
  • Pytorch == 1.1.0
  • Torchvision == 0.3.0
  • Cuda == 10.0
  • cython
  • scipy
  • sklearn
  • opencv
  • GPU: TITAN RTX (24G of memory)

Note: To train with GPU of small memory, CASD_IW is partially parallelized. Fully parallelized version is coming soon. Thanks for your patience.

Preparation

  1. Clone the repository
git clone https://github.com/DeLightCMU/CASD.git
  1. Compile the CUDA code
cd CASD/lib
bash make_cuda.sh
  1. Download the training, validation, test data and the VOCdevkit
mkdir data
cd data/
wget http://host.robots.ox.ac.uk/pascal/VOC/voc2007/VOCtrainval_06-Nov-2007.tar
wget http://host.robots.ox.ac.uk/pascal/VOC/voc2007/VOCtest_06-Nov-2007.tar
wget http://host.robots.ox.ac.uk/pascal/VOC/voc2012/VOCdevkit_18-May-2011.tar
  1. Extract all of these tars into one directory named VOCdevkit
tar xvf VOCtrainval_06-Nov-2007.tar
tar xvf VOCtest_06-Nov-2007.tar
tar xvf VOCdevkit_08-Jun-2007.tar
  1. Create symlinks for PASCAL VOC dataset
cd CASD/data
ln -s VOCdevkit VOCdevkit2007
  1. Download pretrained ImageNet weights from here, and put it in the data/imagenet_weights/

  2. Download selective search proposals from here, and put it in the data/selective_search_data/

Training and Testing

Train a vgg16 Network on VOC 2007 trainval

bash experiments/scripts/train_faster_rcnn.sh 0 pascal_voc vgg16

Test a vgg16 Network on VOC 2007 test

bash experiments/scripts/test_faster_rcnn.sh 0 pascal_voc vgg16

Download log and weight from here

Acknowledgement

We borrowed code from MLEM, PCL, and Faster-RCNN.

casd's People

Contributors

justinhzy avatar dghuanggh 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.