GoogLeNet Inception
1.0.0
src/nets/googlenet.py
.src/models/inception_module.py
.examples/inception_pretrained.py
.examples/inception_cifar.py
.For testing the pre-trained model
For training from scratch on CIFAR-10
inception_5a
, this makes the multi-scale structure of inception layers less useful and harm the performance (around 80% accuracy). To make full use of the multi-scale structures, the stride of the first convolutional layer is reduced to 1 and the first two max pooling layers are removed. The the feature map (32 x 32 x channels) will have almost the same size as described in table 1 (28 x 28 x channel) in the paper before fed into inception_3a
. I have also tried only reduce the stride or only remove one max pooling layer. But I found the current setting provides the best performance on the testing set.examples/inception_pretrained.py
: PRETRINED_PATH
is the path for pre-trained model. DATA_PATH
is the path to put testing images.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
--im_name
is the option for image names you want to test. If the testing images are all png
files, this can be png
. The default setting is .jpg
.examples/inception_cifar.py
: DATA_PATH
is the path to put CIFAR-10. SAVE_PATH
is the path to save or load summary file and trained 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
SAVE_PATH
. One pre-trained model on CIFAR-10 can be downloaded from here.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
99
, which indicates the one I uploaded.Data Source | Image | Result |
---|---|---|
COCO | 1: probability: 1.00, label: brown bear, bruin, Ursus arctos 2: probability: 0.00, label: ice bear, polar bear 3: probability: 0.00, label: hyena, hyaena 4: probability: 0.00, label: chow, chow chow 5: probability: 0.00, label: American black bear, black bear |
|
COCO | 1: probability: 0.79, label: street sign 2: probability: 0.06, label: traffic light, traffic signal, stoplight 3: probability: 0.03, label: parking meter 4: probability: 0.02, label: mailbox, letter box 5: probability: 0.01, label: balloon |
|
COCO | 1: probability: 0.94, label: trolleybus, trolley coach 2: probability: 0.05, label: passenger car, coach, carriage 3: probability: 0.00, label: fire engine, fire truck 4: probability: 0.00, label: streetcar, tram, tramcar, trolley 5: probability: 0.00, label: minibus |
|
COCO | 1: probability: 0.35, label: burrito 2: probability: 0.17, label: potpie 3: probability: 0.14, label: mashed potato 4: probability: 0.10, label: plate 5: probability: 0.03, label: pizza, pizza pie |
|
ImageNet | 1: probability: 1.00, label: goldfish, Carassius auratus 2: probability: 0.00, label: rock beauty, Holocanthus tricolor 3: probability: 0.00, label: puffer, pufferfish, blowfish, globefish 4: probability: 0.00, label: tench, Tinca tinca 5: probability: 0.00, label: anemone fish |
|
Self Collection | 1: probability: 0.32, label: Egyptian cat 2: probability: 0.30, label: tabby, tabby cat 3: probability: 0.05, label: tiger cat 4: probability: 0.02, label: mouse, computer mouse 5: probability: 0.02, label: paper towel |
|
Self Collection | 1: probability: 1.00, label: streetcar, tram, tramcar, trolley, trolley car 2: probability: 0.00, label: passenger car, coach, carriage 3: probability: 0.00, label: trolleybus, trolley coach, trackless trolley 4: probability: 0.00, label: electric locomotive 5: probability: 0.00, label: freight car |
learning curve for training set
learning curve for testing set
Qian Ge