File size: 8,624 Bytes
1fe9ba8 7f1cee5 1fe9ba8 fd2a039 1fe9ba8 b12e5aa e24c1e4 1fe9ba8 b12e5aa 2af83f3 b12e5aa 2af83f3 8bd21c3 1fe9ba8 2474e0e 8bd21c3 1fe9ba8 a1797de 1fe9ba8 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 | ---
library_name: pytorch
license: other
tags:
- android
pipeline_tag: image-to-image
---

# AOT-GAN: Optimized for Qualcomm Devices
AOT-GAN is a machine learning model that allows to erase and in-paint part of given input image.
This is based on the implementation of AOT-GAN found [here](https://github.com/researchmm/AOT-GAN-for-Inpainting).
This repository contains pre-exported model files optimized for Qualcomm® devices. You can use the [Qualcomm® AI Hub Models](https://github.com/quic/ai-hub-models/blob/main/qai_hub_models/models/aotgan) 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.1 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/aotgan/releases/v0.47.0/aotgan-onnx-float.zip)
| ONNX | w8a16 | Universal | QAIRT 2.42, ONNX Runtime 1.24.1 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/aotgan/releases/v0.47.0/aotgan-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/aotgan/releases/v0.47.0/aotgan-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/aotgan/releases/v0.47.0/aotgan-qnn_dlc-w8a16.zip)
| TFLITE | float | Universal | QAIRT 2.43, TFLite 2.17.0 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/aotgan/releases/v0.47.0/aotgan-tflite-float.zip)
For more device-specific assets and performance metrics, visit **[AOT-GAN on Qualcomm® AI Hub](https://aihub.qualcomm.com/models/aotgan)**.
### Option 2: Export with Custom Configurations
Use the [Qualcomm® AI Hub Models](https://github.com/quic/ai-hub-models/blob/main/qai_hub_models/models/aotgan) 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 [AOT-GAN on GitHub](https://github.com/quic/ai-hub-models/blob/main/qai_hub_models/models/aotgan) for usage instructions.
## Model Details
**Model Type:** Model_use_case.image_editing
**Model Stats:**
- Model checkpoint: CelebAHQ
- Input resolution: 512x512
- Number of parameters: 15.2M
- Model size (float): 58.0 MB
## Performance Summary
| Model | Runtime | Precision | Chipset | Inference Time (ms) | Peak Memory Range (MB) | Primary Compute Unit
|---|---|---|---|---|---|---
| AOT-GAN | ONNX | float | Snapdragon® X Elite | 149.561 ms | 31 - 31 MB | NPU
| AOT-GAN | ONNX | float | Snapdragon® 8 Gen 3 Mobile | 102.267 ms | 0 - 739 MB | NPU
| AOT-GAN | ONNX | float | Qualcomm® QCS8550 (Proxy) | 146.589 ms | 0 - 457 MB | NPU
| AOT-GAN | ONNX | float | Qualcomm® QCS9075 | 226.001 ms | 4 - 11 MB | NPU
| AOT-GAN | ONNX | float | Snapdragon® 8 Elite For Galaxy Mobile | 78.791 ms | 6 - 633 MB | NPU
| AOT-GAN | ONNX | float | Snapdragon® 8 Elite Gen 5 Mobile | 59.034 ms | 10 - 504 MB | NPU
| AOT-GAN | ONNX | float | Snapdragon® X2 Elite | 61.048 ms | 32 - 32 MB | NPU
| AOT-GAN | ONNX | w8a16 | Snapdragon® X Elite | 85.697 ms | 21 - 21 MB | NPU
| AOT-GAN | ONNX | w8a16 | Snapdragon® 8 Gen 3 Mobile | 61.863 ms | 5 - 715 MB | NPU
| AOT-GAN | ONNX | w8a16 | Qualcomm® QCS6490 | 13192.303 ms | 393 - 396 MB | CPU
| AOT-GAN | ONNX | w8a16 | Qualcomm® QCS8550 (Proxy) | 82.146 ms | 0 - 41 MB | NPU
| AOT-GAN | ONNX | w8a16 | Qualcomm® QCS9075 | 109.839 ms | 5 - 8 MB | NPU
| AOT-GAN | ONNX | w8a16 | Qualcomm® QCM6690 | 6693.772 ms | 328 - 336 MB | CPU
| AOT-GAN | ONNX | w8a16 | Snapdragon® 8 Elite For Galaxy Mobile | 46.905 ms | 5 - 527 MB | NPU
| AOT-GAN | ONNX | w8a16 | Snapdragon® 7 Gen 4 Mobile | 6586.752 ms | 324 - 333 MB | CPU
| AOT-GAN | ONNX | w8a16 | Snapdragon® 8 Elite Gen 5 Mobile | 34.755 ms | 5 - 617 MB | NPU
| AOT-GAN | ONNX | w8a16 | Snapdragon® X2 Elite | 37.831 ms | 23 - 23 MB | NPU
| AOT-GAN | QNN_DLC | float | Snapdragon® X Elite | 125.33 ms | 4 - 4 MB | NPU
| AOT-GAN | QNN_DLC | float | Snapdragon® 8 Gen 3 Mobile | 88.875 ms | 3 - 729 MB | NPU
| AOT-GAN | QNN_DLC | float | Qualcomm® QCS8275 (Proxy) | 544.1 ms | 1 - 539 MB | NPU
| AOT-GAN | QNN_DLC | float | Qualcomm® QCS8550 (Proxy) | 123.911 ms | 4 - 7 MB | NPU
| AOT-GAN | QNN_DLC | float | Qualcomm® SA8775P | 164.553 ms | 1 - 541 MB | NPU
| AOT-GAN | QNN_DLC | float | Qualcomm® QCS9075 | 213.201 ms | 4 - 13 MB | NPU
| AOT-GAN | QNN_DLC | float | Qualcomm® QCS8450 (Proxy) | 206.059 ms | 3 - 643 MB | NPU
| AOT-GAN | QNN_DLC | float | Qualcomm® SA7255P | 544.1 ms | 1 - 539 MB | NPU
| AOT-GAN | QNN_DLC | float | Qualcomm® SA8295P | 179.664 ms | 1 - 477 MB | NPU
| AOT-GAN | QNN_DLC | float | Snapdragon® 8 Elite For Galaxy Mobile | 71.016 ms | 3 - 583 MB | NPU
| AOT-GAN | QNN_DLC | float | Snapdragon® 8 Elite Gen 5 Mobile | 47.017 ms | 2 - 488 MB | NPU
| AOT-GAN | QNN_DLC | float | Snapdragon® X2 Elite | 52.376 ms | 4 - 4 MB | NPU
| AOT-GAN | QNN_DLC | w8a16 | Snapdragon® X Elite | 84.389 ms | 2 - 2 MB | NPU
| AOT-GAN | QNN_DLC | w8a16 | Snapdragon® 8 Gen 3 Mobile | 62.959 ms | 2 - 722 MB | NPU
| AOT-GAN | QNN_DLC | w8a16 | Qualcomm® QCS6490 | 298.385 ms | 1 - 6 MB | NPU
| AOT-GAN | QNN_DLC | w8a16 | Qualcomm® QCS8275 (Proxy) | 189.993 ms | 2 - 510 MB | NPU
| AOT-GAN | QNN_DLC | w8a16 | Qualcomm® QCS8550 (Proxy) | 82.726 ms | 2 - 612 MB | NPU
| AOT-GAN | QNN_DLC | w8a16 | Qualcomm® SA8775P | 82.085 ms | 2 - 512 MB | NPU
| AOT-GAN | QNN_DLC | w8a16 | Qualcomm® QCS9075 | 110.079 ms | 2 - 7 MB | NPU
| AOT-GAN | QNN_DLC | w8a16 | Qualcomm® QCM6690 | 1286.762 ms | 2 - 669 MB | NPU
| AOT-GAN | QNN_DLC | w8a16 | Qualcomm® QCS8450 (Proxy) | 144.598 ms | 2 - 711 MB | NPU
| AOT-GAN | QNN_DLC | w8a16 | Qualcomm® SA7255P | 189.993 ms | 2 - 510 MB | NPU
| AOT-GAN | QNN_DLC | w8a16 | Qualcomm® SA8295P | 115.664 ms | 2 - 511 MB | NPU
| AOT-GAN | QNN_DLC | w8a16 | Snapdragon® 8 Elite For Galaxy Mobile | 48.415 ms | 2 - 563 MB | NPU
| AOT-GAN | QNN_DLC | w8a16 | Snapdragon® 7 Gen 4 Mobile | 124.262 ms | 2 - 671 MB | NPU
| AOT-GAN | QNN_DLC | w8a16 | Snapdragon® 8 Elite Gen 5 Mobile | 35.823 ms | 2 - 631 MB | NPU
| AOT-GAN | QNN_DLC | w8a16 | Snapdragon® X2 Elite | 38.732 ms | 2 - 2 MB | NPU
| AOT-GAN | TFLITE | float | Snapdragon® 8 Gen 3 Mobile | 89.569 ms | 3 - 768 MB | NPU
| AOT-GAN | TFLITE | float | Qualcomm® QCS8275 (Proxy) | 544.416 ms | 3 - 560 MB | NPU
| AOT-GAN | TFLITE | float | Qualcomm® QCS8550 (Proxy) | 123.17 ms | 3 - 5 MB | NPU
| AOT-GAN | TFLITE | float | Qualcomm® SA8775P | 163.884 ms | 0 - 557 MB | NPU
| AOT-GAN | TFLITE | float | Qualcomm® QCS9075 | 210.807 ms | 3 - 46 MB | NPU
| AOT-GAN | TFLITE | float | Qualcomm® QCS8450 (Proxy) | 200.48 ms | 3 - 676 MB | NPU
| AOT-GAN | TFLITE | float | Qualcomm® SA7255P | 544.416 ms | 3 - 560 MB | NPU
| AOT-GAN | TFLITE | float | Qualcomm® SA8295P | 179.019 ms | 0 - 488 MB | NPU
| AOT-GAN | TFLITE | float | Snapdragon® 8 Elite For Galaxy Mobile | 70.922 ms | 3 - 596 MB | NPU
| AOT-GAN | TFLITE | float | Snapdragon® 8 Elite Gen 5 Mobile | 46.972 ms | 1 - 503 MB | NPU
## License
* The license for the original implementation of AOT-GAN can be found
[here](https://github.com/taki0112/AttnGAN-Tensorflow/blob/master/LICENSE).
## References
* [Aggregated Contextual Transformations for High-Resolution Image Inpainting](https://arxiv.org/abs/2104.01431)
* [Source Model Implementation](https://github.com/researchmm/AOT-GAN-for-Inpainting)
## 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).
|