
lookup_card_prediction ( card_prediction = pred_result ) print ( detected_card. exec ( "/path/to/image" ) detected_card = recognizer. SINGLE_IMAGE, set_name = "master" ) pred_result = recognizer. Optional: The default OCR backend used by CardRecognizer is easy_ocr which is installed via the conda, but if you choose to use PyTesseract instead, you will need to install it: sudo apt install tesseract-ocrĮxample Usage to Recognize a Card in a Single Image: from card_recognizer import CardRecognizer, OperatingMode recognizer = CardRecognizer ( mode = OperatingMode. If processing video files, you may also need to download and install FFMPEG ( ) which is used to uncompress videos into image frames. Otherwise, the CardRecognizer will default to CPU which is substantially slower and not recommended for batch processing. If CUDA is available, the CardRecognizer will automatically use it. Note that the CardRecognizer works MUCH (~5x-10x) faster on NVIDIA GPU, so it is highly recommended that you have CUDA. vis ()Įxample analysis of a booster pack opening video:

set_output_path ( output_path = "out_figs" ) # run recognizer on video and visualize results pulls = recognizer. set_summary_file ( summary_file = "summary.txt" ) recognizer.

from card_recognizer import CardRecognizer, OperatingMode # init and set output paths recognizer = CardRecognizer ( mode = OperatingMode. Recognize a Pokémon Card in an image or video.
