Image Classification via Object Detection?

As I was working on an example project for lessons 1 & 2 of the course I had a question about a technique and was wondering if it’s a good idea (at least in some cases).

For my example project I was working on classifying playing cards by using two models. One to classify a card by rank and one by its suit. This seems to work okay (current models I have are giving me 88% and 100% accuracy).

In this particular scenario though I was wondering if it would be more effective to perform object detection on the card where objects are things like “heart”, “club”, “3”, “A”,“4”, “spade”, etc. Since a playing card is mostly empty space with a few “objects” that we can use to determine what card it is this seems like a decent strategy.

Basically the Object Detection output can be used to classify the card by the presence of a certain object (e.g. if there’s a “heart” and a “3” object detected then it’s the “Three of Hearts”).

Does this make sense? Do you think it will perform better than the whole image classifiers? My intuition says that it will work better but I guess this is pretty much what the underlying classification models are essentially doing anyway.

Is the trade-off that it would be much slower to run on a test set once the model is trained?

I think you are better off with more training data or more data augmentation. In general object detection is a harder task. The underlying classification model does have to do this as well. I am a bit unsure on why you are not getting better results actually. Is your dataset public?

Yeah, I think I’ll just try both techniques and see for myself as a learning experience. I can gather more training examples and have a few ideas for ways to generate more from existing set.

It’s not publicly available, just one I’ve been manually putting together. Happy to share it but let me try a few more things before giving up :slight_smile:

Okay go for it! Though I don’t think asking for help is giving up :slight_smile:

Added ~200 more example images and was able to train a model with 100% accuracy for both rank and suit. I guess I just needed some more training data :slight_smile:

Still curious how the object detection method would perform.