# XifengGuo/CapsNet-Keras

A Keras implementation of CapsNet in NIPS2017 paper "Dynamic Routing Between Capsules". Now test error ＝ 0.34%.

Repository: https://github.com/XifengGuo/CapsNet-Keras
Canonical: https://ross.abutalabs.com/products/capsnet-keras
Language: Python
License: MIT
License Family: permissive
Topics: keras, capsnet, capsule, capsnet-keras, capsule-network, dynamic-routing
Last push: 2020-05-19T02:40:59+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 3229, "days_push": 2297, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2456, forks 645 (observed 2026-08-28T04:06:53.233227+00:00)

## What it is
A Keras implementation of CapsNet, the capsule network architecture from the NIPS 2017 paper 'Dynamic Routing Between Capsules', achieving ~0.34% test error on MNIST. It includes training, testing, and multi-GPU training scripts with pre-trained models available.

## Use cases
- implement capsule networks in keras
- reproduce capsnet results from the nips 2017 paper
- train a capsule network on mnist
- learn how dynamic routing between capsules works
- experiment with capsule network architectures
- test a pretrained capsnet model on new data

## When to choose
- you want a faithful, well-tested reproduction of the original CapsNet paper in Keras
- you need a reference implementation of dynamic routing for research or learning
- you want to benchmark capsule networks on MNIST

## When to avoid
- you need a production-ready or actively maintained deep learning library
- you use modern TensorFlow/Keras versions without switching to the tf2.2 branch
- you need capsule networks for datasets beyond MNIST without significant modification

## Facets
- artifact type: library
- maturity: maintenance
- function: machine-learning, deep-learning
- domain: machine-learning, deep-learning, computer-vision, image-processing
- platform: python
- tags: capsule-network, capsnet, keras, mnist, dynamic-routing, research-implementation, tensorflow, gpu

## Member repositories
- XifengGuo/CapsNet-Keras (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:53.233227+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:30:03.333813+00:00, confidence not recorded.
  - readme: https://github.com/XifengGuo/CapsNet-Keras (fetched 2026-08-28T04:06:53.233227+00:00, sha 29a1e3d7f5d9)
- Data as of 2026-08-30T08:39:29.467469+00:00.
