loading...
Cover image for Image recognition and Classification

Image recognition and Classification

akhilaku profile image AKHILDAS KS ・3 min read

My Final Project- Image Recognition and Classification-Using Intel Movidius Neural Compute Stick(NCS)-2 and Raspberry Pi-3

Overview / Usage

The Intel Movidius Neural Compute Stick(NCS) is produced by Intel and can be run without an internet connection. This Movidius NCS's compute capability comes from its Myriad 2 Vision Processing Unit(VPU).

Profiling, tuning and compiling a DNN on a development computer with the tools are provided in the Intel and can be run without an Internet connection. The Movidius NCS's compute capability comes from its Myriad 2 VPU(Vision Processing Unit). Running Deep Learning (DL) models efficiently on a low capacity graphic processors is very difficult. Movidius allows us to optimize the operation of large models such as GoogleNet with multi-use support. It's an easy to use kit that allows you to design and implement applications such as classification and object recognition on physical products.

We can simply think of Movidius NCS's as a Graphic Processing Unit(GPU) running on a USB. Model training isn't performed on device, but a trained model can work optimally on the unit, which is intended to be used in physical environments for resting purposes.

Methodology / Approach

With the help of Intel Movidius Neural Compute USB Stick with Raspberry Pi-3 we are using it for image classification and an object recognizing application. The frameworks, standards, technique used are:

It can be used in Ubuntu 16.04 or Raspberry Pi-3.
It is compatible with two DNN frameworks such as TensorFlow and Caffe
Movidius Myriad 2 Vision Processing Unit(VPU) works with Caffe based Convolutional Neural Networks(CNN).
We can also run complex Deep Learning(DL) pre-trained models like GoogleNet, SqueezeNet, AlexNet on systems with low processing capability.

Approach:

It's very simple to run inference on an image classification demo model. We can use the NC App Zoo repo for classifying an image. We need to take the graph file to activate the application of the Movidius NCS. It has a compiled GoogleNet model for ready to run. This application needs some files. The make command is used for creating the files that Movidius needs as a graph file. The graph files is a demo of image-classifier.

View the steps below for a quick application:

STEPS:

Step 01: For using the property of the NCSDK API add (import) the mvnc library.

Step 02: You can access the Movidius NCS using an API like any other USB device. Also you can use parallel Movidius devices at once if you need more capacity to compute your model. For now, one kit is enough for this application. Select and open process.

Step 03: We will use a pre-trained GoogleNet model for using a compiled graph file.

Step 04: We also need to do some pre-processing before loading the image into our Movidius NCS.

Step 05: Use LoadTensor() to load the image into the Movidius.

Step 06: Give the input image to the pre-trained model and get the output by using GetResult().

Step 07: Print the prediction of the model's output and corresponding labels. Here we also display the input image at the same time.

Step 08: For the last step, we clear and shutdown the Movidius NCS device for using it again.

Link to Code

Click Here

Why I built it?

My main intention is to help the blind people to recognize or classify the images in front of them, so that they can interact to the surrounding in a better way by forgetting about their disabilities.

Additional Thoughts:

I would like to improve this project into a next level by converting the images to speech so that they can the device can interact more to the person with blindness.

Thankyou!

Posted on by:

akhilaku profile

AKHILDAS KS

@akhilaku

I'm Machine Learning, Deep Learning Enthusiast with very high interest in solving real life problems with technologies.

Discussion

markdown guide