# Third-party notice — YOLACT ResNet50 (int8, QDQ format)

This directory contains a model derived from an unmodified pretrained checkpoint, exported to
ONNX and quantized — no changes were made to the trained weights themselves.

- **Model**: YOLACT (You Only Look At CoefficienTs), ResNet50-FPN backbone (single-stage instance
  segmentation, COCO 80 classes)
- **Paper**: [YOLACT: Real-time Instance Segmentation](https://arxiv.org/abs/1904.02689)
- **Upstream repository**: https://github.com/dbolya/yolact
- **License**: MIT (see `LICENSE` in this directory, copied verbatim from the upstream repo)
- **Commercial use**: Permitted. MIT has no non-commercial restriction; it only requires
  retaining the copyright/license notice.
- **Pretrained weights**: Official `yolact_resnet50_54_800000.pth` checkpoint (re-hosted by the
  author on Hugging Face after the original download links expired):
  https://huggingface.co/dbolya/yolact-resnet50/resolve/main/yolact_resnet50_54_800000.pth
- **Conversion process**: The official checkpoint was loaded with the upstream `Yolact` model
  class (unmodified architecture/weights), the built-in NMS/decode step was bypassed so the ONNX
  graph exports raw predictions (`loc`, `conf`, `mask`, `priors`, `proto`), exported via
  `torch.onnx.export`, then statically quantized to int8 using ONNX Runtime's QDQ quantization
  (calibrated on this site's own example images).
- **File size**: 32,191,529 bytes (down from 124,839,975 bytes fp32)
- **SHA-256**: `83e3478423d63e782c99de769d93ad518f18cfc84b80c605faf952a79506aca0`
- **Why this replaced the site's previous Mask R-CNN model**: verified in this environment to run
  ~38% faster in ONNX Runtime Web's single-threaded WASM backend (Mask R-CNN's RoiAlign/
  ConvTranspose/per-instance mask head cost is largely unavoidable regardless of input
  resolution; YOLACT's single-stage, prototype-mask architecture has no equivalent per-instance
  network passes), at a smaller download size, with detection confidence closely matching the
  original PyTorch model's output on the same test image (0.989 vs 0.991 top score, verified).

Preprocessing/decode logic (box decoding, per-class confidence filtering, fast NMS, mask
assembly via prototype linear combination + crop + sigmoid) used in this site's
`instance-segmentation.js` was independently implemented in JavaScript from the model's published
inference code and is original code, not redistributed from the upstream repository.
