Giter Site home page Giter Site logo

danilopetrocelli / capsnet-traffic-sign-classifier Goto Github PK

View Code? Open in Web Editor NEW

This project forked from thibo73800/capsnet-traffic-sign-classifier

0.0 2.0 0.0 1.34 MB

A Tensorflow implementation of CapsNet(Capsules Net) apply on german traffic sign dataset

License: Apache License 2.0

Jupyter Notebook 95.27% Python 4.73%

capsnet-traffic-sign-classifier's Introduction

Capsnet - Traffic sign classifier - Tensorflow

A Tensorflow implementation of CapsNet(Capsules Net) apply on the German traffic sign dataset

Contributions welcome License completion

This implementation is based on this paper: Dynamic Routing Between Capsules (https://arxiv.org/abs/1710.09829) from Sara Sabour, Nicholas Frosst and Geoffrey E. Hinton.

This repository is a work in progress implementation of a Capsules Net. Since I am using a different dataset (Not MNIST) some details in the architecture are different. The code for the CapsNet is located in the following file: caps_net.py while the whole model is created inside the model.py file. The two main methods used to build the CapsNet are conv_caps_layer and fully_connected_caps_layer

Requirements

  • Python 3
  • NumPy 1.13.1
  • Tensorflow 1.3.0
  • docopt 0.6.2
  • Sklearn: 0.18.1
  • Matplotlib

Install

$> git clone https://github.com/thibo73800/capsnet_traffic_sign_classifier.git
$> cd capsnet_traffic_sign_classifier.git
$> wget https://d17h27t6h515a5.cloudfront.net/topher/2017/February/5898cd6f_traffic-signs-data/traffic-signs-data.zip
$> unzip traffic-signs-data.zip
$> mkdir dataset
$> mv *.p dataset/
$> rm traffic-signs-data.zip

Train

$> python train.py -h
$> python train.py dataset/

During the training, the checkpoint is saved by default into the outputs/checkpoints/ folder. The exact path and name of the checkpoint is print during the training.

Test

In order to measure the accuracy and the loss on the Test dataset you need to used the test.py script as follow:

$> python test.py outputs/checkpoints/ckpt_name dataset/ 

Metrics / Tensorboard

Accuracy:

  • Train: 99%
  • Validation: 98%
  • Test: 97%

Checkpoints and tensorboard files are stored inside the outputs folder.

Exemple of some prediction:

capsnet-traffic-sign-classifier's People

Contributors

thibo73800 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.