Will be updated later for the edited video.
- Welcome back to lesson 3
- Correction, Attribution, Andew Ng
- About his course on Coursera
- About fastai ML course, more about foundation
- About Deploying, There is a Production Section
- Example: What car is that
- Guitar Classifier
- Healthy or not
- Trinidad of Tobago
- Mushroom
- Cousin Recognizer
- Video Feed -> Emoji
- Sign Language
- yourcityfrom.space
- Time series analysis
- FER accuracy
- audio check
- Emotion classification from faces
- Tumor-normal sequencing (false positives etc…)
- Look at more models you can build
- Multi label prediction
- kaggle dl
- tip for commenting multiple lines
- dl command for kaggle cli
- compressed 7z
- Multicliassification
- csv
- DataBunch out of the csv
- Getting more flexibility when importing data, apiDatablock API
class Dataset(object)
Absctract class- getitem => can be indexed
- len => len(0)
- The first thing we have to do: have a few items at a time so GPU can wor in parallel
- Creating a minibatch, dataloader (takes a dataset) => takes items, combines to minibatch and pops them over to the GPU
- validatiion set, we use DataBunch, binds a training data loader and a validation data loader
- synck… (25 s)
- examples of datablock API, using MNIST, if you understand that you are never lost
- ex Planet
- Camvid, color coded pictures, labeling with function
- Object detection dataset example, COCO (smaller batch sizie, and collation fn)
- This notebook is the documentation (http://docs.fast.ai/data_block.html|docs.fast.ai/data_block.html)
- tfms settings, warp, not true for satellite images…
- steps to create databunch
- How to create a satellite imagery multiclass identifier
- metrics => only for printing out during training, chagin does not affect training
- accuracy & f_score
- argmax
- data.c = len(data.classes)
- compare each prob with a treshold
- accuracy_thresh(thresh=…)
- partial function, acc_02 example with thresh included
- q:
- q: when you model makes an incorrect prediction in an app, how to improve => collect feedback from the user => finetuning
- finetuning => you can create a new databunch with just the misclassified => fit with a higher lr or more epochs
- q: About datablock ideology, do they have to be in an order, any other library that uses the same methodology? => pipeline is common for instance in JavaScript, etl have different stages in a pipeline, use the example to guide you
- example of t.label_from_csv => label_from_df
- q: resources for working with video? => it depends
- q: resources for working with video? => it depends
- unfreeze model, fit some more…
- note: before we unfreeze, we get this shape, get the steepest slope, not the bottom
- call again after unfreeze, you get another shape, harder… Do just before it shoots, and minus 10 x
- How am i getting it better than 9.29, top 10%
- trick, experiment with smaller size, i have a model that is good at recognizing 128x128, how to get 256… use transfer learning from 128 — it is a enw datase, i loose overfittin, create a new databunch
- how to do ^^ then we start with our pretrained model … freeze
- unfreeze and train a little more
- saving
- …
- Another example, Camvid Segmentation -> create color coded image
- In order to build a segmentation mode, you need to have a dataset where someone has labeled every picture
- camvid dataset
- http://course.fast.ai/datasets|course.fast.ai/datasets => find citation and thank them
- q: Is there a way to use lear.lr_find() and get a number from it => no, because this is still a bit more artisanal than i would like, it depends on stage, shape etc.
- how do we do image segmentation: same as everything else
- open_mask
- codes.txt
- Creating a databunch… NOT randomly, split by fname files, supplying classes as list
- interesting point. What if we flip variable image, but not mask, i want to transform y as well…
- smaller bs
- color coded photo when you have segmentation
- Creating a Learner, lr find … fit
- break (lets all come back at 8 o clock, 6 min)
- starting
- q: could you use unsupervised learning
- q: should we deliberately create smaller datasets => yes, made us win imagenet challenge
- q: what does accuracy mean for pixelwide classifications, mentions acc_camvid becasue of void
- q: training loss greater that valid loss, ie. underfitting, what to do => train for longer, train last bit at a lower learning rate, if you are still underfitting you need to decrease regularisation
- For segmentation, we use
create_unet
- unet image
- learn.recorder.plot_losses and plot_lr
- why plot_lr looks like it does
- drawing losses, bumpy, learning rate annealing
- leslie smith, what happens when you increase lr
- good learning rates look like this
- bs=8
- trick, upping the size
- the learner has the same weights, but the data has the same image size
- fit some more, unfreeze …learn.show_results
- paper comparison, better result than SOTA
- paper comparison, better result than SOTA
- trained this quickly
- another trick if you run out of memory: mixed precision training
learn.to_fg16()
you need new CUDA drivers, twice as fast on new GPUS, using less GPU RAM - faster, bigger bs
- Dataset: BIWI head pose
- tricks we have to do for this dataset
ImagePoints
- Example of filename, 2 numbers that represents center of face, we need a model that spits out 2 numbers, not classes
- Regression - any model where your output is number
- The snippet for creating the databunch, validation is a new person
- model , create_cnn, also about loss function
- mean squared error
- results
- imdb
- IMDB - NLP
.text
- factory methods or data_block api
- Tokenisation
- rare = unknown, special token
- vocab, replace the workds in the review with numbers
- doing it using datablock API
- models language model…
- finetune
- sota
- q: For a dataset different than dataset, should you use your own stats, why? => i have used imagenets stats, you need to normalize with the same stats that the model was trained with
- gradient descent
- no amout of matrix multiplications will be able to di this since they are linear models, linear + linear = linear
- what are we actually doing? Matric multiplication + non linearity (activation functions)
- sigmoid
- now we use rectified linear unit max(x,0) … relu
- how does it work, michael nielsen shows how
- Universal approximation theorem
- we are actually done now
- part 2 how to build these
- q: How tokenization works when they depend on each other such as San Fransisco
- q: 4 channels =>will incorporate it into fastai, modify the model itself, initial weight tensors
- wrapup
- started by saying, it is easy now to create web apps, we have starter kits, the same steps you can do to do multi label classification, or segmentation or regression, or nlp classification and a lot more
- all we are doing, gradient descent on a hundred million parameters, along with a non linearity
- so this week, find a problem you want to solve which is either multi, regre, segme, try to solve that problem, the hardest is creating databunch, dig int heo datablock api
- next week we look at NLP, details about how we train with sgd qucikclu, adam rmsprop
- end of lesson.