Thefalley's picture
Add NOTICE.md (clean MIT chain)
3ea0293 verified
|
Raw
History Blame Contribute Delete
4.52 kB

NOTICE β€” Attribution and Provenance

This repository hosts an INT8-quantized ONNX derivative of YOLOv4-Leaky-416, prepared by Pablo Mendoza (@thefalley) for deployment on a custom INT8 DPU (ZedBoard XC7Z020 FPGA).

The work this repository adds (ONNX export pipeline + INT8 quantization with COCO calibration + decoder) is released under the MIT License (see LICENSE). All upstream components keep their original licenses, listed below in dependency order.


Provenance chain

AlexeyAB / darknet                    (YOLO License v2 = public domain)
  yolov4-leaky-416.weights  (245.78 MiB)
  yolov4-leaky-416.cfg
        β”‚
        β”‚  parsed and loaded by:
        β–Ό
gwinndr / YOLOv4-Pytorch (MIT)         (used as conversion tool)
  utilities/configs.py::parse_config
  utilities/weights.py::load_weights
  + DarknetRaw wrapper (this repo, MIT) that captures pre-YoloLayer outputs
        β”‚
        β”‚  torch.onnx.export(opset=13)
        β–Ό
yolov4-leaky-416_float.onnx           (this repo, MIT)
  3 raw outputs:
    out_stride8   β€” shape (1, 255, 52, 52)
    out_stride16  β€” shape (1, 255, 26, 26)
    out_stride32  β€” shape (1, 255, 13, 13)
        β”‚
        β”‚  onnxruntime.quantize_static (MIT, used as tool)
        β”‚  + COCO val2017 calibration (1000 images, CC BY 4.0)
        β–Ό
yolov4-leaky-416_int8_qop.onnx        (this repo, MIT)

External Python decoder (this repo, MIT) reproduces standard YOLOv4
post-processing: sigmoid + scale_xy + grid offset + anchor multiplication
+ NMS. The decoder lives outside the ONNX graph.

Component-level attribution

1. Model weights β€” AlexeyAB / darknet

2. Darknet β†’ PyTorch conversion β€” gwinndr / YOLOv4-Pytorch

  • Project: gwinndr/YOLOv4-Pytorch
  • Source: https://github.com/gwinndr/YOLOv4-Pytorch
  • License: MIT (Copyright (c) 2020 Damon Gwinn)
  • What we use: the parse_config cfg parser and the load_weights AlexeyAB binary loader.
  • We do NOT redistribute gwinndr's source code in this HF repo. It is a build-time tool.

3. ONNX export

  • Tool: torch.onnx.export (PyTorch core, BSD-3-Clause). Used as a tool, not redistributed.
  • Wrapper: DarknetRaw (β‰ˆ 30 lines, this work, MIT) intercepts the pre-YoloLayer feature maps and exports them as 3 raw 4D tensors.

4. INT8 quantization

  • Tool: onnxruntime.quantization.quantize_static (Microsoft, MIT). Used as a tool, not redistributed.
  • Configuration:
    • quant_format = QuantFormat.QOperator
    • weight_type = QuantType.QInt8 (per-tensor, symmetric)
    • activation_type = QuantType.QInt8 (per-tensor, asymmetric)
    • per_channel = False
    • reduce_range = False
  • Calibration data: 1000 randomly-sampled images from MS COCO val2017 (CC BY 4.0). No COCO image is embedded in the ONNX file.

5. Calibration dataset β€” COCO val2017


File-level integrity (SHA-256)

File Size SHA-256
yolov4-leaky-416.weights (AlexeyAB upstream) 257,717,640 B 5b5b359940fd91e6d35bb8a957f6a8b27a05316889319173d39d25f8f33c0640
yolov4-leaky-416_float.onnx 257,388,314 B d7277fc1c6522cb063999d2d72058fb15de6f15900c66d0093d535df0bcf200f
yolov4-leaky-416_int8_qop.onnx 64,655,943 B ca31b2c53227518f1e29cb50e59294e758b69de26f33e374f1e65c922d338da4

Author of the INT8 derivative

Pablo Mendoza β€” HuggingFace @thefalley

Companion repositories:

Repository Purpose
Thefalley/yolov4-tiny-416-int8-qop Smaller sibling: YOLOv4-tiny-416 INT8 (5.83 MiB) β€” fast embedded inference
Thefalley/dpu-firmware (GitHub, ***) Bare-metal C firmware + RTL for the custom DPU on ZedBoard XC7Z020

Contact

If you are a rights holder and believe this attribution is inaccurate or incomplete, please open an issue on this repository and it will be corrected promptly.