Share your work here ✅

I’m having a hard time training on the Flower Dataset (it has 102 class)!
I trained a ResNet-34 and I got the following bad performance:

Total time: 21:00
epoch  train_loss  valid_loss  error_rate
1      2.709790    5.458967    0.984719    (02:40)
2      2.661998    5.569498    0.984108    (02:38)
3      2.546748    5.700339    0.983496    (02:37)
4      2.363964    5.859702    0.982274    (02:37)
5      2.127904    6.052469    0.982274    (02:36)
6      1.910503    6.106037    0.983496    (02:37)
7      1.760798    6.104397    0.982274    (02:38)
8      1.696391    6.164757    0.982274    (02:35)

Then same thing with a ResNet-50

Total time: 30:58
epoch  train_loss  valid_loss  error_rate
1      5.143882    4.833019    0.985330    (03:08)
2      4.918839    4.791797    0.980440    (03:06)
3      4.749866    4.747269    0.976773    (03:01)
4      4.577477    4.718012    0.975550    (03:06)
5      4.449985    4.724235    0.971883    (03:04)
6      4.291201    4.759896    0.979218    (03:06)
7      4.113739    4.790433    0.975550    (03:08)
8      3.995913    4.814462    0.972494    (03:01)
9      3.880915    4.824159    0.976773    (03:05)
10     3.836075    4.842245    0.981051    (03:09)

Looking at the confusion matrix I see an interesting pattern, it basically classifies everything to the first 8 classes (look at the wide dark blues squares)

Any ideas how I could improve the performance of the classifier?

Here is the jupyter notebook - link.

1 Like

(Cross posting here from kaggle discussions)

I’m trying the former and will share if I find out anything interesting although most likely I won’t.

I used your starter code, bumped up the data to 5% then decided to go ahead and train it on the complete dataset.

Fair warning: If anyone else wants to try this approach: it did take me about 2days to extract the images and will take a lot more to train the complete data. But I did make the mistake of joining a competition that’s running (Against @radek’s advice to join a fresh comp) so my money is on this idea.


Have you tried increasing the number of epochs? Your validation loss is still going down so it may be that you need more training time.

That’s interesting. I did the following and ended up with the same pattern:

read further

I created my own chicken dataset using google_images_download

I trained the dataset without unfreezing; looking quite promising - only the difference between male and female for each chicken type is difficult (also due to a lot of noise in the dataset I think).

Then I unfreezed and trained all layers (with ‘learn.fit_one_cycle(2, max_lr=slice(1e-3,1e-1))’)
And ended up with the following pattern (as if one chicken type is quite generic):

WIth ‘max_lr=slice(1e-6,1e-3))’ instead, it does improve. So 1e-3 seems too high in this case. So can we state that too high learning rate will create a too generalised model? And your learning rate is probably too high?

The learning rate plotted looks like:

Hey @bachir - not sure about this but I’m looking through your notebook, and it seems to me like your “labels” list and your “fnames” list aren’t in the same order.

Saying that because the first 250 labels are ‘77’ while the first flower images from your fname list are definitely not the same flower. You might be training with random labels.

1 Like

Hey everyone. I made an image classifier model that could tell the difference between 2 types of buses used in Panama city. The classic type also called Diablo Rojo that is being phased out. And the modern ones called Metrobus. The accuracy of the model on a validation set was 98.2%. As you can see it’s pretty easy to tell the difference.

Using an algorithm to download the images was a real pain. It took longer than anything else. I’m glad that’s over with. Here is the model.


Hi @Mauro

Nice busses ;-). To help with the cumbersome image download I wrote a small package…
You just specify your search terms and it’ll pull the images from multiple search engines…

Details are here if you are interested:



I trained a model with street pictures from SF, NYC, Tokyo, and Paris. The error rate is pretty high (32%) but looking at what it gets correct and wrong is pretty interesting – it thinks SF’s Chinatown is Tokyo and it seems to associate Paris with beige.

Top loss:

Top correct:

Notebook here.

Any suggestions to improve welcome!!


This is an interesting case and the training i going well: your error rate and losses are improving steadily. You will probably be able to improve the result a lot by using the training parameters that jeremy will present later - probably in the next session.

Also i could be interesting to aggregate the species so that you have less classes. ie use the class Warbler for all the Warbler Prothonotary_Warbler’, ‘Swainson_Warbler’, 'Tennessee_Warbler etc. You could do that by writing a regular expression of a string search to locate the class Warbler after the “_”

1 Like

For rectangular image input, such as (256,512), input resized image size is (256,256) better or (512,512) ?

1 Like

Hi - I trained a model to classify 4 kinds/brands of tea cups (Royal Albert, Paragon, Aynsley, and Shelley). The error rate is 32%, which is pretty good considering there are 4 roughly balanced classes and they are all very similar!

Top loss:

Here’s the notebook if you have any suggestions for improvement


Recognising emotions. 6% error using resnet50. Notebook here.


Hi Everyone,
Here I worked on Dog Breeds dataset from Kaggle which has 120 breeds and used resnet34 and resnet50 for classification. I got an error rate of 7% with just 2 cycle executions.

Here I have created my 1st public gist.

I would request everyone to go through this and let me know your thoughts and suggestions. I think there are improvements possible.


Applied classification on Devanagari script. With Resnet18 & few epoch 99.3% accuracy.


Interesting!!. I have used the same dataset last yr & got less accuracy :frowning:
This classification is very interesting & useful in food processing industry where you can automate the fruits & vegetable classification. I heard sometime back there are startups working for Reliance Fresh in this domain.

See here…

1 Like


I trained a model with images of different tourist spots in Tokyo (where I currently reside) and got it to predict with a 10.1% error rate. Now when my friends come to visit my model can tell them what’s what :stuck_out_tongue:

Here’s the top loss:

[('shinjuku', 'roppongi_hills', 3)]

Its mostly confused between Shinjuku and Roppongi Hills, understandably so, as they are both urban areas and images for both have tall skyscrapers.



Alien vs. Predator images

I’ve made a Notebook to classify Alien vs. Predator images, more info here :

Google Colab-Medium-Free GPU-fast-ai-course-part-1-v3-lesson-1-hw-alien-vs-predator-images


Cool Project! I wanted to remind you that you linked to the course-v3 repo as well as the private forums(though you can’t access em unless logged in) in your awesome medium post.
Jeremy asked us not to share these outside forums here :
Just sayin :slight_smile:


Thanks, for reminding me @Taka…Medium post updated. :slight_smile:

1 Like

I used @r2d2 pCA based feature interpretation on a trained resnet50 for anime faces (176 classes). I will clean up the note book tonight ( ran it originally on a google collab page) but got some really interesting results! The top features seem to be hair color!