Skip to content

TensorFlow implementation of GoogLeNet and Inception for image classification.

License

Notifications You must be signed in to change notification settings

conan7882/GoogLeNet-Inception

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GoogLeNet for Image Classification

Requirements

Implementation Details

  • 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.

Results

result of VGG19 for the same images can be found here.

The pre-processing of images for both experiments are the same.

  • Image classification on ImageNet

  • Images from my photo collection

Usage

Download pre-trained model

Download the pre-trained parameters here.

Config path

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.

ImageNet Classification

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.

About

TensorFlow implementation of GoogLeNet and Inception for image classification.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages