Let's find a banana

https://youtu.be/CtqIv6fMpsM

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

Tensorflow.js

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.

https://youtu.be/CtqIv6fMpsM

JavaScript

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

https://github.com/tensorflow/models/blob/master/research/slim/nets/mobilenet_v1.md

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

The list of things that can be identified

http://image-net.org/challenges/LSVRC/2012/browse-synsets

https://github.com/starpentagon/python_scripts/blob/master/dataset/ILSVRC2012_class_name/ILSVRC2012_class_name.csv

Etc. will be helpful.