Flask + OpenCV + MobileNet SSD

Image for post
Image for post

Tech.

  • Flask
  • OpenCV
  • Heroku
  • Your Model (Machine Learning/Deep Learning)

Project

gunicorn is main modules for deploy to heroku, other modules and model up to your project. Install modules on your virtual environment

pip install flask  opencv-python numpy gunicorn
  • app.py | Object Detection API
  • index.html | POST Method to Object Detection API
  • index.js | Image Input for POST Method

Deploy

  • Procfile | commands to be executed for start server
  • Aptfile | Installing apt packages requires sudo
  • runtime.txt | python version on server
  • requirements.txt | This contains the list of modules
  • Add Buildpack

Heroku > Settings tab > Add Buildpack > https://github.com/heroku/heroku-buildpack-apt.git > Save Changes

Image for post
Image for post
  • Deploy

About

Nonpavit Detbun 🔋🍺

I’m Electrical Engineering. 📟 I have an interest in Web App, Mobile App, IoT and Microcontroller 🧐

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store