Advice for image classification when classes are very, very similar

Hi @jeremy - Created a pull request to convert .cuda to use to_gpu syntax - But couldn’t test it because the model_summary was giving me an error. More details and screenshots in the pull request.

Hi @jeremy, Am interested in this too. Submitted for the first time to Kaggle a few hours earlier - now wondering how I could take this live on a website? Just to know the process and the easiest way to explain DL to folks and family. See, upload any pic of a dog and the program will predict what breed it is :slight_smile:

Any links / resources to the same will be really helpful. Thanks.

I wrote a Tornado App to wrap PyTorch Models. I can create a Sample Web App / API for FastAI and share it here by this weekend.

Update: Note sure if I can get to it by end of the week, but hopefully over the thanksgiving break.


@wgpubs @arjunrajkumar, Ive looked at getting models onto android but I have some learning to do. I took the android development course at Udacity to get knowledge on android. I used these resources on using models on android, it does however use tensorflow.

I have no idea what this is, but it sounds cool and useful!

My understanding is that we can save a model as a .pb file. I believe Jeremy said we will go through this at some point and then we can download this .pb file onto an android device to use as a classifier.

1 Like

Yeah. I am actually not sure if I can get to it by this weekend. But will create a sample app by end of the month.

In the meantime - here’s a sample pytorch app:

To do single image predictions with fastai, use the code here: How do we use our model against a specific image?


Hi @wgpubs, I am facing a similar type of issue, where classes are very difficult to distinguish. Can you please help me by giving me insights on how did you solve the problem?


Just try it first and see how the model does. That is essentially what I did and the results were actually really good.

Sometimes we tend to overthink things and imagine problems that aren’t really there. I’ve been burnt a few times myself trying to fix things in my data that didn’t need to be fixed. Lmk how it goes.


Thanks. Sure I will.

Hi @wgpubs, I really have tried a lot things. One problem is that there are four classes, and they are not evenly distributed. Also the classes are much similar. Can you give any advice in this regard?

No special secret sauce here. Using more data is probably the best advice.

I have also found a ‘helping hand’ works in some cases, a bit like the way we encourage a toddler to take its first steps by lifting it up to balance and giving it a gentle nudge. Too often we set ‘hard homework’ for networks, like throwing every piece of information we can at a problem, when we might very well know beforehand a distinguishing characteristic. eg why throw 11 channels of image information at a problem immediately when we know one channel in particular is key? You’d have to experiment what that means for you. Maybe start by training with some burger logos then grow the data set. Find something different about the burgers (one has lettuce and the other doesn’t?) and train there first, before throwing the whole dataset in. Don’t do too much of it, you want to let the toddler learn on its own.

It sounds to me like a cool project would be determining whether someone is an in-out-out person or not from their location, age, gender, income :slight_smile:

Great!. Thanks for your help. I really appreciate that.