Git Product home page Git Product logo

Comments (1)

geaxgx avatar geaxgx commented on June 30, 2024

@Christopheraburns
I think the method of disambiguation (determining if you have two 9's or only one) depends on how the cards are presented to the camera. Is the camera present during the whole dealing of the cards, or just once (you get only one picture of the scene) ?
In the first case, if the cards are dealt one by one and if a new card never completly cover the cards already dealt, as it is the case in blackjack I think (correct me if I'm wrong), it is easy to determine the new card by comparing the values and occurences of the cards detected in every frame. Let's say at time t0, we have 0 occurences of 9 of hearts. At time t1, the dealer put a 9 of hearts on the scene. We will detect 2 occurences. At time t2, another 9 of hearts is dealt. Now we detect 3 or 4 occurences, depending if the previous 9 of hearts is partially covered or not. This way, it is easy to maintain up-to-date the count of 9 of hearts.
In the case where you just have one picture of the scene, maybe you can rely on some knowledge you have on how the cards are placed. For instance, if the cards are always roughly parallel to, let's say, the y-axis of the picture, then you just need to learn to detect the upper-left corners of the cards (or the lower-right corner, but not both). This way, for one card dealt, you detect only one occurence. Practically, it means you have to modify accordingly the scripts that generate the dataset.
Lastly, if there is no such restriction, well, there is still some geometric constraints you can rely on to determine if 2 corners are from the same card or not. If there are from the same cards, you know that they are in opposite direction and at a fixed distance one from the other. You can determine the orientation of one corner by applying some "classical" computer vision techniques on the detected zone given by yolo (contour detection, rotated bounding box,...).

Hope it helps :-)

from playing-card-detection.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.