A helpful webapp that helps you develop better habits. It watches you through your webcam, and sends image frames at the specified interval to the web service of your choice (presumably some kind of computer vision model). If that call returns a specified label, a sound is played.
- Clone this repo
yarn start
- In your browser, allow autoplay for
localhost
(in Safari this is underPreferences/Websites/Auto-Play
) - Aim your browser at
http:localhost:8888
- Accept the request to access your webcam (Safari will ask every time)
- Enter in the URL of your web service (must return a JSON object of the form
{ "outputs": { "Prediction": LABEL } }
) - Enter the label that should play the sound
- Enter in a polling interval in milliseconds (currently no less than 100)
The code that grabs images from video is from the MDN sample at https://github.com/mdn/samples-server