Share your work here ✅

This is the start of a web app for my sister to help her search the internet.

Backstory, she has autism and two things that impact her significantly are: she pronounces words/syllables significantly different than everyone else and she can’t spell.

She loves going online and looking clothes, worksheets, etc. At the moment, this requires someone else to tell her what letters to type/fix the letters she typed, or get to the website for her.

So far I’ve recorded 10 samples of her saying 9 different stores (Macy’s, Walmart, …), converted the recordings to spectrograms, used all the normal transforms except flipping horizontally, used a pretrained resnet18, and it’s 100% accurate (with just 10 samples per class)! To be continued soon/after part 2.

13 Likes

I made a blog post/tutorial on some of the simple ways to add layers to the middle of a pre-trained network without invalidating the trained weights for the later layers. It’s in Tensorflow 2.0 as I wanted to play a little with their new API, and includes a working Collab.

1 Like

Hi all,

After reading about Progressive Resizing as well as Mixed Precision here in the forums, I tried these techniques out on an image classification problem for the Plant Village plant diseases data set (other students have shared their projects on the same data set here as well – hi @aayushmnit @Shubhajit :grinning: ).

I was very surprised I was able to get a better than the top result! (99.76 percent)

And to think that this was on Colab, a free DL platform.

Thanks to fastai’s mixed precision capabilities, I was able to train faster in larger batches using progressive sizing for a smaller number of epochs using smaller sized images – @sgugger your mixed precision feature works wonders!!

TLDR;
The following steps were used to create the final model:

Note: all the training was done using Mixed Precision (learn.to_fp16())
except when running an interpretation, in which the model was converted to use 32bit fp (learn.to_fp32()) in order to run classification interpretation steps – for some reason, fastai barfs when classification interpretation is run on a mixed precision model.

  1. Use image size of 112x112, batchsize=256

    1. Stage 1 - Frozen except last layer, train at default LR (1e-3)
      • Best result : 0.982915
      • 5 epochs at 6 mins per epoch, total training time: 29:58
    2. Stage 2 - Unfreeze, train with LR slice 1e-6,5e-4
      • Best result: 0.992821
      • 4 epochs at 6.3 mins per epoch, total training time: 25:22
  2. Use image size of 224x224, batchsize=128

    1. Stage 1 - Frozen except last layer, train at default LR (1e-3)
      • Best result : 0.996092
      • 5 epochs at 11 mins per epoch, total training time: 55:17
    2. Stage 2 - Unfreeze, train with LR slice 1e-6, 2e-5
      • Best result: 0.996819
      • 4 epochs at 14.5 mins per epoch, total training time: 58:34
  3. Use image size of 299x299, batchsize=128

    1. Stage 1 - Frozen except last layer, train at default LR (1e-3)
      • Best result : 0.997546
      • 5 epochs at 24.5 mins per epoch, total training time: 1:43:33
    2. Stage 2 - Unfreeze, train with LR slice 8e-7, 7e-5
      • Best result: 0.998001
      • 4 epochs at 27 mins per epoch, total training time: 1:48:37
Total Epochs : 36
Total Training Time:  6.36 hrs
Model: ResNET50
Max GPU Memory: 11GB

Another notable finding was the GPU memory usage during training:

  • Using a batch size of 256 and image size of 112x112, Mixed Precision used up approx. 3-4 GB GPU Memory.

  • Using a batch size of 128 and image size of 224x224, Mixed Precision used up approx 3-4 GB as well.

  • Lastly, using a batch size of 128 and image size of 299x299, Mixed Precision used around 11GB GPU Memory (triggering warnings in Colab, but otherwise ran to completion)

If you have suggestions on how I can further speed up the training or just improve on it in general, please reply…

Thanks in advance…

Butch

Here’s my notebook on github or you can run it on Colab

_

13 Likes

Excellent one. Can you please share the notebook?

Thanks @jeremy, I will look into gram loss for this one.

Hi @amitkayal,
It’s in kind of a messy shape due to debugging this issue.
I’m doing a setup of the entire dev environment now and can hopefully share this later this week as a clean version.

I don’t think even a person can say for sure whether a book is technical or not, just by its cover. There are plenty of technical books, with a non-bland cover. You can obviously make a judgement from the title, but that is NLP.

Maybe don’t judge a book by it’s cover? :stuck_out_tongue:

That’s correct. :slight_smile: There are technical books that have the same design and color of cover page as of self help and novels.

Fixed the code link for the post!

Got through exercise 0-3, that was great fun! Took the advice to also get hands dirty as fast as possible. Did this little web app that tries to classify your facebook avatar into one of 36 Oxford pets (Had to drop Sphynx since it was getting to much matches :smiley: )

Demo: https://the-dog-in-me.andersjurisoo.com
Code: github.com/ajthinking/the-dog-in-me

3 Likes

Wow, inspiring story :slight_smile: Thanks for sharing!

1 Like

I made an app to classify skin cancer images and deployed it using Render. I wrote about how easy it was to make and deploy in this Medium article:

6 Likes

Hey there,

I want to share my MNIST equivalent with you :smiley:
This is my little image classification app that distinguished between the seven different plastics defined by the industry standard RIC (resin identification code). I built up my own dataset by taking photos almost during every shopping tour. By now my dataset contains of ~450 pictures of the seven different plastics.

This is my dataset on kaggle: https://www.kaggle.com/piaoya/plastic-recycling-codes
You are very welcome to contibute :partying_face: (no websearch pictures, please)

My goal was to built up a little website or app where you get information on whether the plastics are ready to recycle or not. What are alternatives? Which specific effects has the classified plastic on our health? What does it mean for the environment? Here are some pictures of my mock-up - you can test it also on render:
https://plastics.onrender.com/
(As long as I still have credit on render :wink: )

Sadly the training of the model is not so good yet, I think this might be because of the lack in data.

Do you think this could be interesting to develop further? Is anyone interested in collaborating to make this open available as a service?

5 Likes

Very cool! I tried something similar, but I didn’t get nearly as high accuracy.
Do you have any thoughts about why the plot of image activations for the wrongly classified are in such weird places (e.g. the whitespace of the Javascript)?

This is great - thank you for sharing. I searched for an article like yours a while ago :wink:

1 Like

Me too, I generated my own version of MNIST :laughing: throwing in whatever fonts I found in my system (https://gist.github.com/marypwchin/7f4c7e57aebce5b68270cdb88d39bfed). Not just numbers but A, B, C, … and a, b, c, too. I use the same dataset from 3 learning sessions:

  1. Classifying alphanumerics 1, 2, 3, ..., 9 and A, B, C, ..., Z and a, b, c, ..., z.
  2. Classifying font type.
  3. Classifying font style.

Alphanumerics aside, I also tried face recognition and donkey-mule-horse recognition. Blessed be all donkeys, mules and horses (and all alphanumerics).

1 Like

Thanks for pointing out this. I rescaled the images to 352 and did the training again as done in the notebook “Lesson 6: pets revisited” to view the activations more clearly. After doing that also, the activations are still in places where we cannot find the relation of the activations to the predictions.

Am I missing anything? Can anyone in the forum help us with this?

github repo

1 Like

Hi All, First I thank Jeremy for this awesome course, I did some fun project based on lesson 1, its a vehicle classifier, I took images from Google and feed it to the fastai library to classify different type of vehicle (SUV, Formula1, Hypercar, pickup truck, batmobile, container truck, heavy duty truck, convertible) without change any default setting achieved 90%~ accuracy with resnet50. my next step will be adding more images to each class and add more transfort medium like a bike, bicycle, auto,bus etc., then integrate with live traffic cam to do analysis about the transport medium movement. again thank you so much for this awesome course.Screenshot_2 with resnet 50

looking for suggestion to add more things in this fun project. Thanks

Hi all,

Just finished Lesson 1. Here’s my writeup on a fun little bear classifier I built using ImageNet data: https://blog.derekmeer.com/what-kind-of-bear-is-best-building-a-bear-classifier-with-fast-ai

Big takeaway: image URLs from ImageNet aren’t always good. For the black/brown bear images, I found that I could use only about 400 images, or 15% of the data.

Despite this, I’m surprised by how good the results are. I probably need to test on something outside of the ImageNet dataset to be sure, but 2.5% error rate is pretty good!

I also found an ImageNet mis-classification. I have no clue how common that is, or how to report it. How do you normally deal with something like that? Thanks again for the great (free) course!

1 Like

Color Swatch Dataset

I am excited to refresh my knowledge of deep-learning with this years release of Part 1 and Part 2 (soon to be released).

While we all wait for Part 2 to be released, I went back and rewatched Part 2 from 2018.

In Lesson 11 there is a new idea that was introduced with DeVISE that can find things in the dataset that it may not have learned natively. The quote that kicked off this line of thought was “…I don’t know much about birds but everything else here is BROWN with WHITE spots, but that’s not…”

The comment about the color brown now has me thinking about object detection and can we ask if the model knows something about color, for example, “Red Car.”

Anyways here’s a link to the notebook and one to the dataset.
https://github.com/dusten/Project_Ideas/blob/master/generate_color_squares.ipynb

1 Like