| --- |
| license: bsd-3-clause |
| library_name: libreyolo |
| tags: |
| - super-resolution |
| - image-to-image |
| - quicksrnet |
| - real-time |
| pipeline_tag: image-to-image |
| --- |
| |
| # LibreQuickSRNetm2-restore |
|
|
| QuickSRNet Medium 2x compact real-time super-resolution, packaged for |
| LibreYOLO. It has 50,604 parameters and produces an RGB image at twice the |
| input height and width. |
|
|
| ## Source |
|
|
| The architecture and official checkpoint come from |
| [quic/aimet-model-zoo](https://github.com/quic/aimet-model-zoo/tree/1bd2bf5b17cdda9251437c444009b29e1a25054b/aimet_zoo_torch/quicksrnet) |
| at commit `1bd2bf5b17cdda9251437c444009b29e1a25054b`, BSD-3-Clause. |
| Copyright (c) 2022 Qualcomm Innovation Center, Inc. |
|
|
| The maintained Qualcomm integration was verified against |
| [qualcomm/ai-hub-models](https://github.com/qualcomm/ai-hub-models/tree/16dbeb5e2805d4ada7218026de72e36878717d46/src/qai_hub_models/models/quicksrnetmedium) |
| at commit `16dbeb5e2805d4ada7218026de72e36878717d46`, BSD-3-Clause. |
|
|
| Official source artifact: |
| `quicksrnet_medium_2x_checkpoint_float32.pth.tar` |
|
|
| SHA-256: |
| `a0d176b40a649e45a176c3b53f45e0237015f4f2c17b157ef5c81e38c4442a0d` |
|
|
| The model card records DIV2K as the training dataset. |
|
|
| ## Modifications |
|
|
| The 14 learned state-dict tensors are unchanged. Conversion discards the |
| training-only epoch, optimizer, PSNR, and SSIM objects, then wraps the tensors |
| in the LibreYOLO v1.0 checkpoint schema with `task=restore`, `size=m2`, and |
| `scale=2`. FP32 tensor output matches the pinned upstream implementation |
| exactly (`max_abs_diff == 0`). |
|
|
| Converted checkpoint SHA-256: |
| `3f779b461d200704ab82904a110aaa37f41e8258b285e02b7e413b955deb150b` |
|
|
| ## Usage |
|
|
| ```python |
| from libreyolo import LibreYOLO |
| |
| model = LibreYOLO("LibreQuickSRNetm2-restore.pt") |
| result = model.predict("small.jpg") |
| print(result.restore_scale) # 2 |
| result.save("upscaled.png") |
| ``` |
|
|
| Native PyTorch prediction accepts arbitrary positive image dimensions. Dynamic |
| spatial ONNX and fixed-canvas TorchScript export are supported. |
|
|
| ## Reference latency |
|
|
| Synchronized model-forward timings on an NVIDIA GeForce RTX 5070 Ti with |
| PyTorch 2.11.0 and CUDA 12.8, batch 1, cuDNN benchmarking enabled, 10 warmups, |
| and 30 timed iterations: |
|
|
| | Input to output | Precision | Median | p95 | |
| |---|---|---:|---:| |
| | 360p to 720p | FP32 | 1.746 ms | 1.770 ms | |
| | 360p to 720p | FP16 | 0.937 ms | 0.966 ms | |
| | 720p to 1440p | FP32 | 10.536 ms | 10.931 ms | |
| | 720p to 1440p | FP16 | 5.437 ms | 5.855 ms | |
|
|
| Image decoding, transfer, and result conversion are excluded. |
|
|
| ## License |
|
|
| BSD 3-Clause. See [`LICENSE`](./LICENSE) and [`NOTICE`](./NOTICE). |
|
|