Home

Awesome

CapsNet-Fashion-MNIST

License

A Keras implementation of CapsNet in the paper:
Sara Sabour, Nicholas Frosst, Geoffrey E Hinton. Dynamic Routing Between Capsules. NIPS 2017

This code is adopted from CapsNet-Keras to test the performance of CapsNet on Fashion-MNIST

Contacts
Xifeng Guo
E-mail guoxifeng1990@163.com or WeChat wenlong-guo.

Usage

Step 1. Install Keras 2.0.9 with TensorFlow backend.

pip install tensorflow-gpu
pip install keras==2.0.9

Step 2. Clone this repository to local.

git clone https://github.com/XifengGuo/CapsNet-Fashion-MNIST.git
cd CapsNet-Fashion-MNIST

Step 3. Train a CapsNet on Fashion-MNIST

Training with default settings:

$ python capsulenet.py

Data preprocessing:

Results

Accuracy

Test Accuracy: 93.62%

Losses and accuracies:

Training Speed

About 120s / epoch on a single GTX 1070 GPU.

Reconstruction result

Top 5 rows are real images from MNIST and Bottom are corresponding reconstructed images.