This repository includes code derived from, or inspired by, the
following open-source projects. Each upstream is listed with its
license and the LibreYOLO module(s) that port from it.

--------------------------------------------------------------------
SAHI
--------------------------------------------------------------------
Source: https://github.com/obss/sahi
License: MIT
Copyright (c) 2020 obss
Used for: slicing-aided hyper inference utilities.

MIT License

Copyright (c) 2020 obss

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

--------------------------------------------------------------------
CLIP / OpenCLIP (OpenAI; LAION / ML Foundations)
--------------------------------------------------------------------
Source: https://github.com/openai/CLIP, https://github.com/mlfoundations/open_clip
License: MIT
Copyright (c) 2021 OpenAI; (c) 2012-2021 OpenCLIP authors
Used for: the LibreCLIP family (libreyolo/models/clip/). The byte-pair-encoding
text tokenizer (libreyolo/models/clip/tokenizer.py) and the bundled BPE merge
table (libreyolo/models/clip/bpe_simple_vocab_16e6.txt.gz) are vendored from the
CLIP / open_clip tokenizer. The image/text towers are a clean-room native torch
re-implementation of the standard CLIP architecture (no open_clip at runtime).

The shipped LibreCLIP weights are converted from OpenCLIP LAION-2B checkpoints,
which are MIT-redistributable. NOTE: the LAION-2B training data has a documented
CSAM-content history (Stanford, 2023); use Re-LAION-derived weights. See
libreyolo/models/clip/NOTICE.md for the full data-provenance note.

MIT License

Copyright (c) 2021 OpenAI

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

--------------------------------------------------------------------
YOLOX (Megvii-BaseDetection)
--------------------------------------------------------------------
Source: https://github.com/Megvii-BaseDetection/YOLOX
License: Apache License 2.0
Copyright (c) 2021-2022 Megvii Inc. All rights reserved.
Used for: YOLOX model family (libreyolo/models/yolox/), EMA helper
          (libreyolo/training/ema.py), augmentation pipeline
          (libreyolo/training/augment.py).

--------------------------------------------------------------------
YOLO (MultimediaTechLab, successor to WongKinYiu/YOLO)
--------------------------------------------------------------------
Source: https://github.com/MultimediaTechLab/YOLO
License: MIT
Copyright (c) 2024 Kin-Yiu Wong and Hao-Tang Tsui
Used for: YOLO9 model family (libreyolo/models/yolo9/), including the
          loss port in libreyolo/models/yolo9/loss.py.

--------------------------------------------------------------------
SuperGradients / YOLO-NAS
--------------------------------------------------------------------
Source: https://github.com/Deci-AI/super-gradients
License: Apache License 2.0
Copyright (c) 2021-2024 Deci AI
Used for: YOLO-NAS model family and pose training references
          (libreyolo/models/yolonas/). YOLO-NAS source code is
          Apache-2.0; published pretrained YOLO-NAS weights may have
          separate non-commercial terms and are not bundled here.

--------------------------------------------------------------------
EdgeCrafter
--------------------------------------------------------------------
Source: https://github.com/EC-codehub/EdgeCrafter
License: Apache License 2.0
Used for: EC model family detection, segmentation, and pose architecture
          references (libreyolo/models/ec/).

--------------------------------------------------------------------
RT-DETR (lyuwenyu)
--------------------------------------------------------------------
Source: https://github.com/lyuwenyu/RT-DETR
License: Apache License 2.0
Copyright (c) 2023 lyuwenyu
Used for: RT-DETR model family (libreyolo/models/rtdetr/) including
          backbone, neck, decoder, loss, and denoising modules. The
          HGNetv2 backbone (libreyolo/models/rtdetr/hgnetv2.py) is
          ported from rtdetrv2_pytorch/src/nn/backbone/hgnetv2.py.

--------------------------------------------------------------------
RF-DETR (Roboflow)
--------------------------------------------------------------------
Source: https://github.com/roboflow/rf-detr
License: Apache License 2.0
Copyright (c) 2024-2025 Roboflow, Inc.
Used for: RF-DETR model family (libreyolo/models/rfdetr/), LoRA
          adapter recipe helpers (libreyolo/training/lora.py), and
          COCO evaluation glue (libreyolo/data/yolo_coco_api.py).
          Also the GroupPose-style keypoint/pose head, dual-projector,
          keypoint decoder token stream, probabilistic (Cholesky)
          keypoint regression, and keypoint postprocess ported from
          RF-DETR v1.8.0 into libreyolo/models/rfdetr/. The published
          RF-DETR keypoint preview weights (Apache-2.0, COCO person
          pretrained) are redistributed with attribution.

--------------------------------------------------------------------
DINOv2 (Meta AI / facebookresearch)
--------------------------------------------------------------------
Source: https://github.com/facebookresearch/dinov2
License: Apache License 2.0
Copyright (c) Meta Platforms, Inc. and affiliates.
Used for: vision transformer backbone consumed by RF-DETR. The local
          DINOv2 implementation lives at libreyolo/models/rfdetr/dinov2.py.

--------------------------------------------------------------------
HuggingFace Transformers
--------------------------------------------------------------------
Source: https://github.com/huggingface/transformers
License: Apache License 2.0
Copyright 2022-2024 The HuggingFace Team. All Rights Reserved.
Used for: DINOv2-with-Registers reference implementation that
          libreyolo/models/rfdetr/dinov2.py adapts to add windowed
          self-attention. Also a runtime dependency loaded via
          AutoBackbone for the non-windowed DinoV2 path.

--------------------------------------------------------------------
LW-DETR (Atten4Vis / Baidu)
--------------------------------------------------------------------
Source: https://github.com/Atten4Vis/LW-DETR
License: Apache License 2.0
Copyright (c) 2024 Baidu. All Rights Reserved.
Used for: backbone, transformer, matcher, loss, postprocess, and
          tensor utilities consumed by RF-DETR
          (libreyolo/models/rfdetr/{backbone,transformer,matcher,
          loss,lwdetr,tensors,box_ops}.py).

--------------------------------------------------------------------
Conditional DETR (Atten4Vis / Microsoft)
--------------------------------------------------------------------
Source: https://github.com/Atten4Vis/ConditionalDETR
License: Apache License 2.0
Copyright (c) 2021 Microsoft. All Rights Reserved.
Used for: position-encoding, transformer, matcher, and loss
          building blocks reused by RF-DETR via LW-DETR
          (libreyolo/models/rfdetr/{backbone,transformer,matcher,
          loss,lwdetr,box_ops}.py).

--------------------------------------------------------------------
DETR (facebookresearch / Meta)
--------------------------------------------------------------------
Source: https://github.com/facebookresearch/detr
License: Apache License 2.0
Copyright (c) Facebook, Inc. and its affiliates.
Used for: NestedTensor, position-encoding, matcher, set-criterion,
          and box utilities reused by RF-DETR via LW-DETR
          (libreyolo/models/rfdetr/{backbone,transformer,matcher,
          loss,lwdetr,tensors,box_ops}.py).

--------------------------------------------------------------------
Deformable DETR (fundamentalvision / SenseTime)
--------------------------------------------------------------------
Source: https://github.com/fundamentalvision/Deformable-DETR
License: Apache License 2.0
Copyright (c) 2020 SenseTime. All Rights Reserved.
Used for: multi-scale deformable attention reused by RF-DETR
          (libreyolo/models/rfdetr/transformer.py: MSDeformAttn,
          ms_deform_attn_core_pytorch).

--------------------------------------------------------------------
ViTDet (facebookresearch detectron2)
--------------------------------------------------------------------
Source: https://github.com/facebookresearch/detectron2/tree/main/projects/ViTDet
License: Apache License 2.0
Copyright (c) Facebook, Inc. and its affiliates.
Used for: MultiScaleProjector / SimpleProjector primitives reused by
          RF-DETR (libreyolo/models/rfdetr/backbone.py).

--------------------------------------------------------------------
PaddleClas (PaddlePaddle)
--------------------------------------------------------------------
Source: https://github.com/PaddlePaddle/PaddleClas
License: Apache License 2.0
Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
Used for: ResNet_vd pretrained classification backbones loaded by
          RT-DETR (libreyolo/models/rtdetr/backbone.py downloads
          ResNet{18,34,50,101}_vd weights that originate here).

--------------------------------------------------------------------
Depth Anything V2 (DepthAnything / TikTok)
--------------------------------------------------------------------
Source: https://github.com/DepthAnything/Depth-Anything-V2
License: Apache License 2.0
Copyright (c) 2024 Depth Anything V2 authors.
Citation: Yang, L., Kang, B., Huang, Z., Zhao, Z., Xu, X., Feng, J.,
          and Zhao, H. "Depth Anything V2." NeurIPS 2024.
Used for: Depth Anything V2 model family (DINOv2 encoder + DPT head)
          vendored under libreyolo/models/depth_anything/_vendor/
          (dinov2, dinov2_layers, dpt, util/{blocks,transform}). Bundled
          verbatim except for added package __init__.py files. The
          LibreYOLO-side wrapper (libreyolo/models/depth_anything/
          {model,nn,utils}.py) adds internal ImageNet normalization and
          the depth-task contract; it does not modify the vendored code.

NOTE - code vs. weights: The Apache-2.0 license covers the Depth
Anything V2 *source code* vendored above. It does NOT cover the
pretrained weights, which are split: the Small (ViT-S) checkpoint is
Apache-2.0, while Base/Large/Giant (ViT-B/L/G) are CC-BY-NC-4.0
(non-commercial). LibreYOLO mirrors the converted checkpoints on its
Hugging Face org (LibreYOLO/LibreDepthAnythingV2{s,l}-depth) and
auto-downloads them on demand; each mirror carries the upstream
license. Users remain responsible for complying with each checkpoint's
license — in particular, the CC-BY-NC-4.0 checkpoints (Base/Large/
Giant) are for non-commercial use only. The offline conversion path
(weights/convert_depth_anything_v2_weights.py) remains available.

--------------------------------------------------------------------
timm / PyTorch Image Models (Hugging Face)
--------------------------------------------------------------------
Source: https://github.com/huggingface/pytorch-image-models
License: Apache License 2.0
Copyright (c) Ross Wightman and the timm contributors.
Used for: the native image-classification model families ported from
          timm architectures — libreyolo/models/{mobilenetv4,convnext,
          efficientnetv2,resnet}/. Module/attribute names mirror timm so
          its Apache-2.0 ImageNet-1k pretrained weights load unchanged and
          inference is bit-identical. Architecture lineage: ConvNeXt also
          derives from facebookresearch/ConvNeXt (MIT); EfficientNetV2 from
          google/automl (Apache-2.0); ResNet from He et al. 2015. Weights
          (timm *.in1k / *.fb_in1k / a1_in1k, Apache-2.0) are mirrored on
          the LibreYOLO Hugging Face org. ConvNeXt-V2 fcmae weights
          (CC-BY-NC) are NOT used.

--------------------------------------------------------------------
Apache License 2.0 (full text)
--------------------------------------------------------------------
The full text of the Apache License, Version 2.0 is bundled with this
distribution at licenses/Apache-2.0.txt (also available at
https://www.apache.org/licenses/LICENSE-2.0) and applies to the
Apache-2.0 upstreams listed above.

--------------------------------------------------------------------
L2CS-Net
--------------------------------------------------------------------
Source: https://github.com/Ahmednull/L2CS-Net
License: MIT
Copyright (c) 2022 Ahmed Abdelrahman
Citation: Abdelrahman, A. A., Hempel, T., Khalifa, A., Al-Hamadi, A.,
          and Dinges, L. "L2CS-Net: Fine-Grained Gaze Estimation in
          Unconstrained Environments." IEEE International Conference
          on Image Processing (ICIP), 2022.
Used for: L2CS gaze estimation network (libreyolo/models/l2cs/nn.py),
          bin-expectation angle decoding and crop preprocessing
          (libreyolo/models/l2cs/utils.py), and gaze arrow visualization
          (libreyolo/utils/drawing.py:draw_gaze_arrows).

NOTE — code vs. weights: The MIT license below covers the L2CS-Net
*source code*, which is what libreyolo/models/l2cs/ is ported from.
It does NOT cover the pretrained weights. The published L2CS gaze
checkpoints (e.g. L2CSNet_gaze360.pkl) are trained on the Gaze360
dataset and are bound by the Gaze360 dataset license — research /
non-commercial use only, no redistribution:
  https://github.com/erkil1452/gaze360/blob/master/LICENSE.md
LibreYOLO therefore does NOT bundle, mirror, or auto-download L2CS
weights. Users obtain them from the official L2CS-Net distribution and
are responsible for complying with the Gaze360 license. Required
dataset citation: Kellnhofer, Recasens, Stent, Matusik, Torralba,
"Gaze360: Physically Unconstrained Gaze Estimation in the Wild",
ICCV 2019.

MIT License

Copyright (c) 2022 Ahmed Abdelrahman

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
