Skip to main content

RiftSight vision: open card recognition for gameplay video

Latest release Tests Browser runtime tests Code and weights: Apache-2.0 Labels: CC BY 4.0 Python 3.11 or later Demo: try it in your browser

riftsight-vision

Open weights, labels and tools for recognizing trading cards in gameplay video: built for Riftbound, laid out so you can point it at your own game.

This is the card recognition that the RiftSight browser extension ships. Two small models find the cards in a video frame and name them, so that a viewer can rest the pointer on a card and read it.

A fan project. Not endorsed by Riot Games. Riftbound, the card names and the card art belong to Riot Games.

It reads cards. It cannot draw them. This is recognition, not image generation.

Try it with nothing to install: https://ryangswe.github.io/riftsight-vision/. Pick the toy game and move the pointer over its example table, pick the One Piece Card Game and drop a screenshot or a video of your own match, or pick "Your game (files on this computer)" and choose a release folder you made with this toolkit. The models run in your browser.

How well it works

On a small public evaluation set used during development, which flatters them somewhat, the released models named 92.5 % of readable card faces right, and 1.6 % of the names shown were wrong. The model card has the figures by source and the limits.

Install

The command-line tools are on PyPI as cardvision: python -m pip install cardvision, in a virtual environment with Python 3.11 or later. The toy walkthrough, the examples and browser/ are not in the package, so the Quickstart below uses a checkout of this repository.

Quickstart

This runs the whole pipeline on a toy game drawn from colored shapes: no card art, no video, no download beyond the Python packages. You need Python 3.11 or later (macOS, Linux, or Ubuntu under WSL 2 on Windows), and Node 22 or later for the browser part. Paste this into the terminal:

git clone https://github.com/ryangswe/riftsight-vision.git
cd riftsight-vision
python3 -m venv .venv
. .venv/bin/activate
python -m pip install -r requirements-lock.txt
python -m pip install --no-deps -e .
export WORK="$HOME/Downloads/cardvision-toy"
mkdir -p "$WORK"
python examples/toy_quickstart.py "$WORK/toy"

The last line it prints should be 1 frame, 6 faces, 3 named. The toy's models are stand-ins with no skill: they show what the tools do, not how well the released models work. docs/quickstart.md is the full walkthrough: Windows, what each line means, building a bank, naming the cards, and the demo page in a browser.

Documentation

I want to… Read
Start here: pick the page for me docs/start-here.md
Run the toy quickstart, step by step docs/quickstart.md
Get names on my own game's video, from my card list and images docs/your-game.md
Make a browser extension for my game docs/extension.md
Train the models for my game docs/train.md
Measure, with numbers I can state docs/measure.md

Everything else: docs/reference.md. A coding agent starts with AGENTS.md.

Built with this

Catalogs, banks and weights for other games live in their authors' own repositories, not here. If you have built something with this, open an issue and it is listed.

  • Kenbunshoku, a browser extension for One Piece Card Game videos, built on the browser runtime. Its catalog, bank, weights and labels are on Hugging Face (models, labels); its measurements are in the adapt guide.

How this was built

I'm a solo software engineer with some machine learning experience; computer vision isn't my core competency. I built this with heavy use of AI coding tools. It was checked with tests, with comparisons against the code that trained the released models, with a private held-out test scored once, and with outside reviews by other AI models and fresh AI sessions, not by people. docs/how-this-was-built.md says what each check does and does not show.

Support

One person maintains this. Issues are read once a week; removal and security requests are handled within 7 days. This repository is a maintained snapshot of what shipped, not a development trunk (SUPPORT.md). To report a card named wrong, see Reporting a wrong card: a video id and a time, never a frame or a screenshot.

If this is useful to you, you can support the work on Ko-fi: a thank-you that does not buy support beyond what is promised above.

License

  • Code and weights: Apache-2.0 (LICENSE), for this project's own work.
  • Bank, identity groups and catalog: Apache-2.0 for this project's own work in the bank and identity groups, and for the catalog's selection and arrangement; the card names, ids and other card data in the catalog are not licensed here (NOTICE).
  • Label manifests: CC BY 4.0, for the annotations only (LICENSE-DATA).
  • Starting points and attributions: NOTICE. The detector starts from YOLOX-Nano weights by Megvii; the recognizer from torchvision's MobileNetV3-Small weights.
  • What the grant covers: this project's own work. The bank and the weights derive from card images that this repository does not contain and does not license (NOTICE, docs/faq.md, the license table).

Trademark

The Apache license does not cover the RiftSight name or logo. A fork or a product built on this must use its own, and may say "based on RiftSight's open vision model" (TRADEMARK.md).

Not endorsed

RiftSight is a fan project and is not endorsed by Riot Games. Riftbound, the card names and the card art belong to Riot Games.

Metadata

Release files for cardvision 0.8.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cardvision 0.8.0
File Size Uploaded Provenance Actions
cardvision-0.8.0.tar.gz 565.4 kB With provenance Details for cardvision-0.8.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for cardvision 0.8.0
File Interpreter ABI Platform Actions
cardvision-0.8.0-py3-none-any.whl Python 3 none any Details for cardvision-0.8.0-py3-none-any.whl

Total release size: 1.2 MB

Release files / cardvision-0.8.0.tar.gz

Download URL cardvision-0.8.0.tar.gz
Size 565.4 kB
Tags Source
SHA-256 checksum
How to use checksums
fb352e852e8d12ebf1beeeb2a728bcf23e3a848a5c7f5e8a94714edb2b3ee484
BLAKE2b-256 checksum
How to use checksums
9697d7e7ca34a032bbb4f77836493630201a812cf05796e668a6f76a01ce6a66
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 2, 2026.

Transparency log

Release files / cardvision-0.8.0-py3-none-any.whl

Download URL cardvision-0.8.0-py3-none-any.whl
Size 652.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
71ac862c05feaf048b7515105435ceabdc68ab99d473a893ca7bbc3a03fd6784
BLAKE2b-256 checksum
How to use checksums
03e2bacfbf9ed04e47d28b46056d173d36cea888127155bb48311adea82399f1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 2, 2026.

Transparency log

Security for cardvision 0.8.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for cardvision-0.8.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 2, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page