Training the AlexNet on the Foreground and Background of ImageNet
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


The data generation code for the paper Object Reconition with and without Objects (

We provide the MATLAB code to generate the foreground image data and background image data of the ImageNet 2012, which are used for training the AlexNet in our paper.

You need the ImageNet 2012 training, val datasets and the xml bounding boxes annotations before you can run this code.

Brief descriptions here, while detailed comments are available inside the code.

Folder/File Description the README file
genimg.m to generate the foreground and background images given you have the images and object bounding box annotations.
imageratio.m to obtain the statistics of the object bounding boxes.
gentxt.m to generate the list for the lmdb generation with the offical Caffe code.

If you find this code useful for your research, please consider citing this paper via the .bibtex.

title={Object Reconition with and without Objects},
author={Zhu, Zhuotun and Xie, Lingxi and Yuille, Alan},