Home

Awesome

GoogLeNet for Image Classification

<!-- - **The inception structure** -->

Requirements

Implementation Details

For testing the pre-trained model

<!--- **LRN** -->

For training from scratch on CIFAR-10

Usage

ImageNet Classification

Preparation

Run

Go to examples/ and put test image in folder DATA_PATH, then run the script:

python inception_pretrained.py --im_name PART_OF_IMAGE_NAME

Train the network on CIFAR-10

Preparation

Train the model

Go to examples/ and run the script:

python inception_cifar.py --train \
  --lr LEARNING_RATE \
  --bsize BATCH_SIZE \
  --keep_prob KEEP_PROB_OF_DROPOUT \
  --maxepoch MAX_TRAINING_EPOCH

Evaluate the model

Go to examples/ and put the pre-trained model in SAVE_PATH. Then run the script:

python inception_cifar.py --eval \
  --load PRE_TRAINED_MODEL_ID

Results

Image classification using pre-trained model

Data SourceImageResult
COCO<img src='data/000000000285.jpg' height='200px'>1: probability: 1.00, label: brown bear, bruin, Ursus arctos<br>2: probability: 0.00, label: ice bear, polar bear<br>3: probability: 0.00, label: hyena, hyaena<br>4: probability: 0.00, label: chow, chow chow<br>5: probability: 0.00, label: American black bear, black bear
COCO<img src='data/000000000724.jpg' height='200px'>1: probability: 0.79, label: street sign<br>2: probability: 0.06, label: traffic light, traffic signal, stoplight<br>3: probability: 0.03, label: parking meter<br>4: probability: 0.02, label: mailbox, letter box<br>5: probability: 0.01, label: balloon
COCO<img src='data/000000001584.jpg' height='200px'>1: probability: 0.94, label: trolleybus, trolley coach<br>2: probability: 0.05, label: passenger car, coach, carriage<br>3: probability: 0.00, label: fire engine, fire truck<br>4: probability: 0.00, label: streetcar, tram, tramcar, trolley<br>5: probability: 0.00, label: minibus
COCO<img src='data/000000003845.jpg' height='200px'>1: probability: 0.35, label: burrito<br>2: probability: 0.17, label: potpie<br>3: probability: 0.14, label: mashed potato<br>4: probability: 0.10, label: plate<br>5: probability: 0.03, label: pizza, pizza pie
ImageNet<img src='data/ILSVRC2017_test_00000004.jpg' height='200px'>1: probability: 1.00, label: goldfish, Carassius auratus<br>2: probability: 0.00, label: rock beauty, Holocanthus tricolor<br>3: probability: 0.00, label: puffer, pufferfish, blowfish, globefish<br>4: probability: 0.00, label: tench, Tinca tinca<br>5: probability: 0.00, label: anemone fish
Self Collection<img src='data/IMG_4379.jpg' height='200px'>1: probability: 0.32, label: Egyptian cat<br>2: probability: 0.30, label: tabby, tabby cat<br>3: probability: 0.05, label: tiger cat<br>4: probability: 0.02, label: mouse, computer mouse<br>5: probability: 0.02, label: paper towel
Self Collection<img src='data/IMG_7940.JPG' height='200px'>1: probability: 1.00, label: streetcar, tram, tramcar, trolley, trolley car<br>2: probability: 0.00, label: passenger car, coach, carriage<br>3: probability: 0.00, label: trolleybus, trolley coach, trackless trolley<br>4: probability: 0.00, label: electric locomotive<br>5: probability: 0.00, label: freight car

Train the network from scratch on CIFAR-10

learning curve for training set

train_lc

learning curve for testing set

valid_lc

Author

Qian Ge