jogerj / genshin-tcg-cbir

Scan Genshin Impact's Genius Invokation TCG deck images and identify all cards in the deck!

Home Page:https://jogerj.github.io/genshin-tcg-cbir

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Genshin TCG Deck Scanner

Implementation of Contend-Based Image Retrieval (CBIR) to extract data from Genshin Impact generated Genius Invokation TCG image

Extracting deck data

  1. To generate image, go to the deck in Casket of Tomes, select the "..." menu -> "Preview Deck" -> "Share" -> "Save". The image will be stored in your ScreenShots folder. See samples folder for examples.

    Share Deck

  2. Run the following:

    • Python 3:

      cd python
      python generate_json.py -q path/to/image.png -r ../images
    • In web browser:

      cd js/genshin-tcg-cbir
      npm run start    # run demo in browser

Indexing more cards

Should the game be updated with more cards, add them to the respective directory and rerun the following to reindex all cards:

cd python
python indexer.py --dataset ../images/characters --index characters_index.csv
python indexer.py --dataset ../images/actions --index actions_index.csv

or

cd js/genshin-tcg-cbir
npm run index    # run once to index all

Index files generated in Python and Node.js are incompatible with each other, so generate them separately.

License

MIT

This project is not affiliated with HoYoVerse. Genshin Impact, game content and materials are trademarks and copyrights of HoYoVerse.

About

Scan Genshin Impact's Genius Invokation TCG deck images and identify all cards in the deck!

https://jogerj.github.io/genshin-tcg-cbir

License:MIT License


Languages

Language:TypeScript 52.0%Language:Python 38.7%Language:HTML 6.0%Language:CSS 3.2%