Now we've got our data ready in our car lab notebook and in Google Drive.
Let's clean up our notebook and get it get it more set up towards our steps that we take on a new project
system.
So what we've done we've got collab.
We've created a new project folder.
We've got our data in there.
We actually don't really need to create an environment of tools because code lab already has a lot of
them installed for us.
Let's try to import some anyway because what are we doing we're working with tensor flow.
And this is what we're doing with getting our data into tenses.
Yes.
We're gonna use testify for that and we're gonna use tensor flow hub to pick a model that we get our
notebooks set up for those two.
In this video that sounds like a good idea.
We go back to CO lab where we can do we can pretty up this because we don't need to run this command
we could delete the cell or we will just commented out for now.
So run that we can close this down get rid of that really just tidying up our Nope or getting it ready
or we might do is at a tech cell and we're going to move that up there.
And I'm going to put their title in there so we'll go.
I'm going to put a little emoji because it's nice and fun.
So we'll go end to end multi class dog grade classification and go There's no book builds an end to
end multi class image classifier using tensor flow 2.0 and tensor flow hub wonderful and so let's get
out a little headings up in here some problem data evaluation and then features.
So this is again from our six step workflow.
So am I put in here.
One 2 3 4 so problem is identifying the breed of a dog given an image of a dog now is one hundred and
twenty different dogs.
Now if you can't identify that many breeds but I certainly can't so imagine this happened to me the
other day right.
I'm sitting at the cafe and a dog walks past and I kind of remember the breed name but someone next
to me said oh that's let's make one up.
That's an Australian terrier.
Well that makes sense because I'm Australian.
That's an Australian terrier I'm like wow how did they know that.
And then I realized I only know about three dog breeds like German shepherd Labrador beagle.
I only got that one because I'm reading that.
And so this is what dog vision could be useful if we were trying to build something that could identify
if I was sitting at that cafe and took a photo of that dog.
Could my machine learning model the one that we're going to build tell me what breed it was.
So that's our problem.
It's like that's our statement when I'm sitting at the cafe and I take a photo of a dog I want to know
what breed of dog it is.
That's our problem we're putting it in real life terms.
Right.
And now where's our data.
We can get our data.
We'll just put a link here from Kaggle so the data we're using is from Cargill's dog breed identification
competition and we'll put a link here evaluation what is our evaluation so in our head I want you to
think about this before we even look at Kaggle because we're working on classification.
What is a good evaluation metric for how well our dog vision is performing.
Well one of the default metrics for classification is accuracy right.
So if we can get it pretty accurate at predicting what dog is in a photo that's a pretty good metric.
But let's see what Kaggle says so if we go to overview valuation submissions are evaluated on a multi
class log loss.
What is that between the predicted probability and the observed target.
Well there's a link here so let's click that see now where.
OK.
Well these are things you're gonna have to deal with in real life right.
You never always gonna go down the right path for a phone.
I like how they've done that with data.
Well multicast log loss let's have a look at the example we've got I.D. which is this long string.
We've got a dog breed here Athan Pincher don't mock me for not being out of print hats at Afghan ham.
That's an easier one to pronounce and zero point 0 0 8 3 zero point zero.
These look like output prediction probabilities of a model in which they are.
So here we go.
If I could just read this.
Remember if in doubt read the documentation or run the code either or for each image in the test set
you must predict a probability for each of the different breeds.
The file should contain a header and have the following format.
Okay so this is what we're working towards if we wanted to make a submission.
This competition is closed so it's a playground prediction competition.
Well we can still make a submission.
Let's work towards that.
And that's the file type we need.
All right.
So if we go back where were we.
Dog vision evaluation.
The evaluation is a file with prediction probabilities for each dog breed of each test image and then
we go here we'll copy that put it into dog vision.
So if we ever needed to come back we can and then some features of the data.
Well we know that the images so they're unstructured.
Well let's have a look at our data.
We have one hundred and twenty different breeds of dogs.
So there's 120 different classes I'm going to copy that some information about the data
we're dealing with images.
This is the way I want you to start thinking about different projects right.
You don't.
This doesn't have to be like formal.
By the time you've had some practice with problems you won't need to write this out but this is a good
habit to have is that you're communicating your work not just to others like if we were to share this
notebook.
That's a really cool thing about collab as well you can share them but it's communicating it to yourselves
so you know what you're working towards unstructured data so unstructured data is just anything that
isn't in a data frame so no rows and columns doing the images unstructured data.
So it's probably best we use deep learning slash transfer learning which is what this project is all
about.
What else is there about the data.
There are 120 breeds of dogs and because it's multi class classification This means there are 120 different
classes.
Now if there are only two dog breeds it would be binary classification if you remember our project on
heart disease that was binary classification.
So whether someone has heart disease or not.
So if we come back label CSB so ten thousand two hundred twenty two unique values.
Okay so that means I'm guessing there is ten thousand two hundred and twenty two different images Okay
so ten thousand training images.
You know what we might be out to do is if we have this locally is go come on eye on that bomb look at
that.
Thank you Mac OS.
You might be out to do this in windows I'm not entirely sure.
You've got ten thousand three hundred fifty eight items and let's see if my theory was correct.
Ten thousand two hundred twenty three in train.
I wonder what that is where the little discrepancy is from there.
That's right.
We'll figure it out.
We're not worried about that now we're cooks not chemists.
There are around 10000 plus images in the training set there.
Around 10000 plus images in the test set.
These images have labels
these images have no labels because will want to predict them wonderful so this is us setting up our
project space.
And now I know at the beginning we kind of said we're going to import tens of low but what's more important
is getting our heads around what problem we're actually trying to solve before we start bringing in
our tooling.
So if we go here unzip the uploaded data into Google Drive wonderful so I'm gonna delete this cell.
What should we do now.
We might as well import tend to fly because that's what we're working with right.
We come back to our keynote.
This is our workflow.
We're working with unstructured data so get our data ready we've got it uploaded into Google Drive correct.
Get into tenses we're going to use tense of life for that and tense a flow hub so that's what we might
as will try and do we might try and import tensor flow and tensor flow hub.
How might we do that.
So you could do this if you have any question you go how to import tensor flow.
I already know so I'm just gonna show you.
But that's just an example.
Actually we're working in CO lab so it's better to be a bit more specific in Google collab.
That's just what I would google.
I'll look at that.
A great video.
Oh that's the old tensor flow logo.
So if you see that logo that's they all tend to flow logo.
We're dealing with tensor flow 2.0.
So we want to import tensor flow
into collab
let's put a little heading here.
Get our workspace ready.
Now the beautiful thing about collab as well a little tidbit is that once you do headings in their own
cells you get this little section over here.
So we could go right at the top or we could go back to this section.
So that's what we're gonna do throughout is just navigate through this.
So we want to get our workspace ready.
The import nice and simple import tend to flow as T F if you have a CTF just like num PIs MP Panda's
PDA.
TAF is short for tensor flow.
We want to go print.
TMF version and now this is gonna tell us what version because we're after intensive flow to on look
at this Google Ecolab auto complete on tap.
Thank you.
But we're going to try and avoid using auto complete because we want to practice writing the code ourselves
let's see what happens.
Oh read text to many underscores.
That's the first mistake we missed out on that red text.
That's right.
I'm going to show you.
I'm going to restart my runtime.
Remember if you ever see what I just did.
If you ever see this come up you might have to go to runtime restart runtime but I'm going to just show
you we don't have to worry about that cell because you've already unzip def RS show you this red text
hopefully it comes up again.
Boom that's what we were after.
So the default version of tensor flowing collab will soon switch to tensor flow to point X. That's what
we want.
The new version offensive Low C you might if you're watching this video on the future you might already
have tensor flow to point X or two point whatever we need to point something I because I'm running this.
It hasn't switched over yet in color so I'm using T F one point one 5 which is not what we want.
We want the 2.0 version.
I'll see in the next video I'll show you a little trick if you don't have tensor flow 2.0 yet.
If you do keep going skip the next video but if you don't watch the next video.