- Cloud or Edge?
Why not both?
Hello world it's Siraj and Intel recently released
a toolkit for developers called OpenVINO
to help build computer vision applications
that can be used at the Edge or in the Cloud.
OpenVINO stands for Open Visual Inference
and Neural Network Optimization.
The toolkit is available for
both Windows and Linux platforms
and it enables us to use convolutional neural networks
for computer vision at the Edge.
It also supports heterogeneous execution
across Intel's computer vision accelerators.
Using a common API for the CPU, Intel integrated graphics,
the Intel Movidius Neural Compute Stick,
which I already made a video about, and FPGA.
Basically develop once deploy anywhere.
And since computer vision can be difficult to master
it includes an easy to use library
of CV functions and pre-optimized kernels.
This can be applied to a whole range of applications.
Like face detection, object detection
and license plate recognition,
which we'll demo in this video.
Using these dependencies it's inference engine
can run Deep Learning models easily.
And it's model optimizer imports, converts
and optimizes models that were
trained in standard frameworks
into a format usable by Intel tools
like the Inference Engine.
If you don't feel like training your own model
the toolkit comes with a bunch
of different pre-trained models you can use.
At the low level the toolkit includes support
for both the OpenCV and OpenVX computer vision libraries.
Especially optimized for Intel hardware,
it also has an included Media SDK
that offers us access to hardware accelerated
video codex and frame processing.
And it enables the use of the popular OpenCL library
on the GPU or CPU for Intel processors.
Optimizing and deploying one
of these models is relatively easy.
First we just configure the model optimizer
for whichever framework we're using
including TensorFlow, Onyx, MXNet and Caffe.
Then we can convert a trained model
to produce an optimized intermediate representation
of the model based on the trained network topology,
weights and bias values.
We can then test the model in
the intermediate representation format
using the inference engine in the target environment
via either the provided
inference engine validation application or
one of several sample applications.
Lastly we can integrate the inference engine
into our application to deploy
the model in the target environment.
So let's demo the example of using OpenVINO
to perform vehicle detection.
Which will detect a car and it's license plate.
We'll want to use a pre-trained model for this.
Specifically the faster RCNN model.
This is actually two neural networks
a regional proposal network that generates region proposals
and a network using these proposals to detect objects.
The output of the RPN is a bunch of boxes
that will be examined by a classifier and regressor
to eventually check the occurrence of objects.
The RPN thus predicts the possibility
of a box being background or foreground and refines it.
In the first step the input image goes through
the convolutional network which will output
a set of convolutional feature maps
on the last convolutional layer.
Then a sliding window is run spatially
on these feature maps.
For each of sliding window a set of nine anchor boxes
are generated which all have the same center
but with three different aspect ratios
and three different scales.
Lastly the spatial features extracted
from these convolutional feature maps
are given to a smaller network
which has two tasks, classification and regression.
The output of the regressor decides
the predicted bounding box.
The output of the classification sub-network
is a probability P indicating
weather the predicted box contains
an object or it's from a background.
We can download the weights, metadata and model weights
directly from GitHub and Dropbox respectively.
It's a Caffe model.
So we can run it though the model optimizer
using the following command in terminal.
This will create an intermediate representation
that our inference engine can serve.
When we run the application we'll receive
an output file labeled 0.bmp.
When we open that file we'll see the detected car
enclosed in rectangles.
It outputs the list of classes of the detected objects
along with the respected confidence values
and the co-ordinates of the rectangles
in the the standard output stream.
As you can see this high performance library
makes computer vision really simple for anyone to try.
I've linked to some great resources
to learn more in the video description
including a link to the free download
on the OpenVINO website.
Please subscribe for more programing videos.
And for now I've got to keep
an open source so thanks for watching.