And welcome back in this lesson, we'll take a look at loading a mask at pre-trained mask, our CNN
using TensorFlow.
So let's take a look at Notebook 55 and we can get started.
So this notebook well, this model, I should say, has been developed, developed by a company called
Matterport, and Matterport is actually a really cool company.
You can see they basically make a lot of 360 degree cameras, but they're also able to generate these
sort of like point cloud 3D representations.
This is all a treaty, as you can see here.
So you can walk around with a camera, essentially, and it basically creates a virtual map using RGV.
That's depth sensors and cameras and recreates these and using point clouds into these very cool two-dimensional
structures.
So I would encourage you to check them out.
The cameras are quite expensive, though, but they do offer a lot of really cool stuff, and they have
a GitHub repo with a lot of open sourced computer vision algorithms and models.
And that's one of them we'll be using now.
So firstly, we need to uninstall H5 Pi because is this model is compatible with the older version,
which is 2.1.
So we installed that there fixed about a minute to run.
Next, we have to tell on the book that we are going to use TensorFlow version one point X. So we do
that before you import TensorFlow, you can do this.
TensorFlow version changes after you import.
You can't just remember that in a notebook.
So next, we'll include the Matterport mask, CNN repo, and then we just click here into the samples
and then we know what we do with this important model.
We set some parts, we get the samples here, and then we just create more parts where we'll be saving
the images after we run the detection.
And this is basically a class for the inference config as well, and that it's displaying a model basically
to model parameters.
Yep.
Next note we can do is create a model here so we can print it and set to motor inference who is pointed
in Model X three point to the conflict that we want to use.
We lowered the width, so we loading it for the cuckoo cuckoo.
Remember the sense of a common object occurrences dataset?
And no, is it a classes in that dataset there?
And then finally, we can just look at a random image here and then run the detection model using the
model that detect here and visualize deal output.
So let's take a look at how this pre-trained maps are.
CNN and TensorFlow works, and you can see it works fairly well.
It gets most of the cores right.
Some cores that are quite small on this and it doesn't get.
But that's understandable because the scale is quite small.
This is a better way.
These are some of the research areas of computer vision will have to solve in the next few years.
Because, as you can see, we have we have a lot of basic models that do work quite well.
It gets most of the pedestrians that are visible here.
However, as a human, you contextually know that because cause of parked along the street here, this
entire street here, even though you can tell it, even if I if I would have crop an image here and
displayed to you, you probably would have no idea what it is.
And that's kind of effectively how it is going to be divisions, see?
Plus, it's kind of like this.
However, we know because of context that cars are going to be parked all along the street here.
So something like this here, which I mean, to be fair, it looks like a car, but that's because I
know it's a car.
This will be pretty much labelled as a car as a human, but it can be.
Division algorithm will have a very tough time to visually distinguished, and that's a call.
So that's just a bit of computer vision information.
So it can help, maybe if we need a lot more people to use to be researching these areas.
So I hope I encourage some of you to do that.
Make my life easier as well.
So thank you for that lesson.
And in the next lesson, we'll take a look at the tech front, too.
That's Facebook's Detection two API library.
I guess you can call it a library that offers a bunch of different models and NASCAR scenes being one
of them.
So stay tuned for that and I hope to see you in that lesson.
But.