TransWikia.com

Playing cards object detection problem

Data Science Asked on March 21, 2021

I’m trying to train an object detection model to detect some of playing cards for example it will detect 1,2,3, king, queen and jack.

And I’m making a class of not and I have put examples of other cards such as 4,5,6,7,8,9 but for me it doesn’t make sense to make this additional class.

So how to solve the problem of detecting other kind of cards as an objects should I make this class or remove it and keep only the required classes?

One Answer

In your case you have 3 options for training your model:

  1. Make a class for each card number, so 13 classes.
  2. Make a class for 1, 2, 3, king, queen, jack and one bucket class for "other", so 7 classes.
  3. Make a class for 1, 2, 3, king, queen, and jack, so 6 classes. And whenever the model is not confident of any, assume it is "other".

Best would be option 1.

Option 1 would be the more difficult to get data for because you need labelled data for more classes, but that should not be a problem because it seems you already have it.

Option 1 allows your model to classify all classes, and let's you achieve the same as option 2 with post processing (i.e. if predicted_class in [4,5,6,7,8,9] then "other").

Option 2 could work, but the numbers in the "other" class are just as different from each other as to 1, 2 and 3. To be able to make this distinction, the first intuition is that a "larger" model would be needed in comparison to option 1. This approach would be handy if the "other" class is not similar to the other classes. For example, a model that classifies sports cars, family cars, clown cars and "other vehicles" (i.e. tractors, bikes and trucks).

Option 3 is best left for tasks that the "other" class is not defined, or too large to model. For example, a model that classifies if the playing cards are Uno, or Poker, or Blitz, or "any other game" card. In this case, there are too many "other" types of game cards for you to label and model.

Answered by Bruno Lubascher on March 21, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP