LibreSegformer third-party notice
==================================

LibreSegformer is a native reimplementation of SegFormer (SegFormer: Simple
and Efficient Design for Semantic Segmentation with Transformers, Xie et al.,
NeurIPS 2021) for semantic segmentation, covering sizes b0 through b5.

Architecture reference (NOT the code source):
  Source: https://github.com/NVlabs/SegFormer
  License: NVIDIA Source Code License (non-commercial, research-only)
  This repository's code was never read, copied, or derived from. It is
  cited here only for attribution to the paper's original authors.

Code source:
  Source: https://github.com/huggingface/transformers
          (models/segformer/{configuration_segformer.py, modeling_segformer.py})
  License: Apache License 2.0
  Copyright: 2021 NVIDIA and The HuggingFace Inc. team.
  LibreSegformer's encoder (libreyolo/models/segformer/nn.py: MiT overlap
  patch embeddings, efficient self-attention with spatial reduction, Mix-FFN)
  and all-MLP decode head are a PyTorch port of this Apache-2.0 reference
  implementation, with the config plumbing stripped. It is a derivative work:
  parts (including several forward bodies and docstrings) are copied
  substantially verbatim, as Apache-2.0 permits with attribution. It is NOT
  clean-room, and it is NOT derived from NVlabs/SegFormer. There is no runtime
  dependency on the transformers package.

Training-recipe source:
  Source: https://github.com/open-mmlab/mmsegmentation
          (mmseg/datasets/transforms/transforms.py)
  License: Apache License 2.0
  Copyright: (c) OpenMMLab. All rights reserved.
  The dense random-crop sampling this family trains with -- the optional
  ``resize_crop`` mode and its ``crop_cat_max_ratio`` retry loop in
  libreyolo/data/semantic_dataset.py -- is derived from mmsegmentation's
  Apache-2.0 ``RandomCrop`` (``cat_max_ratio``). The SegFormer ADE20K
  hyper-parameters in SegformerConfig follow the same project's published
  config. Derived from mmsegmentation itself, NOT from NVIDIA's
  NVlabs/SegFormer fork of it (which is non-commercial).

Weights (NON-COMMERCIAL — read this before using them):
  The pretrained ADE20K checkpoints LibreYOLO hosts for this family
  (LibreSegformer{b0..b5}-sem) are converted from NVIDIA's SegFormer release
  (nvidia/segformer-b0..b5-finetuned-ade-*, b5 being the 640-640 variant).
  Conversion is a state-dict key remapping only; the learned parameters are
  NVIDIA's, unchanged. See weights/convert_segformer_weights.py.

  Source:  https://huggingface.co/nvidia/segformer-b0-finetuned-ade-512-512
           (and its b1-b5 siblings)
  License: NVIDIA Source Code License for SegFormer
           https://github.com/NVlabs/SegFormer/blob/master/LICENSE

  That license PERMITS redistribution of the work and of derivative works,
  provided a complete copy of the license accompanies them and all attribution
  notices are retained. It LIMITS USE to non-commercial purposes, defined as
  "research or evaluation purposes only", and its Section 3.2 carries that
  limit forward into every derivative work. The limitation therefore cannot be
  relicensed away, and it binds LibreYOLO's users, not just LibreYOLO:

      These weights are for NON-COMMERCIAL use only. They are NOT covered by
      LibreYOLO's permissive license.

  The checkpoints were fine-tuned on ADE20K, whose own image terms restrict
  use to non-commercial research and education, independently reinforcing the
  same limit.

  LibreSegformer prints this restriction before every auto-download
  (LibreSegformer.get_download_notice). The architecture, the LibreYOLO code,
  and any model YOU train from scratch with it are unaffected and carry
  LibreYOLO's normal permissive terms. For unrestricted use, train from
  scratch via LibreSegformer(...).train(...).
