#Structure of this README
- Folder meanings
- Preparation for Training & Testing
- Tesing the models on ImageNet val2 data
- Training the models on ImageNet data
- Generating proposals.
The folder that contains the trained GBD-Net based on BN-Net. Training code is also provided.
The folder that contains the trained GBD-Net based on ResNet-269.
The caffe code used for learning and testing.
The folder that contains generated region proposal for training the models.
The python code used for testing. It contains images and region proposals.
The matlab code used for generating proposals.
Scripts used for fetching additional data from cloud drive.
- run fetch_data/fetch_eval_data.m to download test images and scripts.
- run fetch_data/fetch_BN_data.m to download pre-trained models for GBD-Net based on BN-Net.
- run fetch_data/fetch_ResNet_data.m to download pre-trained models for GBD-Net based on ResNet-269.
- run fetch_data/fetch_roi_data.m to download the generated proposals for training. You can generate the proposals by yourself, in this case please refer to README in proposal_gen folder.
There are two models released, GDB-Net based on BN-Net and GDB-Net based on ResNet-269. The following steps show how to test GDB-Net based on BN-Net, steps for ResNet-269 is slightly different.
-
Go to the "evaluation" folder. cd evaluation
-
modify the script "run_test_multiGPU_BN_GBD.sh". you can modify the "GPU" list to adapt your hardware configuration.
-
run the script. sh ./run_test_multiGPU_BN_GBD.sh
-
Concatnate the results into one res.txt file. Remember to delete former generated res.txt before concatnation. cat output/craft_ilsvrc/ilsvrc_2013_val2/BN_GBD_iter_120000/*.txt >> res.txt
-
Go to the "ILSVRC2014_devkit" folder. cd ILSVRC2014_devkit
-
modify the script "demo_eval_det.m", make sure that "pred_file" is pointed to "res.txt". pred_file = '../res.txt';
-
run "demo_eval_det.m" in matlab to evaluate, the mean AP is 53.5. >>run demo_eval_det
To Test the fast version of GBD-Net based on ResNet-269, the corresponding script is "run_test_multiGPU_ResNet_GBD_fast.sh", and the results are located in "output/craft_ilsvrc/ilsvrc_2013_val2/ResNet-269-GBD_iter_180000/*.txt"
The mean AP is 60.6.
To Test the accurate version of GBD-Net based on ResNet-269, the corresponding script is "run_test_multiGPU_ResNet_GBD_accurate.sh", and the results are located in "output/craft_ilsvrc/ilsvrc_2013_val2/ResNet-269-GBD_iter_180000/*.txt"
The mean AP is 63.7.
##--------- Training the GBD-Net model using ImageNet data ----------
-
Go to the folder "BN_1k". cd BN_1k
-
finetune the model by running the shell: sh ./finetune_all.sh
Note: Fintuning has two stages.
-
finetuning a multi-region BN-net from a pretrained BN-net, which is pretrain/bbox_256x256_ctx_32_multi_scale_full_polyak_7215_8933.caffemodel
-
finetuning the GBD-Net from the multi-region BN-net, which is models/BN_M_region_iter_120000.caffemodel
-
after the above two stages, the final model is models/BN_GBD_iter_120000.caffemodel
##------------------------- Generating proposals ------------------------- please refer to README in proposal_gen folder