github.com/fortierq/mtgscan ↗
Recognition of Magic cards on images. Detection with OCR.
Open this visualization on its own page →
Contributors
2
Lines of Code
126
From
2020-10-26
To
2021-01-09
About fortierq/mtgscan
MTGScan is a Python tool that identifies Magic: The Gathering cards from images using optical character recognition (OCR) technology. The system processes screenshots or photos of Magic cards, extracts text using OCR, and then matches the detected text against a comprehensive card database from MTGJSON using fuzzy string matching powered by SymSpell to handle spelling variations and recognition errors.
The project currently integrates with Azure's Computer Vision API for OCR capabilities, though its architecture is designed to support additional OCR providers through inheritance from a base OCR class. Users can deploy the tool locally using Poetry, pip, or Docker, and it requires appropriate API credentials to function. The project includes a test suite with sample images and expected decklists, allowing developers to verify accuracy and track OCR performance metrics.
MTGScan is aimed at Magic: The Gathering players and enthusiasts who want to digitize physical card collections or deck lists through image scanning rather than manual entry. A web application version was previously available but is currently offline, though the separate code repository for that interface remains accessible.