https://github.com/xifengguo/capsnet-fashion-mnist
Capsule Network on Fashion MNIST dataset
https://github.com/xifengguo/capsnet-fashion-mnist
capsnet capsnet-keras fashion-mnist keras tensorflow
Last synced: 19 days ago
JSON representation
Capsule Network on Fashion MNIST dataset
- Host: GitHub
- URL: https://github.com/xifengguo/capsnet-fashion-mnist
- Owner: XifengGuo
- License: mit
- Created: 2017-11-07T04:56:09.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-12-01T05:44:32.000Z (over 7 years ago)
- Last Synced: 2025-04-09T10:34:04.620Z (about 2 months ago)
- Topics: capsnet, capsnet-keras, fashion-mnist, keras, tensorflow
- Language: Python
- Size: 133 KB
- Stars: 98
- Watchers: 13
- Forks: 47
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CapsNet-Fashion-MNIST
[](https://github.com/XifengGuo/CapsNet-Keras/blob/master/LICENSE)A Keras implementation of CapsNet in the paper:
[Sara Sabour, Nicholas Frosst, Geoffrey E Hinton. Dynamic Routing Between Capsules. NIPS 2017](https://arxiv.org/abs/1710.09829)This code is adopted from [CapsNet-Keras](https://github.com/XifengGuo/CapsNet-Keras.git) to test
the performance of CapsNet on [Fashion-MNIST](https://github.com/zalandoresearch/fashion-mnist)**Contacts**
[Xifeng Guo](https://xifengguo.github.io/)
E-mail `[email protected]` or WeChat `wenlong-guo`.## Usage
**Step 1.
Install [Keras 2.0.9](https://github.com/fchollet/keras)
with [TensorFlow](https://github.com/tensorflow/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:
- scale pixel values to `[0,1]`;
- shift 2 pixels and horizontal flipping augmentation.
## 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.