Pokémon image classifier

A 1,025-class Pokémon image classifier based on a PyTorch/timm DenseNet121 backbone. This repository provides the trained PyTorch checkpoint, an ONNX export for CPU/mobile inference, and the class-label mapping.

Files

  • pokemon_classifier_1025.onnx — ONNX model for inference.
  • pokemon_classifier_1025_best.pth — PyTorch checkpoint for continued training or conversion.
  • pokemon_labels_1025.json — mapping from output index to National Pokédex ID and species name.

Intended use

Use this model for educational, research and entertaining purposes, including Pokémon image classification experiments and ONNX/Android integration. It may perform poorly on photographs, fan art, uncommon poses, multiple subjects, occlusions, or images outside the training distribution. Predictions are not authoritative identification.

Model architecture and input

The model is a timm DenseNet121 with a replacement 1,025-output classifier head. It expects RGB images resized to 224 × 224 and a float32 NCHW tensor with ImageNet normalization:

  • mean: [0.485, 0.456, 0.406]
  • standard deviation: [0.229, 0.224, 0.225]
  • input name: input
  • output name: logits

The ONNX export supports a dynamic batch dimension. Apply preprocessing before inference; the graph expects normalized tensors rather than raw image bytes.

Training data

The training images were collected for National Pokédex species 1–1025 from four providers: PokeAPI, Pokémon Database, PkmnCards, and Brave Images. Collection requested up to 100 images per species from each of the first three providers and up to 20 per species from Brave Images. Images were validated, normalized, deduplicated by SHA-256, and recorded with provenance in a manifest.

The dataset is not included in this model repository. Source images may be subject to the rights and terms of their respective owners. Hosting this model does not grant rights to the source images, Pokémon characters, names, or trademarks.

Usage

Check the GitHub repository for more details.

The script prints the top-five predictions and softmax scores. The PyTorch checkpoint can be fine-tuned with the train_finetune.py script from the accompanying GitHub project, then converted with convert_to_onnx.py.

Training and conversion credit

The fine-tuning workflow was inspired by the published checkpoint and project BiernyVR/pokemon-classifier-mobilenetv3. Despite its repository name, the checkpoint used here is a PyTorch/timm DenseNet121 model.

Limitations and licensing

This is an unofficial project and is not affiliated with or endorsed by Nintendo, Game Freak, or The Pokémon Company. Pokémon and related characters, names, and trademarks belong to their respective rights holders. The MIT metadata here applies to the original project code and does not grant rights to Pokémon intellectual property, third-party images, the training dataset, or model weights unless separately authorized.

Review the source providers' terms and applicable image rights before redistributing this model or using it commercially.

license: mit

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support