Coder Social home page Coder Social logo

googlecreativelab / teachable-machine-v1 Goto Github PK

View Code? Open in Web Editor NEW
3.8K 150.0 598.0 3.99 MB

Explore how machine learning works, live in the browser. No coding required.

Home Page: https://g.co/teachablemachine

License: Apache License 2.0

Python 1.04% HTML 11.95% JavaScript 70.29% Stylus 16.71%
teachable-machine machine-learning

teachable-machine-v1's Introduction

Teachable Machine

About

Teachable Machine is an experiment that makes it easier for anyone to explore machine learning, live in the browser – no coding required. Learn more about the experiment and try it yourself on g.co/teachablemachine.

The experiment is built using the TensorFlow.js library.

We have also released a boilerplate version of this project that can be used as a starting point for your own projects: googlecreativelab/teachable-machine-boilerplate

Development

Install dependencies by running (similar to npm install)

yarn

Build project

yarn build

Start local server by running

yarn run watch

Code Styles

  • 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

To run https locally:

https is required to get camera permissions to work when not working with localhost

  1. 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
  1. Use yarn run watch-https
  2. Go to https://YOUR_IP:3000, then accept the insecure privacy notice, and proceed.

Credit

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.

teachable-machine-v1's People

Contributors

halfdanj avatar lassse avatar mathiasburger avatar mrayinteractive avatar oxinarf avatar vatz88 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

teachable-machine-v1's Issues

How can I add one or more new classes to train?

It's only 3 classes in the origin, then I want to train more classes.
Is it possible?
I found the green, purple, orange, and red in the code, but the red one wasn't used, maybe we can use it?
But I'm poor in it, so I don't know how to modify this project to train more.
May anyone help me with this?
thx.

installation problem

Hello,
I want to know how can i install teachable machine v1 in my vps server on my domain name.. do you have any browser based code which can directly be put on my server..? Please guide me for installation ...

how?

How to add artificial intelligence to your site for recognition of movement?

How to save the training model?

Nice project! But I have a question ...
If I finished three steps, how do I see this trained model after I refreshing the browser?
Did deeplearn provide output model api?

How can i make the gif images localization?

I want to use the local images in my computer as the output rather than the url link and i have already modified the url path which exits in the GIFOutput.js to the local images path ,but i still cannot see anything from the output. How can i do?

Unable to request for camera access when running program

I downloaded the zip and executed the commands to install, build and run. it loaded the page in browser automatically. It's unable to request for camera access. Here the screenshot. I tried clicking on refresh page link but still the same issue

image

Gifler not found error

I am trying to build this project
getting error Cannot find module gifler from .....\src\ouputs
Please help in this

Classes show NAN% in pose model

I am facing a nan issue in teachable machine, when I created the pose model and added an input to it, in all the classes the output shows NAN%

Model Link: https://teachablemachine.withgoogle.com/models/IAGVleru7/

This is the output
image

I tried clearing the cache, also tried running it in incognito mode and also on different browsers. Kindly help me in understanding why this issue occurs and what should be fix for this. Thanks in advance

issue with yarn

I typed yarn in terminal. but this error popes out.
ERROR: There are no scenarios; must have at least one.
Do I have to install some other thins?
PS: I run the code on my Ubuntu 16.04 system locally.
Thanks:-)

How to join 2 image models?

Hi! I was wondering, how can I join 2 trained model data together? e.g my friend wants me to help with training AI to recognize some objects. I know we could take and share photos but is there any other clever way? Maybe joining JSON data?

Prototype Pollution in minimist #48

minimist@^1.2.6:
version "1.2.6"
Minimist <=1.2.5 is vulnerable to Prototype Pollution via file index.js, function setKey() (lines 69-95).

how can i change the sound output ?

hello ,this is tony from taiwan . I'm a college student . I have some question about your projrct-Teachable Machine . I tried use your source code from github to change the sound output. But it doesn't work . How can i do to change the output?

Cannot find module 'gifler'

Hello,
I am trying to run the code, but I got an error which it can find module gifler.

Could you please let me know how to add gifler module in npm.

Cheers,

Exporting the trained model

Hi guys,

You have said you are releasing a more awesome teachable machine tool: https://teachablemachine.withgoogle.com/io19 and i can't wait to see that.

I have emailed to get access to a BETA version, and i hope i do :) but wanted to know if there is any way of exporting the trained model with the boilerplate at the moment or with this version.

I want to be able to train the system to recognize a specific object, but have no idea how to export the model from the current web tool.

Any help would be greatly appreciated.

Thank you,

Alex

a amazing question

when i first press the button train_green,it is only take one picture.And then I push the button again and nothing happens.the only way to let it record another picture is press the button record a video and close it.
as i spend almost 10 mins to input nearly 30+ picture but sadly to find no output.it doesnot work

Input Shape of the Pose Model

I trained a Pose Model for two classes. I trained it for experimenting on some random labels. I want to run inference on this tfjs model but the model accepts float32[?,14739] as input. Usually, all the image models accept input in these formats:

  1. Tensorflow format: [batch_size, height, width, channels]
  2. PyTorch format: [batch_size, channels, height, width]

The model doesn't accept input in any of the above format. Am i missing something here?

How did I check the input shape?

  1. Download the *.zip file of the model
  2. Unzip the file.
  3. Open netron.app
  4. Upload the model.json file on the netron.app

Link to Pose Model: https://teachablemachine.withgoogle.com/models/irJWnCc6c/

Error in Exporting Model (Error:413)

Bug Description

Exporting TensorFlow lite model through EdgeTPU conversion type results in a prolonged process of conversion and results with
displaying

" Something went wrong while converting "

and a broken model

https://drive.google.com/file/d/1O3HhCxMbqixNShY_eVZraVn49MyqEicq/view?usp=sharing

Is there any other way to export my model as EdgeTPU Tflite model

This is the drive link to my project

https://drive.google.com/drive/folders/1ZoDo504F0sL0PYXB972Ronwl4yLh-qFO?usp=sharing

Screenshots

Teachable Machine Issue

Teachable Machine Issue 2

Desktop :

OS: Linux Ubuntu 20.04
Google Chrome
Version 88.0.4324.150 (Official Build) (64-bit)
Additional context

Please rectify the problem and eradicate the bug as soon as possible

Model is not updated even upload to cloud is succeeded

Repro steps

  1. https://teachablemachine.withgoogle.com/train/image
  2. Create two classes of rock, paper
  3. Train model
  4. Export model -> Upload model
  5. copy url and open it in another browser tab. You can see there's only 2 classes of rock, paper
  6. Now in teachable machine, add another class of scissors
  7. Train model
  8. Export model -> Update cloud model
  9. copy url and open it in another browser tab.

Expected

  • 3 classes of rock, paper, scissors are shown

Actual

  • image
  • but the metadata.json has 3 classes
  • after few hours (even 24 hrs), it'is not reproduced and shows 3 classes correctly

Any idea how to add serialport to this project?

Hi,
I am not quite familiar with JavaScript, but I and Damon [one of my friends] thought it would be even more amazing if we can add serial port to the output of the system so that we can send some characters to the Arduino.

I tried something on npm, but constantly get an error to import serialport to the output class.

Any idea or thought?

Thanks
Mohsen

ai teachable machine

can anyone teach me how to edit more commant such as jump or other comman(instructions).
like put more function to a robot not only left, right , center

Any instrucctions to run with PM2 or similar?

First of all, kudos on this amazing machine learning example.

We are working on localizing it for LATAM, it's an invaluable resource that we want to use it to show what machine learning is capable of doing.

Since we are expecting some traffic, budo doesn't seem like the right choice, so we are trying to serve it using PM2, with no success.

Do you have any suggestions/alternatives?

Can't run teachable machine, on ubuntu 16.04 - asus GL 552 VW

i wan't to run teachable machine on my laptop (ubuntu GNOME 16.04 - ASUS ROG GL-552VW), but i found this error code :

/home/gnome/Downloads/machine/node_modules/stylus/bin/stylus:715
if (err) throw err;
^

Error: ENOENT: no such file or directory, open 'public/style.css'
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] style-build: stylus -c -u nib style/main.styl -o public/style.css
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] style-build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /home/gnome/.npm/_logs/2018-06-30T06_37_18_031Z-debug.lo

what should i do? can someone help he.
-sorry about my english

App gets stuck after training on ChromeOS

Using ChromeOS, after training the model the app doesn't seem to respond to input and gets "stuck" with the same confidence and output that it had calculated during the last training click. I've tested on multiple Chromebooks and they all have this issue. Using the Chrome browser on Windows (7 and 10) things work as expected.

Will you be open sourcing V2?

I saw that there is a new version of Teachable Machine with Pose Estimation and other goodies. Will you be open sourcing that too? I see that the Community repository has some related code, but not enough to get clueless people started building forks of Teachable Machine

Browser not supported

Hello,

I installed the newest version of google chrome and it is not supported.

I have tried all other browsers such as Brave and Safari but none of them work.

Kindly assist me.
Screenshot 2021-09-10 at 18 36 56

QUESTION: How secure is it to train with sensitive images? Is it all done locally?

I didn't see any uploading in the network tabs and have not found anything yet in the code where the images were being uploaded anywhere. Is the training all done locally?

I was wanting to train the model to detect blurry images of documents, but the training material has personally identifying information and I want to me 100% sure its safe

Camera access blocked on Windows10 chrome

I'm facing this weird issue on Windows 10 chrome, chrome doesn't allow camera to be accessed and this project mainly needs camera to work. I get Uncaught Error: This browser does not support WebGL. in the console.

This worked fine on Mac but not on windows 10.

A saved model now only picks one category when it worked well about a month ago

This model distinguishes between my left and right hand: https://teachablemachine.withgoogle.com/models/X3b80T2Ho/

It now reports either hand as right and yet it worked a few weeks ago. Both were trained with the same lighting, background etc just a minute apart. Flipping the camera input image has no effect.

I just retrained a model in the same way and this one works fine: https://teachablemachine.withgoogle.com/models/0O5MUcOjY/

Why would the old model stop working?

I am unable to export

I have been trying to export a quantized model, each time I get a something went wrong error.
This is very urgent and time sensitive, please advice.

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.