Let's find a banana


Let's recognize things other than humans.You can make a robot that reacts to bananas and lemons.


The obniz block program can recognize objects using Google's machine learning library Tensorflow.js.It is the recognition of "banana" and "ballpoint pen".

JavaScript can recognize 1000 types, but block programs allow you to select several types around you.

Get closer to the banana and away from the pumpkin ghost

Let's actually program it.
Check what is in the camera in the loop.
If the camera shows a banana, move it forward and
If it's a Jack O Lantern (pumpkin ghost), move it backwards.

If neither is the case, try to stop.

If you move this and show the banana to the robot, it will come closer, and if you show the pumpkin ghost, it will move away.



The model of Tensorflow.js used this time is mobile net.


If you use it with JavaScript, you can identify more (1000 types).

The list of things that can be identified



Etc. will be helpful.