Code Monkey home page Code Monkey logo

ml4pi's Introduction

ml4pi

A tiny framework for doing machine learning on Raspberry Pi.

Setup the Pi

Download the latest version of Raspbian and flash your micro SD card with Etcher

Add blank file called ssh into the root of the SD disk and a file called wpa_supplicant.conf containing the following (replace with your wifi details):

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

network={
    ssid="YOUR_WIFI_NETWORK"
    psk="YOUR_WIFI_PASSWORD"
}

In terminal ssh into the pi:

Default password is 'raspberry'. To change password use the passwd command.

Update the pi:

sudo apt-get update && sudo apt-get upgrade

Install nodejs:

sudo apt-get install nodejs npm git-core

Optional: install nettalk for easy file sharing:

sudo apt-get install netatalk

Reboot:

sudo reboot

Install software

Install pre-requisites:

sudo apt install libatlas-base-dev libjasper-dev libqtgui4 libqt4-test libhdf5-dev

Make sure you enable your camera through sudo raspi-config. Reboot again afterwards.

Clone this library:

git clone https://github.com/ml4a/ml4pi

Install all the required python libraries:

cd ml4pi
pip3 install -r requirements.txt 

Try running the interactive trainer:

python3 train_webcam.py

Todo

  • get picamera at faster fps
  • train from a directory of images
  • saving/loading models
  • deployment script (load model, then continuously predict samples)

Training a dataset from a folder of images

(not finished yet)

Example is using a dataset which can be obtained:

wget http://www.vision.caltech.edu/Image_Datasets/Caltech101/101_ObjectCategories.tar.gz
tar -xzf 101_ObjectCategories.tar.gz

ml4pi's People

Contributors

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