In this post, we will enable a robot named Vector to detect and recognize a large number of objects. In the end, you will see how he mentions the objects that he detected.
Vector is a cute robot, who can be your companion, and is powered by AI. He is curious, independent and also he can make you laugh with his actions. After all, you can customize it with using AI, and we will see how to make this robot detect and recognize various objects in our day to day life. If you want to know about Vector briefly, then please go through this short video.
The Vector SDK gives access to various capabilities of this robot, such as computer vision, Artificial intelligence and navigation. You can design your programs to make this robot imbibed with certain AI capabilities. Before running the module, install the vector SDK by following the information on this page: https://developer.anki.com/vector/docs/index.html.
Objects detected by Vector
Object Detection using Deep Learning
To detect objects, we will be using an object detection algorithm which is trained with [Google Open Image dataset]. The network consists of a ResNet with a Region proposal network and can detect more than 600 object categories. That means **Vector **will be able to identify a large number of objects. However, we have a few more dependencies to make Vector recognize those objects. The main dependencies are based on my testing platform using python 3.6, but you can change them according to the machine in which you will be implementing.
Here is a video of Vector detecting objects.
Running the Module
Please note that the robot and your computer should be connected to the same network. Now, you will be asked to enter your robot’s name, IP address and serial number, which you can find in the robot itself. Also, You will be asked for your Anki login and password which you used to set up your Vector.
Note: Before running this module please download the pre-trained model from here, and put it inside the data folder.
You will now see the following output, where Vector is searching for objects.
I can detect Car, Computer monitor, Human face, Computer monitor, Wheel.
The picture was taken by Vector to detect objects
The code below recieves the picture taken by Vector and calls the object_detection module to detect and identify various objects. Once detected, the object names are send back to vector so that he can speak out.
def get_classnames(image_path):
"""
This function calls the object detection library to detect 600 objects
:param image_path:
:return: class labels
"""
try:
classes = object_detection(image_path)
if len(classes) == 0:
return 'no objects'
class_list = []
for class_names in classes:
class_list.append(class_names)
print('Labels: {}'.format(classes))
return ', '.join(class_list)
except Exception as e:
print('Exception Handled', e)
#object-detection #artificial-intelligence #deep-learning #robotics #machine-learning #deep learning