Answers.Body: <p>Although it was not crystal clear, we'll assume that by, "Multiple cards of the same class in one picture," is meant that multiple cards of identical suit and rank will be grouped together in the same example image but each card in the image will be selected from a unique deck.</p>
  
  <p>That arrangement would only be fruitful if the objective of training was to classify, flag, or otherwise analyze the same kind of groupings after training. Otherwise, it would likely be most productive and efficient to first devise a way to divide up the images by deck so that the focus of learning is detection of the three dimensions or perhaps just the first two, depending on the intended use of the trained network.</p>
  
  <ul>
  <li>Rank</li>
  <li>Suit</li>
  <li>Style</li>
  </ul>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-04-20T15:37:14.843Z
Answers.LastActivityDate: 2019-04-20T15:37:14.843Z
Answers.UserDisplayName: Douglas Daseeco
Body: <p>I want to train an AI to detect the class (i.e. suit and rank) of playing cards. Playing cards from different decks may use slightly different shapes or colors to represent these attributes, and I want the system to work across many decks. I bought many different decks, scanned and labeled them. Next up would be to create training data with an augmentation library. I found two examples of how other people did that:</p>
  <ol>
  <li><a href="https://www.tooploox.com/blog/card-detection-using-yolo-on-android" rel="nofollow noreferrer">Image detection using YOLO algorithm and poker cards</a></li>
  <li><a href="https://www.youtube.com/watch?v=pnntrewH0xg" rel="nofollow noreferrer">Playing card detection with YOLO</a></li>
  </ol>
  <p>The problem is that I want my AI to be able to detect multiple cards of the same class in one picture. In the examples above, they put a label on the top left corner of a card. This makes sense since it is a very good indicator of what class the card is in. Unfortunately, every card has two of these labels.</p>
  <p>I think their solution returns &quot;detected&quot; if any instance of a given label is found. But many cards with the same label could be in the same picture, and I am not sure if I can detect the quantity of the class with this solution. For example, if there are 2 Ace of Clubs in a picture, I would like my system to output &quot;2&quot;, rather than &quot;detected&quot;.</p>
  <p>Do you think it is feasible to mark the whole card, prepare the data accordingly, and train an AI that detects the count as well?</p>
  
Tags: <neural-networks><classification><image-recognition><yolo><data-labelling>
Title: How to detect multiple playing cards of the same class with a neural network?
UserDisplayName: Luca Hofmann
ThreadText: # How to detect multiple playing cards of the same class with a neural network?
  
  (Asked by: username_0 on 2019-04-18)
  
  I want to train an AI to detect the class (i.e. suit and rank) of playing cards. Playing cards from different decks may use slightly different shapes or colors to represent these attributes, and I want the system to work across many decks. I bought many different decks, scanned and labeled them. Next up would be to create training data with an augmentation library. I found two examples of how other people did that:
  
  1. [Image detection using YOLO algorithm and poker cards](https://www.tooploox.com/blog/card-detection-using-yolo-on-android)
  2. [Playing card detection with YOLO](https://www.youtube.com/watch?v=pnntrewH0xg)
  
  The problem is that I want my AI to be able to detect multiple cards of the same class in one picture. In the examples above, they put a label on the top left corner of a card. This makes sense since it is a very good indicator of what class the card is in. Unfortunately, every card has two of these labels.
  
  I think their solution returns "detected" if any instance of a given label is found. But many cards with the same label could be in the same picture, and I am not sure if I can detect the quantity of the class with this solution. For example, if there are 2 Ace of Clubs in a picture, I would like my system to output "2", rather than "detected".
  
  Do you think it is feasible to mark the whole card, prepare the data accordingly, and train an AI that detects the count as well?
  
  **Tags:** neural-networks, classification, image-recognition, yolo, data-labelling
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2019-04-20. Score: 0
  
  Although it was not crystal clear, we'll assume that by, "Multiple cards of the same class in one picture," is meant that multiple cards of identical suit and rank will be grouped together in the same example image but each card in the image will be selected from a unique deck.
  
  That arrangement would only be fruitful if the objective of training was to classify, flag, or otherwise analyze the same kind of groupings after training. Otherwise, it would likely be most productive and efficient to first devise a way to divide up the images by deck so that the focus of learning is detection of the three dimensions or perhaps just the first two, depending on the intended use of the trained network.
  
  * Rank
  * Suit
  * Style
  
  
  ---
  
  