- TensorFlow implementation of Going Deeper with Convolutions (CVPR'15).
- Python 3.3+
- Tensorflow 1.0+
- TensorCV
- The GoogLeNet model is defined in
lib/models/googlenet.py
. - Inception module is defined in
lib/models/inception.py
. - An example of image classification using pre-trained model is in
example/pre_trained.py
. - The pre-trained model on ImageNet can be downloaded here.
- When testing the pre-trained model, images are rescaled so that the shorter dimension is 224. This is not the same as the original paper which use 144 224x224 crops per image for testing. So the performance will not be as good as the original paper. However, it is easy to add a pre-processing step to obtain the 144 crops and test the classification performance.
result of VGG19 for the same images can be found here.
The pre-processing of images for both experiments are the same.
Download the pre-trained parameters here.
All directories are setup in example/setup_env.py
.
PARA_DIR
is the path of the pre-trained model.SAVE_DIR
is the directory to save graph summary for tensorboard.DATA_DIR
is the directory to put testing images.
Put test image in folder setup_env.DATA_DIR
, then go to example/
and run the script:
python pre_trained.py --type IMAGE_FILE_EXTENSION(.jpg or .png or other types of images)
The output are the top-5 class labels and probabilities, and the top-1 human label. The structure of GoogLeNet can be viewed through TensorBoard and the summary file is saved in setup_env.SAVE_DIR
.