Lecture 2 (revised on May 23st)
Let’s turn your model into a web app
00:00 New exciting content to come
- Can there be substantial new content given we have already 4 versions and a book?
00:57 Ways of reading the book
- How many channels available for us to read the book? (physical, github, colab and others)
01:28 Extra sweets from the book
- Where can you get more quizzes of fastai and memorize them forever?
02:38 Introducing the forum
- How to make the most out of fastai forum?
04:12 Students’ works after week 1
06:08 A Wow moment
- Will we learn to put model in production today?
06:46 Find a problem and some data
- What is the first step before building a model?
07:07 Access to the magics of Jupyter notebook
Do you want to navigate the notebook with a TOC? #jupyter
How about collapsable sections?
How about moving between start and end of sections fast?
How to install jupyter extensions
09:48 Download and clean your data
11:06 Get to docs quickly
- How to get basic info, source code, full docs on fastai codes quickly?
12:40 Resize your data before training
How can you specify the resize options to your data? #code
Why should we always use RandomResizedCrop and aug_transforms together? #best-practice
How RandomResizedCrop and aug_transform differ?
16:56 Data images instantly transformed not copied
- When resized, are we making many copies of the image? #best-practice
17:54 More epochs for fancy resize
- How many epochs do we usually go when using RandomResizedCrop and aug_transforms? #best-practice
18:58 Confusion matrix: where do models get wrong the most?
How to create confusion matrix on your model performance? #code
When to use confusion matrix? (category) #best-practice
How to interpret confusion matrix?
What is the most obvious thing does it tell us? #question
How hard is it to tell grizzly and black bears apart?
20:22 Check out images with worse predictions
Do plot_top_losses give us the images with highest losses? #code
Are those images merely ones the model made confidently wrong prediction? #best-practice
Do those images include ones that the model made right prediction unconfidently?
What does looking at those high loss images help? (get expert examination or simple data cleaning)
22:08 What if you want to clean the data a little
How to display and make cleaning choices on each of those top loss images in each data folder? #best-practice
Without expert knowledge on telling apart grizzly and black bears, at least we can clean images which mess up teddy bears.
24:44 Myth breaker: train model and then clean data
25:23 Turn off GPU when not using
- How to use GPU RAM locally without much trouble?
26:17 Watch first, then watch and code along
- What is the preferred way of lecture watching and coding by majority of students?
27:19 A Gradio + hugging face tutorial
30:19 Git and Github desk
- Is Github desk a less cool but easier and more robust way to version control than git?
31:31 Terminal for windows
29:00 Get started with Hugging Face Spaces
33:45 Get the default App up and running
How to use git to download your space folder?
How to open vscode to add app.py file?
How to use vscode to push your space folder up to hugging face spaces online?
then go back to your space on Hugging Face to see the app running
37:10 Train and download your model
Where is the model we are going to train and download from Kaggle notebook?
How to export your model after trained it on Kaggle? #code
Where do you download the model?
How to open a folder in terminal?
Make sure the model is downloaded into its own Hugging Face Space folder
41:15 Predict with loaded model
How to load downloaded model to make prediction? #code
How to make prediction with the loaded model?
How to export selected cells of a jupyter notebook into a python file?
How to see how long a code runs in a jupyter cell?
44:22 Turn your model into Gradio App locally
How to prepare your prediction result into a form gradio prefers? #gradio #code
How to build a gradio interface for your model?
How to launch your app with the model locally?
Not in video: run the code on Kaggle in cloud
48:25 Push this app onto Hugging Face Spaces
Make sure to create a new space first, e.g., testing
How to turn the notebook into a python script?
How to push the folder up to github and run app in cloud?
Not in Video: if stuck, check out Tanishq tutorial #trouble-shooting
51:46 How many epochs are ideal for fine tuning?
53:15 How to save model from colab?
54:24 How to install fastai properly
#installation #trouble-shooting #code
How to download github/fastai/fastsetup using git?
git clone https://github.com/fastai/fastsetup.git
How to download and install mamba? ./setup_conda.sh
Not in Video: problem of running ./setup_conda.sh
How to download and install fastai?
mamba install -c fastchan fastai
How to install nbdev?
mamba install -c fastchan nbdev
How to start to use jupyter notebook?
jupyter notebook --no-browser
Not in Video: other problem related to xcode
59:48 The workflow summary
01:02:42 How easy does HuggingFace API work
01:04:43 How easy to to get started with JS + HF API + gradio
01:07:20 App example of having multiple inputs and outputs
01:08:09 App example of combining two models
01:09:28 How to turn your model into your own web App with fastpages
01:14:09 How to fork a public fastpages for your own use
Common problems Not in Video