This is a Pytorch implementation of our WSODSC.
WSODSC is a framework for weakly supervised object detection with deep ConvNets.
Our code is written based on PyTorch and wetectron.
Sincerely thanks for your recources.
- Python 3
- Pytorch 1.5+
- torchvision
We follow the same installation steps with wetectron.
- Check INSTALL.md for installation instructions.
For PASCAL VOC 2007 dataset, download and then
mkdir -p datasets/voc
ln -s /path_to_VOCdevkit/VOC2007 datasets/voc/VOC2007
Download the proposals from Google-drive first,
- selective_search_data: precomputed proposals of VOC 2007
- context_proposals: precomputed context proposals
- pretrained_models
mkdir proposal
ln -s /path/to/downloaded/files/*.pkl proposal/
export NGPUS=1
python -m torch.distributed.launch --nproc_per_node=$NGPUS tools/train_net.py \
--config-file "configs/ctx/mist-reg-ctx.yaml" --use-tensorboard \
OUTPUT_DIR /path/to/output/dir
The pretrained models can be found at Google-drive. Note that all these model were trained using 1 Nvidia V100 GPU(32GB) and Pytorch 1.7.
Train data | Eval data | Config | Backbone | mAP |
---|---|---|---|---|
voc 2007 | voc 2007 test | ctx/mist-reg-ctx.yaml | VGG-16 | 54.2 |
voc 2012 | voc 2012 test | voc/mist-reg-ctx-voc12.yaml | VGG-16 | 48.3 |
Here is an example to evaluate the released model:
export NGPUS=1
python -m torch.distributed.launch --nproc_per_node=$NGPUS tools/test_net.py \
--config-file "configs/ctx/mist-reg-ctx.yaml" TEST.IMS_PER_BATCH 8 \
OUTPUT_DIR /path/to/output/dir \
MODEL.WEIGHT /path/to/model
This code is released under the Nvidia Source Code License.
This project is built upon wetectron, which is released under Nvidia Source Code License.