Share your work here ✅

do we need to use the images limited to the classes to test the classification? I tried the soccer player classifier above https://kawazoi.onrender.com/ and input an image of an Apple and it said “neymar”. While I dont really like neymar for his histronics, I do want to follow up to see how a classifier can deal with an image that does not belong to any of the classes? It will be considered as noise and hence randomized to any of the classes?

2 Likes

@kawazoi It doesn’t recognize Santa Neymar :slight_smile: . Is it because most of your images have him with a black beard?

By the way what was the size of your training set, your error rate after training and is this with a resnet34?

2 Likes

Hi, I made a model that classifies painting as either having been Picasso or Monet with 97% accuracy. https://picasso-or-monet.onrender.com/

A study trained pigeons to classify Picasso vs. Monet with 90% accuracy, so I’d set myself a goal to beat the pigeons. :grinning: Can Deep Learning Perform Better Than Pigeons?

Thanks to @mrfabulous1 for the help with Render!

5 Likes

Hey @saps27,
Yes, this very simple model only handles these three players. I think an option for dealing with noisy images would be to add a threshold to the classifier, so it only returns the most likely option that surpasses the threshold.

@zeuzoix
hahaha that’s a funny photo!

Answering your questions… I’ve trained a resnet34, with ~200 images for each class. The error rate was ~10%, which in my opinion is really high.

Also, I trained the model with different types of photos (face only, full body, standing on a soccer field, etc…) so it is not ideal for face recognition. Making some tests, I realized the color of the uniform contributes a lot to the prediction, probably because the training set has this obvious pattern.

I believe the model would greatly improve if I trained it only on faces, rather than on entire bodies. And in order to do that, I think I would have to add a first layer of face detection to crop the input images, and than make the prediction on the cropped image. I’m still advancing in the course material, so I’m not sure if or when I will do that. Anyways, if you have any advice, I would appreciate! Thanks!

1 Like

Hey guys!
Just recently joined Fast AI and this community has been extremely rewarding to me, thanks to @jeremy and all other members. Since this forum is about sharing individual projects, I am glad to showcase my research project where I designed a novel activation function called Mish which beats other SOTA activation functions. Mish was also used to beat several leaderboard scores on Fast AI ImageNette and ImageWoof leaderboards. There is a dedicated Fast AI forum on Mish - Meet Mish: New Activation function, possible successor to ReLU?

The link to the GitHub repository - https://github.com/digantamisra98/Mish
The repository also contains the link to the paper. Feel free to try it out and provide any feedback. Thanks!

9 Likes

I just recently started the FastAI course and its been so fun! I finished the first lesson and took the advice of building my own Image Classifier. I looked around and found a Chest X-Ray Dataset originally published by the U.S. National Library of Medicine. It contained basically images labelled as either Normal or Abnormal(diagnosed with Pulmonary TB).

The Classifier I built basically lets you know whether a given Chest X-Ray has TB or not. The Resnet34 architecture gives an accuracy of 91.8%, while the Resnet50 gives only 90%.

Here’s the medium article, Using Neural Networks to discover Tuberculosis

Please do let me know. Feedback is appreciated :smiley:

Here’s the Github Repo, if anyone needs it.

Thanks! :slight_smile:

4 Likes

Part 2.

3 Likes

Hi lymenlee Thanks for a wonderfully concise and enjoyable post on classifying calligraphy.

Cheers

mrfabulous1 :smiley::smiley:

1 Like

very good post Bruno, and it is great to have you here in the fast.ai community

Don’t share your kaggle key’s in public, I suggest you remove it on your notebook.

This is not something I have done 100% using fast.ai course and library, but I kept trying to develop a language model off my personal notes and I kept failing for a while, until I applied transfer learning using fast.ai library.

Transfer learning is really the NLP game changer of the last decade.

My work: How to Automate Myself - Blog article

3 Likes

Hi everyone,

As a martial arts nerd I did a classifier between Judo and Brazilian jiu jitsu.

The accuracy is around 86%, using about 100 pictures for each class.

As pretty new in ML-programming I’m pretty happy just to have done this and that it works ok. Also managed to load it into a web app using the render guide :slight_smile:

https://judo-or-bjj.onrender.com/

Now onto the next lesson!

//Jan

2 Likes

Hi ricvolpe hope you had a lolly day today!

I just read your blog, the way you describe the challenges you had to overcome was both witty and entertaining.

Good job.

mrfabulous1 :smiley::smiley:

1 Like

Thank you @mrfabulous1!

I’m doing the course with my ten-yer-old daughter. We made a classifier for deep-sky Messier Objects.

Instead of using all 110 objects, I used only the list of named objects at the bottom of this page: http://www.seasky.org/astronomy/astronomy-messier.html. This way I was getting only the most commonly photographed and distinctive ones.

However, because that list only includes one globular cluster (the Great Cluster in Hercules, M13), and I really wanted to find out if my model will be able to tell apart different globular clusters, I added M3, M4, M15, and M80. I chose these ones because I think they are distinctive from each other: M3 is particularly brilliant. M4 has more easily resolvable stars and has a distinctive bar across an egg-shaped ring of bright stars. M15 has a particularly dense and bright core. M80 also has a dense core but tapers off much more quickly. I figured that if there are any globulars that the model will be able to tell apart, these are them.

Anyways, first step was to gather the images from Google. I followed lesson 2 and downloaded about 200 images for each object. I could already see from my Google search results that this wasn’t going to be easy, and I would need lots of cleaning - the images were a mess, with most of them quite obviously wrongly labelled. Some weren’t Messier Objects at all. Some were wide sky shots, or pictures of telescopes.

Because I had so many classes of images to download, instead of running through the download command manually for each one, I just created a quick loop. I made a CSV listing the Messier Objects and used pandas to take the second column (the first column was the name, second was the M## code) and make a list our of it to iterate over:

    messiers_table = pd.read_csv('./images/messiers.csv', header=None)
    messiers = messiers_table[1].tolist()
    for m in messiers:
        print(m)
        download_images('images/'+ m + '/download', 'images/' + m, max_pics = 200)

I trained my data using the same parameters used in the lesson notes: resnet32 with 20% validation data. After the first round of training, my accuracy rate was only 45%. YIKES! Unfreezing and retraining didn’t help much. Clearly I was going to need to clean my data.

Soooo… ran ImageCleaner and started cleaning… At first, I was trying to relabel wrongly labelled images by actually trying to recognize what the images were, but it turns out that this takes a bit longer for a human than recognizing black bears and teddy bears. It was taking me several minutes per page… After doing this for a couple of hours, and several hundred images later, I decided to just delete images that were clearly not Messiers, and do the relabelling later. My dataset was over 5000 images, and I had only cleaned a few hundred, and the quality wasn’t getting much better as I was going through the top losses list.

So, retrained the model on the slightly cleaned dataset, and got the accuracy up to about 50% - not much of an improvement.

I tried a few more iterations of cleaning, retraining, recleaning, and so on, and I am now at an accuracy of about 65%. Much better, but still not good enough. But at least now the lot losses were a lot more sensible:

**

**

Here are some of my most confused. At least they are sensible:

[(‘M76’, ‘M27’, 7),
(‘M15’, ‘M13’, 6),
(‘M3’, ‘M13’, 6),
(‘M11’, ‘M24’, 5),
(‘M81’, ‘M82’, 5),
(‘M82’, ‘M81’, 5),
(‘M24’, ‘M11’, 4),
(‘M24’, ‘M6’, 4),
(‘M44’, ‘M11’, 4),
(‘M6’, ‘M11’, 4),
(‘M6’, ‘M24’, 4)]

Lesson for me was, it’s really hard to get a nice, clean, labelled dataset to start with, and using Google images is a quick way to get images, but not very clean ones!

10 Likes

Hello guys,

As Jeremy teaches us through his courses, we should try to build something ourselves from the beginning to the end, being it research or product. Our joint team from local hospital and tech company went through this way from designing a study, collecting the dataset to training the models and finally writing a paper. Happy to share our work on hydrocephalus (buildup of cerebrospinal fluid) verification with deep learning from brain magnetic resonance images. Here is a arxiv link to our paper if someone wants to read more.

Thanks, Jeremy and fastai team and all the community!

8 Likes

Created a simple Bird Sound Classifier based on Lesson 2.

The data is from: https://datadryad.org/resource/doi:10.5061/dryad.4g8b7/1

There are 6 types of bird calls: distance,hat,kackle,song,stack,tet.

This model gets around 80% accuracy, which is not bad at all for something that relies on so many different factors.

image

This is very useful for audio processing, as the audio itself can be converted into images!

This is the entire notebook: https://github.com/vishnubharadwaj00/BirdSoundClassifier

3 Likes

Part 1: Lesson 6. I have tried to predict the 2019 Cycling World Champion using a tabular model

1 Like

Hi joeldick nice work.

I had a similar experience to you when building a wristwatch classifier and followed the same procedure as yourself. It was good at recognizing 3 classes of watch but when I increased it to 100 classes the performance was very poor. I think when the dataset like the one you have has images that look quite similar, its much more difficult to build good classifiers. One way to improve my wristwatch classifier was to combine it with a character recognition to recognize the names such as Rolex. Not sure what you could do in your case.

Good work.

mrfabulous1 :smiley::smiley: