Lesson 3 - Official Topic

Can one reliably do classification of an image object as belonging to given classes & none of them?
(in this case one of the bears vs not a bear ?)

You could try this blog https://asvcode.github.io/Blogs/fastai/augmentation/image-augmentation/2020/03/26/Fastai2-Image-Augmentation.html

1 Like

Yes, you would use a sigmoid activation function which gives probability of class present. I think this may be discussed when talking about multi-label models later in class.

2 Likes

The purpose of the augmentation step is to better train and improve your model by exposing it to a wider variety of examples. Therefore augmentation is applied only to the training data, not to validation or test data.

2 Likes

So if you added a different type of bear would you want to retrain entirely then? If not, what sort of scenarios would involve retraining on all the data?

Also, is this covered in any of the lessons? I can’t actually think of a way to train on JUST new data

1 Like

If you want to try deployment to an Azure function - take a look at @zenlytix topic


I tried this out earlier today and it worked a treat.

2 Likes

Not only if you have a new type of bear. If you have pictures from a new region, a different weather, different times of days… all of those could be useful to make your model more robust by retraining it.

3 Likes

An interesting idea, but would require a tremendous amount of training data to get the model to understand the “not bear” class!

1 Like

Would it really though? couldn’t we use a dataset of random images without bears? Obviously it would have to be in the wilderness so that the classifier doesn’t become a wilderness detector!

Not necesarily, just a new 150 images with no bears in them would probably be a good start.

3 Likes

I thought about this after lecture 2. I realized that it is easy to create one class neural network than create non bear class

2 Likes

Having done a sports identifier sample for the last course I found my ‘not a sport’ category was very difficult to curate. A scene with grass? Must be cricket!

1 Like

Do widgets work in colab? I have not had much success using image cleaner in it?

will voila work in Paperspace?

1 Like

Yes definitely, you have to be careful about the background. Hence I say, “it would have to be in the wilderness so that the classifier doesn’t become a wilderness detector!”

1 Like

No, Google made their own version of the jupyter notebook and it’s not 100% compatible. Widgets are one of the big things that is not compatible.

3 Likes

Another potential option is using Streamlit where traditional python programs can be converted into interactive web apps. I haven’t tried it but I have heard great things about it.

3 Likes

Is the ImageClassifierCleaner notebook available in the repo to see more on how to build IPython widgets?

It will work anywhere you can host a notebook, normally.

2 Likes

Actually I think if you use the experimental instructions here you can get it to work:

(see here)