Read this in other languages: English, 日本語.
TM2Scratch connects Google Teachable Machine 2 with Scratch 3. You can use image, audio recognition on Scratch project(Please use TMPose2Scratch for pose recognition).
-
On Google Teachable Machine website, create an image classification model and upload it.
-
Copy the sharable link.
-
Open https://stretch3.github.io/ on Chrome browser.
-
Open "Choose an Extension" window and select "TM2Scratch".
-
Paste the shareble link into the text field of "image classification model URL" block.
- You can use the image recognition results with "when received image label" blocks.
-
On Google Teachable Machine website, create a sound classification model and upload it.
-
Copy the sharable link.
-
Open http://champierre.github.io/tm2scratch on Chrome browser.
-
Open "Choose an Extension" window and select "TM2Scratch".
-
Paste the shareble link into the text field of "sound classification model URL" block.
- You can use the sound recognition results with "when received sound label" blocks.
- NOTE The camera image that is trained on the Teachable Machine is a square, whereas the camera image that appears on the Scratch stage is a horizontal rectangle. Note that the horizontal edges of the camera image are ignored, and the image in the center is used to recognize. (This is not a problem as long as the object to be judged is in the center of the image.)
-
Setup LLK/scratch-gui on your computer.
% git clone git@github.com:LLK/scratch-gui.git % cd scratch-gui % npm install
-
In scratch-gui folder, clone TM2Scratch. You will have tm2scratch folder under scratch-gui.
% git clone git@github.com:champierre/tm2scratch.git
-
Run the install script.
% sh tm2scratch/install.sh
-
Run Scratch, then go to http://localhost:8601/.
% npm start