Share your work here ✅

I played Pokemon blue when I was a kid so i stive to be the very best and catch them all. Because of this childhood value, I’m trying to train the very best stool image classifier, I’m still trying to gather enough data for my bristol stool chart classifier and to save time, I wrote a quick little python script to grab photos from a gentleman’s blog who posts high quality photos of his bowel movements each day (I contacted him through email and explained what I’m doing. He said it’s fine to use his photos for this classifier and just to remember him when I’m famous.). I have a time.sleep(1) in there so blogspot doesn’t think I’m a bot and so far it’s working. I’ll post my script in here but it got me thinking. This is something you have to do a bunch for data science does fastai have an image/webscraping utility? I also wonder if I describe what I want to github copilot if it would know of more stool blogs…
I got 1047 images from running the for loop 50 times. so it worked.

import requests
import re
import time
url = "https://dailyscat.blogspot.com/search?updated-max=2022-12-26T06:33:00-08:00&updated-min=2011&max-results=700"
r = requests.get(url)
pics = re.findall('(https://lh3.googleusercontent.com.*\.png)', r.text)
for pic in pics:
    print('outside more fist pic', pic)
    res = requests.get(pic)
    with open(pic.split('/')[-1], 'wb') as wf:
        wf.write(res.content)
    time.sleep(1)
more = re.findall("blog-pager-older-link\' href=\'(https://dailyscat.blogspot.com/search?.*by-date)", r.text)
for i in range(10):
    r = requests.get(more[0]+'=true')
    pics = re.findall('(https://lh3.googleusercontent.com.*\.png)', r.text)
    for pic in pics:
        print('inside more fist pic',
        pic)
        res = requests.get(pic)
        with open(pic.split('/')[-1], 'wb') as wf:
            wf.write(res.content)
        time.sleep(1)
    more = re.findall("blog-pager-older-link\' href=\'(https://dailyscat.blogspot.com/search?.*by-date)", r.text)
1 Like

Distinguishing Which Rock Band among The Beatles, Led Zeppelin, Pink Floyd, The Rolling Stones, Aerosmith. ?

This is the model I made. (Link to Kaggle).This works terribly, and I expected it! An opportunity to learn something new. I picked five rock bands and trained the model to distinguish them. I knew that it was impossible to gain accuracy with the simplest model. First, they may appear in many different clothes, with unlimited background scenes, different eras, and many more variations.
And to make it even more challenging, this is a sample of the images downloaded for training the model!!

Pretty hopeless! Isn’t it? At least half of these six pictures have nothing to do with the actual bands. The remaining three are also very difficult to find a feature that the model can depend on. Therefore, my first question would be:

:question: What’s the suggested approach to make a model that can work? would it be first a segment training model to train on individual members of each band, then if finds a majority of those faces in a picture, to distinguish as that band? Or are advanced methods available that I am not aware of?

The results of the test were as follows:

mostly wrong, but then the other question I have is:

:question: why returned which_band does not correspond with the highest probability in probs. In defining the search terms I have used this order: searches = 'The Beatles', 'Led Zeppelin', 'Pink Floyd', 'The Rolling Stones', 'Aerosmith'. Therefore, I expect that First: returned tensor of probabilities represent:
[p(‘The Beatles’), p(‘Led Zeppelin’), p(‘Pink Floyd’), p(‘The Rolling Stones’), p(‘Aerosmith’)]
Second: That which_band picks the corresponding name with highest probability in probs. What is it that I am missing?

Thank you for your help. I hope this challenge will be helpful for others, too.

2 Likes

Experiment with…
dls.vocab

and…

pred, ndx, probs = learn.predict(...)
print(f'This is a {pred}')
print(f'Probability: {probs[ndx]}')
1 Like

One thing that may possibly help the model be more accurate and this is just a thought. I don’t know if it will actually help is to add duck duck go searches of individual band members to the directories of the bands. like Mic Jagger to the rolling stones dir and other members to each band directory. Hope this helps but if not may be worth the experiment.

Awesome idea! I think mixing band photos with album covers is going to make it very difficult though. Maybe clean the data so it is just photos of the band members? There is a good chance that could work. I recently wrote a program that distinguished between Korean and Vietnamese soup, which I think resemble each other to the same degree that Led Zeppelin and the Rolling Stones resemble each other :smile:

BTW, searching Duck Duck Go images for “[band name] band members” seems to do a pretty good job of returning photos that are mostly humans, so this might not even require you to manually clean the data. Perhaps just try tweaking your search query.

Thank you @jeremy and the whole team for this course. Using the techniques I’ve learned in this course, I’ve been able to move ten times faster than I would have imagined with my new startup. I recently did a recorded zoom call that explains how I’ve been building, maintaining and deploying models for hurricane intensity prediction. I did my best to give a shout-out to Fast.ai wherever I could. Here is the link to the video: Worldsphere.ai with Eduardo Siman - YouTube

If any fast.ai students would like to learn more about what I’m doing, I would love to chat. Also, I think it’s important to note - I am not a good programmer. I spent 10 years as a CIO/CTO managing teams of great programmers, but my previous programming experience was writing very basic programs in Python to count prime numbers, some Twitter scraping programs, and some simple bash scripts for running Hadoop and Spark on Linux. In other words, I would not hire myself as a programmer. This is why I am so thankful to @jeremy and this course and this community.
I had probably read 10 deep learning books before I decided to start Worldsphere.ai but I honestly didn’t know how to get started with my first deep learning model. Being able to fine tune a state of the art model after the first lecture and then deploy it to production was incredible. Here are some of the topics covered in the video. I am currently looking for a co-founder and for developers who can help me scale the work I am doing. Anyone who has taken this course will be at the top of my list.
Topics:

  1. How to use a Jupyter notebook to access data on google drive.
  2. How to use regex expressions to create labels from different types of file names.
  3. How to pre-process the image data, use a data loader, and fine-tune a model from timm (all of this is covered in depth in the fast.ai course)
  4. How to use weights and biases (wandb) to track your experiments, access model files, and run sweeps on hyper parameters.
  5. How to use huggingface spaces to publish your model to production. Particularly how to do this by using the artifacts feature in weights and biases.
  6. How to use the new “embed” feature in huggingface to use your model on any webpage.
  7. A fairly lengthy discussion about the difference between using google collab free or paying for premium GPUs. I mostly review convnext models and how long they take to train on approximately 30,000 images.
  8. Exploration of using Keras on a ConvLSTM model for predicting the next image in a sequence of hurricane satellite images. I have combined Fast.ai and Keras quite easily in my notebooks.

Thank you again to @jeremy and the whole fast.ai community. I don’t know if my startup will ever amount to much more than a fun project, but I can honestly say that I have enjoyed the first few months so much because of the tools I gained from this course.

Sincerely,
Eduardo Siman
Founder and Chief Hurricane Officer
Worldsphere.ai

4 Likes

Hi all! Just to better understand basics of fastai api I trained a simple classifier that differentiates between human hands and hands that were generated by diffussion models. If you are interested take a look on kaggle and huggingface.

4 Likes

I finished the first two lessons and made a Image classifier which figures out Peaky Blinders characters. It’s useless but it was fun to build and helped me reinforce some concepts.

I also started a blog following the advice and wrote my first ever blog post building this model.

My Blog: Classifying Peaky Blinders Characters using fast.ai

Hugging Face: Peaky blinders classifier

8 Likes

Hello :slight_smile:

I wanted to modify the lesson 1 notebook to create a multiclass computer vision model that could differentiate between

  • living rooms
  • bathrooms
  • buildings

this is because a long time ago I did a ML course and after that one project was to create a classifier to recognize indoor from outdoor pictures for a real estate listings website: at the time it was like that XKCD comic, I thought it would have been nearly impossible for me to achieve that.

Much to my amazement, not only I managed to have something working, but I did so with very few lines of code and the resulting model was smart enough that I could just feed a random living room image off a real estate website and it was correctly classified without any preprocessing

I am amazed beyond words!

Thank you for the course and this beautiful library

1 Like

A Car Classifier

I finished working through lesson 2 of the course. Jeremy, thank you for the amazing videos. I love that you speak very simply and don’t stress on jargon much. Here’s a link
Car Classifier

Also, received a lot of help from the forum and Tanishq’s tutorial on Gradio.
Onto lesson 3 now!

2 Likes

Started the course yesterday. Tried implementing a Playstation Classifier and got almost a 100% accuracy with resnet50.

Hi, yesterday i did my first project with AI, it is an emotion classifier and it was able to reach 100% accuracy :smiley: !

Emotion Classifier

This model can differentiate between anger, sadness, fear, anxiety, disgust, calmness and happiness

1 Like

I made a version of FastAI 2022 lesson 1 to discriminate between penguins and penguin costumes. I tested it on a dog dressed as a penguin and it passed!

Is it a penguin?

This is a: penguin costume.
Probability it's a penguin: 0.02494448982179164886474609375
4 Likes

My Kaggle notebook: “Clothing classifier: What is my wearing style?”
It will tell from 4 options: casual wear; business sttire; sportswear; pajamas.

Also, the Hugging Face interface based on the exported model:

However, the output acuracy does not seem to be satisfying. How can I improve the accuracy?

2 Likes

I found the same. I run into a “no module named ‘fastai’” error without the requirements.txt.

My image classifier:

Is it a bee, wasp or hornet?

image

Context: Hornets are invasive species which kill honeybees and thus detrimental to bee farming business. Such a classifier might potentially help bee keepers and other civil services to take timely action.

Conclusions: Not only data quality but data quantity matters as well. For the above stated problem. Increasing the dataset size from 30 to 50 images per search term has resulted in error_rate gone down from 0.294 to 0.04

I am curious:

  1. Is there way that I could know in advance the appropriate dataset size for this problem? maybe even 40 images could have been sufficient instead of 50?

  2. I experimented with no. of epochs as a first attempt to improve performance, which didn’t helped. Is there way to make a “smart” guess about no. of epochs for any given problem?

Suggestions/Feedback welcome

Please ignore any typos as I am sure there are many :wink:

First timer taking fast.ai courses. I just completed lesson 2 and wanted to share an app I built - men style classifier. https://jadekang0611-men-style-classifier.hf.space

I’ve just watched the first lecture of the course and decided to get my hands dirty by building a simple model that can classify between 3 popular Fender guitars.

It works pretty well, though I could only get it down to an error rate of about 11% at best. Not sure how to improve on this yet, but it seems pretty accurate when I test it with random images from duck duck go.

EDIT
I’ve been able to bring down the error rate significantly by using RandomResizedCrop as the item transformer. Lesson #2 ftw!

image

4 Likes

Hi All,

I have completed lecture 2 and build a model to classify bird species using Kaggle dataset and deployed it in Huggingface Spaces.

Dataset : BIRDS 450 SPECIES- IMAGE CLASSIFICATION | Kaggle

Model Demo : Bird Classification - a Hugging Face Space by Sathrukan

1 Like

Hi, the link doesn’t work out.