--- library_name: pytorch license: other tags: - android pipeline_tag: image-to-image --- ![](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/esrgan/web-assets/model_demo.png) # ESRGAN: Optimized for Qualcomm Devices ESRGAN is a machine learning model that upscales an image with minimal loss in quality. This is based on the implementation of ESRGAN found [here](https://github.com/xinntao/ESRGAN/). This repository contains pre-exported model files optimized for Qualcomm® devices. You can use the [Qualcomm® AI Hub Models](https://github.com/qualcomm/ai-hub-models/blob/main/src/qai_hub_models/models/esrgan) library to export with custom configurations. More details on model performance across various devices, can be found [here](#performance-summary). Qualcomm AI Hub Models uses [Qualcomm AI Hub Workbench](https://workbench.aihub.qualcomm.com) to compile, profile, and evaluate this model. [Sign up](https://myaccount.qualcomm.com/signup) to run these models on a hosted Qualcomm® device. ## Getting Started There are two ways to deploy this model on your device: ### Option 1: Download Pre-Exported Models Below are pre-exported model assets ready for deployment. | Runtime | Precision | Chipset | SDK Versions | Download | |---|---|---|---|---| | ONNX | float | Universal | QAIRT 2.42, ONNX Runtime 1.24.3 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/esrgan/releases/v0.50.2/esrgan-onnx-float.zip) | ONNX | w8a16 | Universal | QAIRT 2.42, ONNX Runtime 1.24.3 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/esrgan/releases/v0.50.2/esrgan-onnx-w8a16.zip) | QNN_DLC | float | Universal | QAIRT 2.43 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/esrgan/releases/v0.50.2/esrgan-qnn_dlc-float.zip) | QNN_DLC | w8a16 | Universal | QAIRT 2.43 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/esrgan/releases/v0.50.2/esrgan-qnn_dlc-w8a16.zip) | TFLITE | float | Universal | QAIRT 2.43, TFLite 2.19.1 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/esrgan/releases/v0.50.2/esrgan-tflite-float.zip) For more device-specific assets and performance metrics, visit **[ESRGAN on Qualcomm® AI Hub](https://aihub.qualcomm.com/models/esrgan)**. ### Option 2: Export with Custom Configurations Use the [Qualcomm® AI Hub Models](https://github.com/qualcomm/ai-hub-models/blob/main/src/qai_hub_models/models/esrgan) Python library to compile and export the model with your own: - Custom weights (e.g., fine-tuned checkpoints) - Custom input shapes - Target device and runtime configurations This option is ideal if you need to customize the model beyond the default configuration provided here. See our repository for [ESRGAN on GitHub](https://github.com/qualcomm/ai-hub-models/blob/main/src/qai_hub_models/models/esrgan) for usage instructions. ## Model Details **Model Type:** Model_use_case.super_resolution **Model Stats:** - Model checkpoint: ESRGAN_x4 - Input resolution: 128x128 - Number of parameters: 16.7M - Model size (float): 63.9 MB ## Performance Summary | Model | Runtime | Precision | Chipset | Inference Time (ms) | Peak Memory Range (MB) | Primary Compute Unit |---|---|---|---|---|---|--- | ESRGAN | ONNX | float | Snapdragon® 8 Elite Gen 5 Mobile | 27.797 ms | 7 - 353 MB | NPU | ESRGAN | ONNX | float | Snapdragon® X2 Elite | 34.403 ms | 37 - 37 MB | NPU | ESRGAN | ONNX | float | Snapdragon® X Elite | 65.477 ms | 37 - 37 MB | NPU | ESRGAN | ONNX | float | Snapdragon® 8 Gen 3 Mobile | 49.525 ms | 6 - 791 MB | NPU | ESRGAN | ONNX | float | Qualcomm® QCS8550 (Proxy) | 66.552 ms | 0 - 44 MB | NPU | ESRGAN | ONNX | float | Qualcomm® QCS9075 | 107.596 ms | 6 - 9 MB | NPU | ESRGAN | ONNX | float | Snapdragon® 8 Elite For Galaxy Mobile | 38.299 ms | 8 - 352 MB | NPU | ESRGAN | ONNX | w8a16 | Snapdragon® 8 Elite Gen 5 Mobile | 17.399 ms | 3 - 1057 MB | NPU | ESRGAN | ONNX | w8a16 | Snapdragon® X2 Elite | 21.944 ms | 29 - 29 MB | NPU | ESRGAN | ONNX | w8a16 | Snapdragon® X Elite | 43.608 ms | 26 - 26 MB | NPU | ESRGAN | ONNX | w8a16 | Snapdragon® 8 Gen 3 Mobile | 31.699 ms | 3 - 1274 MB | NPU | ESRGAN | ONNX | w8a16 | Qualcomm® QCS6490 | 15055.988 ms | 201 - 206 MB | CPU | ESRGAN | ONNX | w8a16 | Qualcomm® QCS8550 (Proxy) | 42.325 ms | 0 - 801 MB | NPU | ESRGAN | ONNX | w8a16 | Qualcomm® QCS9075 | 45.715 ms | 3 - 6 MB | NPU | ESRGAN | ONNX | w8a16 | Qualcomm® QCM6690 | 7963.163 ms | 185 - 206 MB | CPU | ESRGAN | ONNX | w8a16 | Snapdragon® 8 Elite For Galaxy Mobile | 26.406 ms | 0 - 904 MB | NPU | ESRGAN | ONNX | w8a16 | Snapdragon® 7 Gen 4 Mobile | 7728.283 ms | 146 - 164 MB | CPU | ESRGAN | QNN_DLC | float | Snapdragon® 8 Elite Gen 5 Mobile | 24.936 ms | 0 - 328 MB | NPU | ESRGAN | QNN_DLC | float | Snapdragon® X2 Elite | 34.236 ms | 0 - 0 MB | NPU | ESRGAN | QNN_DLC | float | Snapdragon® X Elite | 64.893 ms | 0 - 0 MB | NPU | ESRGAN | QNN_DLC | float | Snapdragon® 8 Gen 3 Mobile | 49.293 ms | 0 - 753 MB | NPU | ESRGAN | QNN_DLC | float | Qualcomm® QCS8275 (Proxy) | 451.991 ms | 0 - 347 MB | NPU | ESRGAN | QNN_DLC | float | Qualcomm® QCS8550 (Proxy) | 62.242 ms | 0 - 5 MB | NPU | ESRGAN | QNN_DLC | float | Qualcomm® SA8775P | 105.52 ms | 0 - 347 MB | NPU | ESRGAN | QNN_DLC | float | Qualcomm® QCS9075 | 107.092 ms | 0 - 5 MB | NPU | ESRGAN | QNN_DLC | float | Qualcomm® QCS8450 (Proxy) | 123.008 ms | 0 - 758 MB | NPU | ESRGAN | QNN_DLC | float | Qualcomm® SA7255P | 451.991 ms | 0 - 347 MB | NPU | ESRGAN | QNN_DLC | float | Qualcomm® SA8295P | 111.348 ms | 0 - 357 MB | NPU | ESRGAN | QNN_DLC | float | Snapdragon® 8 Elite For Galaxy Mobile | 37.688 ms | 0 - 328 MB | NPU | ESRGAN | QNN_DLC | w8a16 | Snapdragon® 8 Elite Gen 5 Mobile | 16.41 ms | 0 - 986 MB | NPU | ESRGAN | QNN_DLC | w8a16 | Snapdragon® X2 Elite | 22.037 ms | 0 - 0 MB | NPU | ESRGAN | QNN_DLC | w8a16 | Snapdragon® X Elite | 43.187 ms | 0 - 0 MB | NPU | ESRGAN | QNN_DLC | w8a16 | Snapdragon® 8 Gen 3 Mobile | 31.208 ms | 0 - 1189 MB | NPU | ESRGAN | QNN_DLC | w8a16 | Qualcomm® QCS6490 | 241.752 ms | 0 - 3 MB | NPU | ESRGAN | QNN_DLC | w8a16 | Qualcomm® QCS8275 (Proxy) | 132.668 ms | 0 - 668 MB | NPU | ESRGAN | QNN_DLC | w8a16 | Qualcomm® QCS8550 (Proxy) | 41.514 ms | 0 - 3 MB | NPU | ESRGAN | QNN_DLC | w8a16 | Qualcomm® SA8775P | 37.748 ms | 0 - 668 MB | NPU | ESRGAN | QNN_DLC | w8a16 | Qualcomm® QCS9075 | 44.358 ms | 0 - 3 MB | NPU | ESRGAN | QNN_DLC | w8a16 | Qualcomm® QCM6690 | 1136.334 ms | 0 - 641 MB | NPU | ESRGAN | QNN_DLC | w8a16 | Qualcomm® QCS8450 (Proxy) | 75.6 ms | 0 - 1277 MB | NPU | ESRGAN | QNN_DLC | w8a16 | Qualcomm® SA7255P | 132.668 ms | 0 - 668 MB | NPU | ESRGAN | QNN_DLC | w8a16 | Qualcomm® SA8295P | 64.953 ms | 0 - 712 MB | NPU | ESRGAN | QNN_DLC | w8a16 | Snapdragon® 8 Elite For Galaxy Mobile | 28.325 ms | 0 - 840 MB | NPU | ESRGAN | QNN_DLC | w8a16 | Snapdragon® 7 Gen 4 Mobile | 94.984 ms | 0 - 707 MB | NPU | ESRGAN | TFLITE | float | Snapdragon® 8 Elite Gen 5 Mobile | 27.209 ms | 3 - 371 MB | NPU | ESRGAN | TFLITE | float | Snapdragon® 8 Gen 3 Mobile | 51.995 ms | 0 - 795 MB | NPU | ESRGAN | TFLITE | float | Qualcomm® QCS8275 (Proxy) | 452.182 ms | 3 - 392 MB | NPU | ESRGAN | TFLITE | float | Qualcomm® QCS8550 (Proxy) | 60.474 ms | 3 - 5 MB | NPU | ESRGAN | TFLITE | float | Qualcomm® SA8775P | 105.57 ms | 3 - 391 MB | NPU | ESRGAN | TFLITE | float | Qualcomm® QCS9075 | 107.977 ms | 3 - 46 MB | NPU | ESRGAN | TFLITE | float | Qualcomm® QCS8450 (Proxy) | 114.636 ms | 4 - 799 MB | NPU | ESRGAN | TFLITE | float | Qualcomm® SA7255P | 452.182 ms | 3 - 392 MB | NPU | ESRGAN | TFLITE | float | Qualcomm® SA8295P | 111.388 ms | 3 - 396 MB | NPU | ESRGAN | TFLITE | float | Snapdragon® 8 Elite For Galaxy Mobile | 38.154 ms | 3 - 364 MB | NPU ## License * The license for the original implementation of ESRGAN can be found [here](https://github.com/xinntao/ESRGAN/blob/master/LICENSE). ## References * [ESRGAN: Enhanced Super-Resolution Generative Adversarial Networks](https://arxiv.org/abs/1809.00219) * [Source Model Implementation](https://github.com/xinntao/ESRGAN/) ## Community * Join [our AI Hub Slack community](https://aihub.qualcomm.com/community/slack) to collaborate, post questions and learn more about on-device AI. * For questions or feedback please [reach out to us](mailto:ai-hub-support@qti.qualcomm.com).