Share your work here ✅

I always have trouble identifying among Cheetah, Leopard, and Jaguar. They all look the same to me. So after watching lesson-2, I thought to make a WebApp which can classify between these animals. I have deployed this WebApp on Render and can be found at https://bigcats.onrender.com

While training the model


After training for many epochs, training loss decreased but my validation loss is increasing. What does it indicate?

Simple classifier between guitars and lutes:

With Resnet50, only gets one validation sample wrong out of 66 (98.5% accuracy :slight_smile: )
image

After completing Lesson 2, I created a Bigfoot Detector web app, available at https://bigfoot-detector.onrender.com/. It takes an input of a picture of woods / forest, and tells you whether a Bigfoot-like creature is present or not. Code for the model is available on github.

I used a couple of external resources for this work:

  • FastClass - A python package that helps with automating the download of images from Google
  • Render - A cloud provider that makes it super easy to deploy an app (even if you have limited coding experience)

I also used ImageCleaner quite heavily (when you do a Google search for Bigfoot you get some really strange results). Thanks to whoever put together the great docs for it!

1 Like

I randomly remembered Jeremy speculating that adding a residual connection in a U-Net might improve performance, do I decided to do a quick experiment. Adding the residual connection gives a slight improvement in loss, but comes at a cost of a heavier model (due to modifications required to make the residual path work, not the residual path itself).

Training Loss/Validation Loss/Accuracy for the same training procedure
Without Residual
without_res
With Residual
with_res

Masks Without Residual


Masks With Residual

8 Likes

This is cool. Did you know a neuroscientist have once given a TED talk, claiming there’s a Simpson neuron, which lighted up whenever they did some scan (maybe MRI) on a subject?

Is there a preview method to show images after data aug? Or sample code? This will be very useful as there maybe unknown defaults that don’t make sense for a particular task.

.

Hi, using the Kaggle dataset, https://www.kaggle.com/jessicali9530/celeba-dataset/home, I want to classify if the celebrity in the image is smiling or not. I have labelled images using https://platform.ai/, and have created a data set of 1000 images. Need help in building the data bunch and the changes required in the learner module. Please help!!!

Hi @jerbly, thanks for sharing you work, it was really helpful. Taking your project one step further I want to classify if the person is smiling or not? As explained above I have labelled 1000 images. Could you please guide me how it could be done and where should I start?

Thanks in advance.

Abhay

.

Today I submitted my first Kaggle competition entry! I made a CNN using a resnet34 architecture and trained it for the Histopathologic Cancer Detection competition. I managed to train the model to achieve an error rate on the validation set of 0.023520 (~97.65% accuracy). When I submitted my entry, Kaggle scored me as 88.15%. I’m not sure why there was such a large discrepancy, but I managed to learn a lot about using Jupyter, loading and saving files, manipulating data frames, and training lots of different types of CNNs. I compared results using each type of augmentation individually, as well as several types at one. I tried different models - I even made a resnet152 at one stage! I also learnt a lot about using Kaggle. So despite not getting as good a score on Kaggle as I had hoped, I still received a lot of value in experimenting with the fastai library using Kaggle. You can find a copy of my notebook here.

3 Likes

My initial thinking is you may have overfitted to the validation set. Did you do any elaborate tuning of the hyper parameters? I glanced your notebook, it doesn’t appear you have done too much tuning? I can’t tell how much work you have done just looking at it. Actually, you can find a thread where I have a bit of “encounter” with JH on the point of overfitting validation set.

Without knowing anything here, i would try cross-validation and model ensemble to see if there’s any improvement. You can google details but very briefly: you randomly shuffle and split your data into train/validation set, and then train and get a model. Next, do this again from scratch such that you have a different split, and then train again, and get another model. (there are other very closely related concept called “Bagging”). There are many strategies on this. Let say you get N number of models. You can use all of them to make predictions and average them. This averaging is most effective if your models make uncorrelated predictions for your input. i.e. they don’t all make mostly same mistakes (that defeat the whole point).

Disclaimer: I actually never participated in Kaggle, my experience mostly came from working on my own dataset and trying to ship an app. But I did hear from others ppl who win Kaggle very often do model ensembling.

Hi Kelvin,
I don’t believe I have overfitted the model. Here are the results for each epoch:

epoch train_loss valid_loss error_rate
1 0.197657 0.150942 0.051721
2 0.190311 0.136989 0.046222
3 0.185618 0.125259 0.042359
4 0.16728 0.123099 0.04045
5 0.13936 0.143579 0.035337
6 0.116577 0.088347 0.028951
7 0.111443 0.089009 0.02786
8 0.082007 0.077608 0.024838
9 0.077655 0.076351 0.024043
10 0.082422 0.072606 0.02352

I did however use the same random seed for creating the validation set, so I could sensibly compare the performance of my different experiments. (as per Jeremy’s comments in the lecture). However, I understand why you would want to do this to make your model perform better (i.e. more general). I might give this a go and see if I can get it to perform better.

It’s difficult to tell from that if you have overfitted to the validation set or not. It is relative. If you have overfitted to the train set, then the accuracy gap between the train and validation set will be big, which you don’t have, so you are fine with that. But i suspect you overfitted to the validation set (not train), which you will know if the big gap is between that and the test set (which Kaggle is hiding from you and scored you 89%). Again, it is a symptom. Without knowing the detail, it may be other causes.

Hi,

Did you use the metric that Kaggle evaluates you on (area under the ROC curve) when you submitted your predictions ?

It got me the first time I submitted to Kaggle and I finished among the last ones on the Leader Board haha :rofl:

3 Likes

Oooohhh. I was using error rate, not area under ROC curve. :speak_no_evil:
I’ll see how I can use that metric and try again. Thank you!

Thanks to @raimanu-ds to point that out. Didn’t catch my attention that anything medical, it is almost never the accuracy that matter. That definitely will mislead you using wrong metrics.

But it is still good to try some model ensembling after that.

I’ve assumed you’ve used

show_batch

To display samples. This method shows the transformed/augmented images, not original ones.

Ok so for lesson 2 I created a web app for the malaria detection dataset on kaggle.
And it achieves 97.2% atm, tho I think fiddling around with LR would yield better results I think. Would love to hear your opinions. PS : I had a hard time deploying the starlette code on pythonanywhere so if anyone has any tips I would really appreciate it, but I used ngrok to make other people try it out.

Here’s the repo link : https://github.com/MohamedElshazly/Malaria-Detection
The demo link(tho may not be up every time u accessing it sadly) : http://90eab52f.ngrok.io
Kaggle Dataset link : https://www.kaggle.com/iarunava/cell-images-for-detecting-malaria

Hi all,

I created a handy tool to tell you if you’re bald… or not! https://baldornot.onrender.com/

3 Likes

Hi ,

I have tried to create classifier to predict if particular image is of Zeenat Aman or Parveen Babi because since childhood I get confused between these 2 Indian actress.

I know its a very small dataset…One more thing.I did not create separate folder for train and Validation while creating dataset.However during training I gave following command

tfms = get_transforms(do_flip=False)
data=ImageDataBunch.from_folder(PATH,train=“Actress”,valid_pct=0.1,ds_tfms=tfms,size=299,bs=32)

so does it mean it will pick 0.1 percent of dataset for validation?

Hi Everyone,

I am a beginner to Deep Learning and recently started the Deep Learning Part 1 MOOC. I have completed the Lesson 1 and as part of my exploration, I took up a dataset to classify the health of a honey bee from Kaggle (https://www.kaggle.com/jenny18/honey-bee-annotated-images). The performance of the model was better than the performance shown in the Kaggle Kernels which was really exciting for me! I have uploaded the notebook to my GitHub https://github.com/vineettanna/Honey-Bee-Health-Classification

Confusion Matrix
Confusion_Matrix