riftsight-vision
Copyright 2026 Raymond Yang

This product is licensed under the Apache License, Version 2.0. The full text is
in the file LICENSE. The label manifests under data/ are licensed under the
Creative Commons Attribution 4.0 International license; see LICENSE-DATA.

These statements describe this repository and its own Riftbound release. A
product that builds on this code for another game carries its own notice for
that game's names, card data and art; the Riot Games statements below do not
apply to that data.

------------------------------------------------------------------------------
Not endorsed
------------------------------------------------------------------------------

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

------------------------------------------------------------------------------
What the license grant covers
------------------------------------------------------------------------------

The Apache-2.0 grant covers this project's own work: the code, the
documentation, and what this project's training added to the model weights.
The same grant covers this project's own work in the other release assets it
computes, the embedding bank and the identity groups, and its own selection and
arrangement in the catalog. The card names, ids and other card data in the
catalog belong to Riot Games and are not licensed here.

It does not cover, and cannot grant rights in, material that belongs to others:

  * The embedding bank is computed from card images, and the released weights
    were trained on card images and on gameplay footage. This repository does
    not contain those images and does not license them. The bank and the
    weights derive from card images this repository does not license.
  * The released weights start from two pretrained checkpoints published by
    others, named below. Their terms are theirs.
  * The label manifests point at public videos by id. The CC BY 4.0 license
    covers the annotations only. Every video stays with whoever holds its
    rights.
  * The name RiftSight and its logo are not licensed. See TRADEMARK.md.

PROVENANCE.md lists every starting point with its file, version and hash.

------------------------------------------------------------------------------
YOLOX
License: Apache-2.0
Upstream: https://github.com/Megvii-BaseDetection/YOLOX
Copyright (c) 2021-2022 Megvii Inc. All rights reserved.
------------------------------------------------------------------------------

The released detector weights are a modified, fine-tuned derivative of the
YOLOX-Nano COCO-pretrained weights by Megvii Inc. (yolox_nano.pth, release
0.1.1rc0). Modified by this project: the class-prediction layers were replaced
by two classes (card face, card back) and the network was trained further.

Two source files contain code adapted from YOLOX at commit
6ddff4824372906469a7fae2dc3206c7aa4bbaee and state their changes at the top:

  * cardvision/train_detector/loss.py (from yolox/models/yolo_head.py):
    modified so that the objectness loss leaves out anchors in ignore regions.
  * cardvision/train_detector/augment.py (from
    yolox/data/datasets/mosaicdetection.py and yolox/data/data_augment.py):
    modified so that mosaic tiles come from named streams in stated shares and
    carry face, back and ignore codes.

The network, the assignment of anchors to targets and the optimizer set-up are
called from the YOLOX package and are not copied here. YOLOX is not bundled; it
is installed separately by whoever trains or exports a detector.

YOLOX is licensed under the Apache License, Version 2.0, the same license as
this project. Its text is in the file LICENSE. The upstream repository has no
NOTICE file.

------------------------------------------------------------------------------
torchvision
License: BSD-3-Clause
Upstream: https://github.com/pytorch/vision
Copyright (c) Soumith Chintala 2016, All rights reserved.
------------------------------------------------------------------------------

The recognizer's network is torchvision's MobileNetV3-Small without its
classifier. The released recognizer weights were initialized from torchvision's
MobileNetV3-Small ImageNet weights (MobileNet_V3_Small_Weights.IMAGENET1K_V1)
and trained further by this project. Those weights were pretrained by
torchvision's authors on the ImageNet-1k dataset. torchvision's documentation
says that pretrained weights may carry terms from the dataset they were trained
on. torchvision is not bundled.

The torchvision license, as published upstream:

BSD 3-Clause License

Copyright (c) Soumith Chintala 2016,
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this
  list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright notice,
  this list of conditions and the following disclaimer in the documentation
  and/or other materials provided with the distribution.

* Neither the name of the copyright holder nor the names of its
  contributors may be used to endorse or promote products derived from
  this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

------------------------------------------------------------------------------
Pillow
License: MIT-CMU
Upstream: https://github.com/python-pillow/Pillow
Copyright © 1997-2011 by Secret Labs AB
Copyright © 1995-2011 by Fredrik Lundh and contributors
Copyright © 2010 by Jeffrey 'Alex' Clark and contributors
------------------------------------------------------------------------------

One source file is a re-implementation, in TypeScript, of a routine of Pillow,
and says so at the top:

  * browser/src/resize.ts (from src/libImaging/Resample.c, the 8-bit path of
    ImagingResample with the bilinear filter, as of Pillow 10): rewritten for
    one layout (RGBA in, RGB out) and a resize of the whole image, so that a
    browser feeds the detector the same pixels that
    Image.resize(size, Image.BILINEAR) gives the Python package. The tests
    compare its output, byte for byte, with Pillow's.

Pillow is not bundled. The Python package uses it as an installed dependency.

The Pillow license, as published upstream:

The Python Imaging Library (PIL) is

    Copyright © 1997-2011 by Secret Labs AB
    Copyright © 1995-2011 by Fredrik Lundh and contributors

Pillow is the friendly PIL fork. It is

    Copyright © 2010 by Jeffrey 'Alex' Clark and contributors

Like PIL, Pillow is licensed under the open source MIT-CMU License:

By obtaining, using, and/or copying this software and/or its associated
documentation, you agree that you have read, understood, and will comply
with the following terms and conditions:

Permission to use, copy, modify and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appears in all copies, and that
both that copyright notice and this permission notice appear in supporting
documentation, and that the name of Secret Labs AB or the author not be
used in advertising or publicity pertaining to distribution of the software
without specific, written prior permission.

SECRET LABS AB AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.
IN NO EVENT SHALL SECRET LABS AB OR THE AUTHOR BE LIABLE FOR ANY SPECIAL,
INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.

------------------------------------------------------------------------------
OpenCV
License: Apache-2.0
Upstream: https://github.com/opencv/opencv
Copyright (C) 2000-2022, Intel Corporation, all rights reserved.
Copyright (C) 2009-2011, Willow Garage Inc., all rights reserved.
Copyright (C) 2009-2016, NVIDIA Corporation, all rights reserved.
Copyright (C) 2010-2013, Advanced Micro Devices, Inc., all rights reserved.
Copyright (C) 2015-2023, OpenCV Foundation, all rights reserved.
Copyright (C) 2008-2016, Itseez Inc., all rights reserved.
Copyright (C) 2019-2023, Xperience AI, all rights reserved.
Copyright (C) 2019-2022, Shenzhen Institute of Artificial Intelligence and
Robotics for Society, all rights reserved.
Copyright (C) 2022-2023, Southern University of Science And Technology, all
rights reserved.
Copyright (C) 2023-2025, OpenCV AI, all rights reserved.
Copyright (C) 2024, Bigvision LLC, all rights reserved.
------------------------------------------------------------------------------

The Python package's geometric stage uses OpenCV as an installed dependency
(the "geometric" extra). For a web browser, browser/scripts/build-opencv.mjs
builds OpenCV.js from OpenCV's own sources, at the tag that
browser/opencv.lock.json pins (5.0.0), with only the functions the stage calls
(browser/scripts/opencv-whitelist.py). The build is not kept in this
repository. It is compiled from OpenCV unmodified. The script writes the
licenses of what it holds beside it, in opencv.mjs.LEGAL.txt.

OpenCV is licensed under the Apache License, Version 2.0, the same license as
this project. Its text is in the file LICENSE. The upstream repository has no
NOTICE file.

OpenCV's build compiles in one third-party library, the copy of zlib (1.3.2)
that OpenCV bundles in 3rdparty/zlib: (C) 1995-2026 Jean-loup Gailly and Mark
Adler, under the zlib license. Its text is written beside the build, in
opencv.mjs.LEGAL.txt.

------------------------------------------------------------------------------
Emscripten
License: MIT or University of Illinois/NCSA Open Source License
Upstream: https://github.com/emscripten-core/emscripten
Copyright (c) 2010-2014 Emscripten authors, see AUTHORS file.
------------------------------------------------------------------------------

Emscripten (4.0.20, as browser/opencv.lock.json pins) compiles OpenCV.js. Its
JavaScript runtime and parts of its system libraries are compiled into the
build: musl libc (MIT), and libc++, libc++abi and compiler-rt from LLVM
(Apache-2.0 WITH LLVM-exception). The full texts of these licenses are written
beside the build, in opencv.mjs.LEGAL.txt, by browser/scripts/build-opencv.mjs.
None of it is kept in this repository.
