This is the official PyTorch implementation of FI-WSOD (2022 TMM). [PDF]
This implementation can achieve the performance of 56.4% mAP and 72.4% CorLoc on VOC2007 dataset.
FI-WSOD: Foreground Information Guided Weakly Supervised Object Detection (IEEE Transactions on Multimedia)
Yufei Yin, Jiajun Deng, Wengang Zhou, Li Li, and Houqiang Li.
Check INSTALL.md for installation instructions.
Check DATASETS.md for dataset preparation.
Check MODEL_ZOO.md for pretrained models. Pretrained model needs to be downloaded.
The final structure of data/ are as follows:
data/
data/pretrained_model/
data/selective_search_data/
data/VOC2007/Train an FI-WSOD network on VOC2007 (Only support single-gpu training).
CUDA_VISIBLE_DEVICES=0 python tools/train_net_step.py --dataset voc2007 \
--cfg configs/vgg16_voc2007_fiwsod.yaml --bs 1 --nw 4 --iter_size 4Test an FI-WSOD network on VOC2007 (Only support single-gpu testing).
python tools/test_net.py --cfg configs/vgg16_voc2007_fiwsod.yaml \
--load_ckpt $MODEL_PATH \
--dataset voc2007test
# (Optional)
python tools/reeval.py $TEST_DIR/detections.pkl \
--dataset voc2007test --cfg configs/vgg16_voc2007_fiwsod.yaml python tools/test_net.py --cfg configs/vgg16_voc2007_fiwsod.yaml \
--load_ckpt $MODEL_PATH \
--dataset voc2007trainval
python tools/reeval.py $TEST_DIR/discovery.pkl \
--dataset voc2007trainval --cfg configs/vgg16_voc2007_fiwsod.yaml \
--style corloc$OUTPUT_DIR = output/fiwsod/
$CONFIG_NAME = vgg16_voc2007_fiwsod
$MODEL_NAME = model_step39999.pth
$STEP = model_step39999
$MODEL_PATH = $OUTPUT_DIR/$CONFIG_NAME/ckpt/$MODEL_NAME
$TEST_DIR = $OUTPUT_DIR/$CONFIG_NAME/test/$STEPYou can change them in configs/vgg16_voc2007_fiwsod.yaml
If you find this code useful for your research, please use the following BibTeX entry.
@article{yin2022fi,
title={FI-WSOD: Foreground Information Guided Weakly Supervised Object Detection},
author={Yin, Yufei and Deng, Jiajun and Zhou, Wengang and Li, Li and Li, Houqiang},
journal={IEEE Transactions on Multimedia},
year={2022},
publisher={IEEE}
}
The codes are based on PCL. Thanks for the wonderful work!
