naina
Copyright 2026 the naina authors

This product includes software developed as part of the naina project,
licensed under the Apache License, Version 2.0. See LICENSE for the full
text.

================================================================================
Redistributed model weights
================================================================================

naina does not train models. It mirrors pre-trained weights published by the
PaddleOCR project and redistributes them unmodified through its own GitHub
Release, so that an upstream re-tag, move, or deletion cannot break installs.

All redistributed weights are licensed under the Apache License, Version 2.0.

Upstream project:
    PaddleOCR — https://github.com/PaddlePaddle/PaddleOCR
    Copyright PaddlePaddle Authors
    Licensed under the Apache License, Version 2.0

The weights are NOT stored in this repository. They are published as release
assets and fetched on first use, each pinned by sha256 in
models/registry.yaml. Every manifest entry also records a `source_url` naming
the exact upstream artifact the bytes came from, so provenance remains
auditable.

--------------------------------------------------------------------------------
Text detection and recognition — PP-OCRv6
--------------------------------------------------------------------------------
Paper:  "PP-OCRv6: From 1.5M to 34.5M Parameters, Surpassing Billion-Scale
        VLMs on OCR Tasks", arXiv:2606.13108
Source: https://huggingface.co/PaddlePaddle

    ppocrv6_tiny_det.onnx            <- PP-OCRv6_tiny_det_onnx/inference.onnx
    ppocrv6_tiny_rec.onnx            <- PP-OCRv6_tiny_rec_onnx/inference.onnx
    ppocrv6_tiny_rec_charset.yml     <- PP-OCRv6_tiny_rec_onnx/inference.yml
    ppocrv6_small_det.onnx           <- PP-OCRv6_small_det_onnx/inference.onnx
    ppocrv6_small_rec.onnx           <- PP-OCRv6_small_rec_onnx/inference.onnx
    ppocrv6_small_rec_charset.yml    <- PP-OCRv6_small_rec_onnx/inference.yml
    ppocrv6_medium_det.onnx          <- PP-OCRv6_medium_det_onnx/inference.onnx
    ppocrv6_medium_rec.onnx          <- PP-OCRv6_medium_rec_onnx/inference.onnx
    ppocrv6_medium_rec_charset.yml   <- PP-OCRv6_medium_rec_onnx/inference.yml

The `*_charset.yml` files are the upstream `inference.yml` model
configurations, mirrored unmodified. naina reads only the
`PostProcess.character_dict` list from them.

--------------------------------------------------------------------------------
Layout analysis — PP-DocLayout
--------------------------------------------------------------------------------
Source: https://huggingface.co/PaddlePaddle

    ppdoclayoutv3.onnx    <- PP-DocLayoutV3_onnx/inference.onnx   (mirrored as-is)

PaddleOCR publishes no ONNX build of the smaller PP-DocLayout-S and -M, so
naina converts them itself from the upstream Paddle weights using
tools/paddle2onnx_layout.py. These are DERIVED artifacts, not verbatim copies:

    ppdoclayout_s.onnx    <- PP-DocLayout-S/inference.{json,pdiparams}
    ppdoclayout_m.onnx    <- PP-DocLayout-M/inference.{json,pdiparams}

The conversion changes only the serialisation format; no weights are retrained
or altered. It is byte-deterministic, so anyone can re-run the tool and confirm
the published sha256, and it is verified per-column against the Paddle original
(class ids exact, scores to 5e-7, box coordinates to 3e-4 of a pixel).

Without these conversions, layout analysis would exist only at naina's 269 MB
tier, and the 11 MB tier could not describe document structure at all.

================================================================================
Third-party build and runtime dependencies
================================================================================

These are not redistributed by naina; they are located at build time.

    ONNX Runtime  — MIT License      — https://github.com/microsoft/onnxruntime
    NCNN          — BSD 3-Clause     — https://github.com/Tencent/ncnn
    yaml-cpp      — MIT License      — https://github.com/jbeder/yaml-cpp
    libcurl       — curl License     — https://curl.se/docs/copyright.html
    pybind11      — BSD 3-Clause     — https://github.com/pybind/pybind11
                                       (Python binding only)
    node-addon-api — MIT License     — https://github.com/nodejs/node-addon-api
                                       (Node binding only)
