Welcome back to the OpenVINO channel
This is a very nice new demo from OpenVINO, developed with intel Labs..
We see the world in 3 dimensions,
The depth that we all think we can see is a trick of our brain
Our brain is taking the slightly different images taken by our 2 eyes and extrapolate the depth.
But, think about it, even if you close one eye and look at that image
you can clearly identify the depth
Because we have learned to identify it based on shadows,
the relative sizes of the objects and so on..
This demo is based on the work done by Intel lab,
You can find all the details in the documentation and by reading the article..
Interesting how they were able to mix different 3D data-sets, including 3D movies
to get to a pretty impressive depth detection results..
As far as OpenVINO concern, the model is loaded and run just the same,
So nothing interesting about the sample code itself
you can find the model details in the documentation,
This is midasnet
And you can find here the specifications and the accuracy
The input is an RGB image..
And the output is an inverse depth image..
So you get here an array, same size of the input image
With the invers depth value per pixel
First stage is some installations, if you haven' t done that already.
And Look for the how-to instructions link in the video description
Let' s define the OpenVINO install directory
And our Working-Directory
Go to OpenVINO
Initialize the variables
Under the model-optimizer/ install prerequisites
lets run.. As SUDO.. The full install prerequisites script..
Under the model-downloader directory
Take a look at the README file and follow the instructions..
Install the requirements script
And the requirements for pyTorchc and for Caffe-2
And you are all set..
Under the python_demos/mono-depth-demo, you can find the python script..
And the models list, I have only MIDAS-net, but in newer versions you will find
Another option that works just the same, BUT the depth map is opposite meaning
hot is far instead of hot is closer in the MIDASNET model..
So let's use the model-downloader to download midas-net
--name midasnet
The output directory is my working-directory
And I have the midas-net pytorch model
It is a pretty heavy model..
Now let' s convert the model from pytorch to ONNX and then to IR using the converter..
And I have the model in ONNX and in IR format..
We are all set to run the demo..
And let' s run the demo.
I'm running the mono-depth demo
The input model is my midas-net IR files
And I'll run it on a studio image
The actual python code is fairly simple and you can take a look at it..
And use it as a reference..
Let' s look at the 3D image,
And this is the original image
This model has used only one 2D image to understand the full depth of the scene,
I believe it' s pretty impressive..
We have seen OpenVINO used for Depth detection out of 2D images.
We will see OpenVINO used to do more and more other usages than our original
2D vision application. Stay tuned..
Thank you.