Soft Proposal Networks for Weakly Supervised Object Localization, in ICCV 2017
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.

Soft Proposal Networks
for Weakly Supervised Object Localization

[Project] [Paper] [Supp] [More Resources]


Torch Implementation

The torch branch contains:

  • the official torch implementation of SPN.
  • the PASCAL-VOC point-based localization demo.

Please follow the instruction below to install it and run the experiment demo.


Getting started

You can setup everything via a single command wget -O - | bash or do it manually in case something goes wrong:

  1. install the dependencies (required by the demo code):

  2. clone the torch branch:

    # git version must be greater than 1.9.10
    git clone -b torch --single-branch SPN.torch
    cd SPN.torch
    export DIR=$(pwd)
  3. install SPN:

    cd $DIR/install
    # install the GPU implementation of SPN.
  4. download the PASCAL-VOC2007 dataset:

    cd $DIR/demo/datasets
    # trainval
    tar xvf  VOCtrainval_06-Nov-2007.tar
    # test
    tar xvf VOCtest_06-Nov-2007.tar
  5. download pre-trained VGGNet model for fine-tuning:

    cd $DIR/demo/models/convert
    # convert caffemodel to t7
    th convertVGG.lua
  6. run the demo experiment:

    cd $DIR/demo
    bash ./scripts/
  7. visualize locating samples via demo/notebooks/vis.ipynb Pointing localization


If you run into error: identifier "THCudaBlas_Sgemv" is undefined during installation, update Torch7 to the latest version via cd <TORCH_DIR> && bash ./

PyTorch Implementation

Check here.

Caffe Implementation



If you use the code in your research, please cite:

    author = {Zhu, Yi and Zhou, Yanzhao and Ye, Qixiang and Qiu, Qiang and Jiao, Jianbin},
    title = {Soft Proposal Networks for Weakly Supervised Object Localization},
    booktitle = {ICCV},
    year = {2017}