Skip to main content

Open-source licenses

Sheet2PGN is built on the open-source software, models, font, icons, and data below, each used under its own license. These licenses apply to their respective components.

The full license texts are in third-party-licenses.txt.

JPEG photos

JPEG photos are decoded with mozjpeg (libjpeg-turbo), compiled to WebAssembly by jSquash. This software is based in part on the work of the Independent JPEG Group.

HEIC photos (LGPL)

HEIC photos are decoded with libheif and its HEVC decoder libde265, built for the web by libheif-js. They are licensed under the GNU Lesser General Public License, version 3 (LGPL and GPL texts).

The site loads libheif-js unmodified, as a separate file (/heif/1.23.2/libheif-bundle.mjs), so you can replace it with your own build. Its source code: libheif-js 1.23.2, built by libheif-emscripten v1.23.2 from libheif and libde265 1.0.15.

Download the corresponding sources from this site: libheif, libde265, build scripts, and libheif-js wrapper and bundling scripts. The build scripts use Emscripten 3.1.61. Unpack the libheif sources into the build scripts' libheif directory; the pinned upstream workflow and wrapper scripts describe the build and packaging steps.

You may modify these libraries. To use a compatible modified build, serve it in place of the separate module at the URL above, for example using browser local overrides. No terms of this site restrict those rights. These libraries come with no warranty; their licenses describe the applicable terms.

Chess engine: Stockfish (GPL)

The analysis board and game review run Stockfish 19 (lite), by the Stockfish developers, as built for the web by stockfish.js 19.0.0 (Nathan Rugg, Chess.com). It is free software under the GNU General Public License, version 3 (license text); it comes with no warranty.

The site serves the release's files unmodified and runs them as a separate program in your browser, which the page only sends positions to and reads lines from. Their complete source code, from this site: stockfish.js 19.0.0 source (engine, build scripts) and the neural network it embeds, nn-61e7af4bb97d.nnue.

Handwriting model and training data

Sheet2PGN uses a fine-tuned version (r10) of Gerhard Trippen's MIT-licensed chess-ocr-bilstm model for its Large OCR model, and a narrower version of it, trained from the fine-tuned model, for its Small OCR model. Fine-tuning used locally labeled cells and scoresheets from the Handwritten Chess Scoresheet (HCS) dataset by Owen Eicher, Denzel Farmer, Yiyan Li, and Nishatul Majid (2021), published under Creative Commons Attribution 3.0 Unported. The training process crops and preprocesses the cells and updates the model weights; the dataset images are not distributed by this site. The dataset license applies to the dataset, separately from the model's MIT license.

Recognition models

Libraries (JavaScript)

Libraries bundled with Next.js

Chess engine (Rust crates compiled to WebAssembly)

Model runtime (Rust crates and ported code compiled to WebAssembly)

Game review (Rust crates and ported code compiled to WebAssembly)

Font

Icons, opening data and decoder runtime