Train a neural network with your webcam and control a robot.
On the browser, this project uses an adapted version of Google's Teachable Machine experiment. To control the robot, it uses Machina Bridge, a WebSocket server that receives Machina instructions and sends them to a robot.
You can configure Teachable Machina using config.js.
Connect to the robot with Machina Bridge
- Execute
Machina-Bridge_v0.1.0/MachinaBridge.exe
. - Choose the make of your robot (e.g., UR).
- Write the local IP of your robot (e.g., 192.168.0.172).
- Click
Connect
. - (The Machina Bridge app should be now connected to the robot.)
yarn
yarn build
yarn run watch
- There’s a pre-commit hook set up that will prevent commits when there are errors
- Run
yarn eslint
for es6 errors & warnings - Run
yarn stylint
for stylus errors & warnings
https is required to get camera permissions to work when not working with localhost
- Generate Keys
openssl genrsa -out server.key 2048
openssl req -new -x509 -sha256 -key server.key -out server.cer -days 365 -subj /CN=YOUR_IP
- Use
yarn run watch-https
- Go to
https://YOUR_IP:3000
, then accept the insecure privacy notice, and proceed.
Teachable Machina is based on Teachable Machine. You can learn more about the original experiment and try it yourself on g.co/teachablemachine. The experiment is built using the deeplearn.js library. There is also released a boilerplate version of this project that can be used as a starting point for your own projects: googlecreativelab/teachable-machine-boilerplate
This is not an official Google product, but an experiment that was a collaborative effort by friends from Støj, Use All Five and Creative Lab and PAIR teams at Google.