Training Convolutional Neural Network on Individual Pokemon Cards

Python
Machine Learning
Deep Learning
Computer Vision
Transfer Learning
Using deep learning and transfer learning to identify specific Pokemon cards from the Scarlet & Violet series
Published

October 12, 2025

Project Overview

Pokemon cards have taken over the global collector’s market with prices ranging up to $200,000 USD for a single piece of inked paper stock. Prices for sealed packs have jumped to 2x or even 3x for just the newest sets and just this month the pokemon company released their newest series: Mega Evolutions. The hype around pokemon cards is growing at a fantastical rate and it doesn’t seem to be slowing.

I mentioned that there is a new series that was released. For non-pokemon trading card game (TCG) fans, here is how the pokemon card series work:

Every ~2 years, the pokemon company will release a new series corresponding to the new generation of pokemon in their pokemon games. In each series, a new set will be released every 2-3 months which consists of cards of pokemon that are in that generation. And, once in a while, the pokemon company will release special sets which are usually limited and have a special theme.

The objective of this project is to take the most recent series that just ended: Scarlet and Violet and train a model that can accurately predict the specific pokemon card given an image of that pokemon card. The output is an id classifier that will be able to identify the specific set that the card comes from and the specific pokemon.

Project Summary

This project builds a deep learning image classifier to identify specific Pokemon cards from the Scarlet & Violet series. Working with 3,595 unique card classes, I used transfer learning with EfficientNetV2-B0 to achieve 90.27% validation accuracy. The project involved extensive data augmentation (200 variations per card), AWS infrastructure management, and training on 719,000 images.

Key Highlights

  • Dataset: 3,595 unique Pokemon cards from 18 different sets in the Scarlet & Violet series
  • Data Augmentation: Generated 719,000 images (~110 GB) using Albumentations library
  • Model: EfficientNetV2-B0 with transfer learning from ImageNet
  • Final Accuracy: 90.27% validation accuracy on 3,595 classes
  • Infrastructure: AWS EC2 (t3a.medium for preprocessing, g4dn.2xlarge with Nvidia T4 for training)
  • Training Time: ~13 hours for 18 epochs

Technical Stack

Libraries & Frameworks:

  • TensorFlow / Keras
  • OpenCV (cv2)
  • Albumentations
  • NumPy
  • AWS SDK (boto3)

Infrastructure:

  • AWS EC2 instances
  • AWS S3 for data storage
  • Python 3.10+

Hardware:

  • Nvidia T4 GPU (16 GB VRAM)
  • 32 GB RAM
  • 225 GB NVMe SSD

Project Structure

This project is broken into 3 main sections:

  1. Data Collection and Image Augmentation - Collecting Pokemon card data and creating augmented training images
  2. Hardware Infrastructure and Time Considerations - Managing AWS resources and optimizing costs
  3. Model Training with EfficientNetV2-B0 - Building and training the classification model