Giter Site home page Giter Site logo

traffic-sign-classification's Introduction

Traffic sign classifier

Traffic Sign Recognition Classifier capstone project for Machine Learning Zoomcamp course: https://github.com/alexeygrigorev/mlbookcamp-code/tree/master/course-zoomcamp/12-capstone.

Introduction

The main goal is build a model to classify traffic signs with Convolutional Neural Network.

Dataset

The dataset we’ll be using to train our own custom traffic sign classifier is the German Traffic Sign Benchmark https://www.kaggle.com/valentynsichkar/traffic-signs-preprocessed.

About the dataset

The German Traffic Sign Benchmark is a multi-class, single-image classification challenge held at the International Joint Conference on Neural Networks (IJCNN) 2011. We cordially invite researchers from relevant fields to participate: The competition is designed to allow for participation without special domain knowledge. Our benchmark has the following properties:

  • Single-image, multi-class classification problem
  • More than 40 classes
  • More than 50,000 images in total
  • Large, lifelike database

Credits

Copy of the datase

Labels:

Sample of dataset

43 Classes of German TrafficSign

Notebook

What you'll find in the notebook

  • Data preparation and cleaning
  • Model creation
    • generator and training
    • model metrics
  • Data augmentation
  • model fitting
  • Export model in h5
  • Load model and evaluation
  • Predict
  • Covert model in tslite from h5

Local deploy

Python required. For more see: https://packaging.python.org/tutorials/installing-packages/.

Install & run

in /src dir:

pip install pipenv
pipenv install
pipenv shell
python predict.py

Test

curl --location --request POST 'http://localhost:9696/predict' \
--header 'Content-Type: application/json' \
--data-raw '{
    "url": "http://clipart-library.com/images/gieERjykT.jpg"
}'

Deploy

Docker

docker build -t traffic-sign-classifier-prediction ./src
docker run -it -p 9696:9696 traffic-sign-classifier-prediction:latest

Deploy to heroku

Heroku account needed. Install heroku cli.

Docker file

Update docker file:

#ENTRYPOINT ["gunicorn", "--bind=0.0.0.0:9696", "predict:app"] 
ENTRYPOINT ["gunicorn", "predict:app"]

login

heroku login heroku container:login

create app in heroku

heroku create your-app-name

Push docker image to Heroku

heroku container:push web -a your-app-name

Deploy container on Heroku

heroku container:release web -a your-app-name

Launch app

Test is up: https://your-app-name-xyz.herokuapp.com/heartbeat

LICENSE

LICENSE

traffic-sign-classification's People

Contributors

ceccode avatar

Stargazers

Roman 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.