Collectibles
Image Tools
Other industries
A guide for collectors and businesses looking to streamline their card-processing workflow with AI.
In the world of trading card scanning and seller tools, efficiency is crucial. Applications like CollX, VGPC, or Collectr handle millions of daily requests for card identification from images from hobby users as well as those who earn cash selling trading cards. Ximilar offers similar services, providing powerful API solutions for businesses looking to effortlessly integrate visual search and image recognition functionalities into their apps or websites, with the possibility of customization.
Today, I’d like to introduce a solution specifically designed for physical stores and warehouses to process their physical card collections quickly and efficiently using card scanners like those from Fujitsu. This tutorial is tailored for shop owners who need to handle large volumes of card images rapidly. We’ve developed a simple yet powerful script in Python 3 for card identification, condition assessment or grading. It also identifies comic books and reads slab labels from companies like PSA or Beckett. The script outputs a CSV file that can be easily imported into Google Sheets or Microsoft Excel. With a few modifications, it can also be adapted for use with your Shopify store or other seller tools, such as for eBay submissions. Let’s dive in and see how this tool can streamline your card-processing workflow!
In the previous blog post, I wrote about our REST API for identifying TCGs, sports cards, and comic book covers. The TCG identification service supports more trading card games, including the most popular ones like Pokémon, Yu-Gi-Oh!, Magic: The Gathering, One Piece, and Lorcana. For some games, it can also identify the correct language version of the card or determine if it is a foil/holographic card. Additionally, for certain TCG games, the system provides links or identification numbers to the TCG Player. You can try how it works here.
For sports cards, we can identify more than 5 million trading cards across six main sports categories: baseball, hockey, football, soccer, MMA, and basketball cards. Our system also supports the identification of parallel and reprint versions, with continuous improvements. Not only does it provide the best match, but it also offers alternative options to choose from.
If the trading cards are in slabs from major grading companies like PSA, Beckett, CGC, TAG, SGC, or ACE, the system can instantly identify graded cards and provide the slab company, grade, and certificate number.
As you can see, the functionality is complex, offering features such as bulk trading card scanning and language support, resulting in highly accurate identification. I believe that Ximilar Collectibles Recognition services are the most accurate solutions available on the market today. It is a true game-changer for card dealers, other collectors, or companies looking to be independent of third parties like CollX, Kronozio, or Card Dealer Pro, which automatically submit your cards to their marketplaces.
With Ximilar, you can handle your trading card scanning independently using our visual search technology and deep learning models. Our solutions are also designed to suit your specific needs through continuous improvements and customization. Whether you purchase, scan, analyze, search, or sell cards in bulk, our API empowers you to manage your collection without the constraints of third-party services.
Enough talk! Let’s analyze the bulk of your cards. First, you’ll need a folder with images of your cards. For testing, I’ve selected a small MTG and Pokémon card subset. You can put them on your scanner via top loader (link), or individually. Most card collectors use the Fujitsu Ricoh Fi-8170 scanner, which is one of the best scanners available. It can capture both the front and back sides of the cards.
For our purposes, we will only need the front side of the cards. To avoid unnecessary costs, remove the back side images from the folder or configure your scanner to store only the front side of the cards. Some scanners, like Fujitsu, can produce scan files with names such as 19032024-0001.jpg or 19032024-FRONT-0001.jpg. You can specify the naming format for the scan files. See the following video tutorial on how to set up a Fujitsu scanner via PaperStream Capture by MaxWaxPax:
My recommendation is to use similar settings for your Fujitsu scanner as it is in the video by MaxWaxPax and create multiple profiles for sideways and top-bottom trading card scanning. Ideally set up the scanner to produce only images for the front of the cards or distinguish the images with “front” or “back” suffix in the filename. However, if you already have an unstructured collection of card images, you can fully automate the selection of images showing the front sides using our AI Recognition of Collectibles.
Now, you’ll need an account in our App. Simply sign up with your personal or company email to get your unique API token for service authorization. Once you are in the App, copy your API key to the clipboard and save it into some file. To access the service via API, you’ll need to purchase at least a Business plan. Both tasks – getting the API key and purchasing a Business plan – can be completed in the platform’s settings in a matter of minutes.
Before running the script, ensure you have Python 3 installed. Some operating systems already include a version of Python, but we require at least Python 3.6. If you’re unsure, follow this tutorial on RealPython (link), which contains installation steps for Windows, macOS, and Linux:
You should be able to write in your command line, shell or terminal the similar command. Here’s mine at Mac:
michallukac@Michals-MacBook ~ % python --version && pip --version
If you don’t know how to run commands, read a short tutorial on using the terminal/shell/command line. I recommend this tutorial by DjangoGirls or watching some YouTube videos (here’s one for Windows and one for macOS). The output from the command should look similar to my example:
Python 3.9.18
pip 23.1 from /Users/michallukac/env/devel/lib/python3.9/site-packages/pip (python 3.9)
Next, you will need to install Python libraries argparse and requests via pip command:
pip install --upgrade argparse
pip install --upgrade requests
If everything passes, you’re now ready to use the script we’ve prepared to process your folder of card images!
Running the script is simple. You’ll need to use a terminal (macOS), shell (Linux), or command line (Windows), which is why we installed Python 3. Download the following file from one of these addresses:
Put this file/script next to the folder (tcgscans) with your trading card images or scans and in the terminal, write the following command:
python process_card_scans.py --folder tcgscans --api_key YOURAPIKEY --collectible tcg --output results.csv --select_images all
Hitting the enter will execute the script on the folder of tcgscans, and the progress bar will be shown. The folder will analyze all the images in the folder (select_images). You can interrupt the script (it automatically stores the results every 10 images to your specified output CSV file):
Each analysis of a scan (sports card) will consume 10 credits from your credit supply in your Ximilar account. Our App lets you watch your credit consumption closely under Reports. The Business 100k Plan allows you to analyze 10,000 raw cards. If you need to analyze millions of cards per month or your entire collection at once, reach out to us, and we can offer you a bulk discount.
Now we have our CSV file named results.csv. The CSV file contains the following fields: filename (name of the photo in the folder), status (ok or error), side (front or back), subcategory, full_name, name, year, card_number, series, set, set_code, and other additional fields.
The output format of the CSV depends on whether you analyze sports cards, TCG cards, comics, or slabs. Here is a visualization of the CSV file in Visual Studio Code:
We can import the file into Google Sheets or Microsoft Excel spreadsheet, edit it as needed, or generate printable checklists. The columns and data from the CSV can also be easily added to your Shopify product files or used for eBay submissions.
Additional information for card condition (or grading) can be added to the script via the –condition (–grading) parameter. For example, if your sports card scanner provides images with filenames such as 0001.jpg, 0002.jpg, 0003.jpg, etc., the following command will process images with odd numbering (e.g., 0001.jpg, 0003.jpg, …), identify the cards (name, card number, etc.), and also compute their condition (very good, excellent, etc.):
python process_card_scans.py --folder sportsfolder --api_key YOUR_API_KEY --collectible sport --output sport.csv --select_images odd --alternative --condition
With Ximilar’s AI-powered solutions, identifying and documenting your trading cards has never been easier. From trading card scanning, analyzing and organizing, to finding the current average market price, every step is streamlined to save you time and effort. I hope this guide helps you optimize your trading card workflow, making it easier to manage and showcase your collection. Happy collecting, whether it’s baseball or Pokémon cards!
Explore new features in our Ximilar App: streamlined Plan overview & Setup, Credit calculator, and API Credit pack pages.
Discover the latest AI tools for comic book and trading card identification, including slab label reading and automated metadata extraction.
Our latest AI innovations for fashion & home include automated product descriptions, enhanced fashion tagging, and home decor search.