File size: 9,963 Bytes
c87bc33 6241d2f c87bc33 8ab1e84 c87bc33 bf7e2ce c87bc33 3504a0e c87bc33 114a58b e2c2af8 c87bc33 114a58b 3646627 114a58b 3646627 114a58b 3646627 3ec0f00 c87bc33 a012d6f 3ec0f00 c87bc33 85ced27 c87bc33 | 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 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 | ---
library_name: pytorch
license: other
tags:
- backbone
- bu_auto
- android
pipeline_tag: image-classification
---

# ResNet18: Optimized for Qualcomm Devices
ResNet18 is a machine learning model that can classify images from the Imagenet dataset. It can also be used as a backbone in building more complex models for specific use cases.
This is based on the implementation of ResNet18 found [here](https://github.com/pytorch/vision/blob/main/torchvision/models/resnet.py).
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/resnet18) 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/resnet18/releases/v0.47.0/resnet18-onnx-float.zip)
| ONNX | w8a8 | Universal | QAIRT 2.42, ONNX Runtime 1.24.1 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/resnet18/releases/v0.47.0/resnet18-onnx-w8a8.zip)
| QNN_DLC | float | Universal | QAIRT 2.43 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/resnet18/releases/v0.47.0/resnet18-qnn_dlc-float.zip)
| QNN_DLC | w8a8 | Universal | QAIRT 2.43 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/resnet18/releases/v0.47.0/resnet18-qnn_dlc-w8a8.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/resnet18/releases/v0.47.0/resnet18-tflite-float.zip)
| TFLITE | w8a8 | Universal | QAIRT 2.43, TFLite 2.17.0 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/resnet18/releases/v0.47.0/resnet18-tflite-w8a8.zip)
For more device-specific assets and performance metrics, visit **[ResNet18 on Qualcomm® AI Hub](https://aihub.qualcomm.com/models/resnet18)**.
### 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/resnet18) 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 [ResNet18 on GitHub](https://github.com/quic/ai-hub-models/blob/main/qai_hub_models/models/resnet18) for usage instructions.
## Model Details
**Model Type:** Model_use_case.image_classification
**Model Stats:**
- Model checkpoint: Imagenet
- Input resolution: 224x224
- Number of parameters: 11.7M
- Model size (float): 44.6 MB
- Model size (w8a8): 11.3 MB
## Performance Summary
| Model | Runtime | Precision | Chipset | Inference Time (ms) | Peak Memory Range (MB) | Primary Compute Unit
|---|---|---|---|---|---|---
| ResNet18 | ONNX | float | Snapdragon® X Elite | 1.171 ms | 22 - 22 MB | NPU
| ResNet18 | ONNX | float | Snapdragon® 8 Gen 3 Mobile | 0.778 ms | 0 - 35 MB | NPU
| ResNet18 | ONNX | float | Qualcomm® QCS8550 (Proxy) | 1.072 ms | 0 - 43 MB | NPU
| ResNet18 | ONNX | float | Qualcomm® QCS9075 | 1.796 ms | 1 - 3 MB | NPU
| ResNet18 | ONNX | float | Snapdragon® 8 Elite For Galaxy Mobile | 0.638 ms | 0 - 26 MB | NPU
| ResNet18 | ONNX | float | Snapdragon® 8 Elite Gen 5 Mobile | 0.557 ms | 1 - 26 MB | NPU
| ResNet18 | ONNX | float | Snapdragon® X2 Elite | 0.524 ms | 23 - 23 MB | NPU
| ResNet18 | ONNX | w8a8 | Snapdragon® X Elite | 0.637 ms | 11 - 11 MB | NPU
| ResNet18 | ONNX | w8a8 | Snapdragon® 8 Gen 3 Mobile | 0.417 ms | 0 - 47 MB | NPU
| ResNet18 | ONNX | w8a8 | Qualcomm® QCS6490 | 13.584 ms | 6 - 21 MB | CPU
| ResNet18 | ONNX | w8a8 | Qualcomm® QCS8550 (Proxy) | 0.557 ms | 0 - 2 MB | NPU
| ResNet18 | ONNX | w8a8 | Qualcomm® QCS9075 | 0.645 ms | 0 - 3 MB | NPU
| ResNet18 | ONNX | w8a8 | Qualcomm® QCM6690 | 11.393 ms | 8 - 14 MB | CPU
| ResNet18 | ONNX | w8a8 | Snapdragon® 8 Elite For Galaxy Mobile | 0.355 ms | 0 - 22 MB | NPU
| ResNet18 | ONNX | w8a8 | Snapdragon® 7 Gen 4 Mobile | 8.74 ms | 6 - 12 MB | CPU
| ResNet18 | ONNX | w8a8 | Snapdragon® 8 Elite Gen 5 Mobile | 0.347 ms | 0 - 27 MB | NPU
| ResNet18 | ONNX | w8a8 | Snapdragon® X2 Elite | 0.268 ms | 11 - 11 MB | NPU
| ResNet18 | QNN_DLC | float | Snapdragon® X Elite | 1.474 ms | 1 - 1 MB | NPU
| ResNet18 | QNN_DLC | float | Snapdragon® 8 Gen 3 Mobile | 0.916 ms | 0 - 38 MB | NPU
| ResNet18 | QNN_DLC | float | Qualcomm® QCS8275 (Proxy) | 5.799 ms | 1 - 24 MB | NPU
| ResNet18 | QNN_DLC | float | Qualcomm® QCS8550 (Proxy) | 1.337 ms | 1 - 2 MB | NPU
| ResNet18 | QNN_DLC | float | Qualcomm® SA8775P | 1.971 ms | 0 - 26 MB | NPU
| ResNet18 | QNN_DLC | float | Qualcomm® QCS9075 | 2.065 ms | 3 - 5 MB | NPU
| ResNet18 | QNN_DLC | float | Qualcomm® QCS8450 (Proxy) | 2.449 ms | 0 - 37 MB | NPU
| ResNet18 | QNN_DLC | float | Qualcomm® SA7255P | 5.799 ms | 1 - 24 MB | NPU
| ResNet18 | QNN_DLC | float | Qualcomm® SA8295P | 2.312 ms | 0 - 20 MB | NPU
| ResNet18 | QNN_DLC | float | Snapdragon® 8 Elite For Galaxy Mobile | 0.711 ms | 0 - 27 MB | NPU
| ResNet18 | QNN_DLC | float | Snapdragon® 8 Elite Gen 5 Mobile | 0.589 ms | 1 - 28 MB | NPU
| ResNet18 | QNN_DLC | float | Snapdragon® X2 Elite | 0.68 ms | 1 - 1 MB | NPU
| ResNet18 | QNN_DLC | w8a8 | Snapdragon® X Elite | 0.604 ms | 0 - 0 MB | NPU
| ResNet18 | QNN_DLC | w8a8 | Snapdragon® 8 Gen 3 Mobile | 0.387 ms | 0 - 47 MB | NPU
| ResNet18 | QNN_DLC | w8a8 | Qualcomm® QCS6490 | 1.805 ms | 0 - 2 MB | NPU
| ResNet18 | QNN_DLC | w8a8 | Qualcomm® QCS8275 (Proxy) | 1.271 ms | 0 - 24 MB | NPU
| ResNet18 | QNN_DLC | w8a8 | Qualcomm® QCS8550 (Proxy) | 0.518 ms | 0 - 1 MB | NPU
| ResNet18 | QNN_DLC | w8a8 | Qualcomm® SA8775P | 0.707 ms | 0 - 24 MB | NPU
| ResNet18 | QNN_DLC | w8a8 | Qualcomm® QCS9075 | 0.624 ms | 2 - 4 MB | NPU
| ResNet18 | QNN_DLC | w8a8 | Qualcomm® QCM6690 | 3.245 ms | 0 - 31 MB | NPU
| ResNet18 | QNN_DLC | w8a8 | Qualcomm® QCS8450 (Proxy) | 0.749 ms | 0 - 49 MB | NPU
| ResNet18 | QNN_DLC | w8a8 | Qualcomm® SA7255P | 1.271 ms | 0 - 24 MB | NPU
| ResNet18 | QNN_DLC | w8a8 | Qualcomm® SA8295P | 0.911 ms | 0 - 21 MB | NPU
| ResNet18 | QNN_DLC | w8a8 | Snapdragon® 8 Elite For Galaxy Mobile | 0.3 ms | 0 - 27 MB | NPU
| ResNet18 | QNN_DLC | w8a8 | Snapdragon® 7 Gen 4 Mobile | 0.683 ms | 0 - 31 MB | NPU
| ResNet18 | QNN_DLC | w8a8 | Snapdragon® 8 Elite Gen 5 Mobile | 0.258 ms | 0 - 25 MB | NPU
| ResNet18 | QNN_DLC | w8a8 | Snapdragon® X2 Elite | 0.322 ms | 0 - 0 MB | NPU
| ResNet18 | TFLITE | float | Snapdragon® 8 Gen 3 Mobile | 0.92 ms | 0 - 63 MB | NPU
| ResNet18 | TFLITE | float | Qualcomm® QCS8275 (Proxy) | 5.743 ms | 0 - 27 MB | NPU
| ResNet18 | TFLITE | float | Qualcomm® QCS8550 (Proxy) | 1.333 ms | 0 - 3 MB | NPU
| ResNet18 | TFLITE | float | Qualcomm® SA8775P | 1.965 ms | 0 - 30 MB | NPU
| ResNet18 | TFLITE | float | Qualcomm® QCS9075 | 2.031 ms | 0 - 25 MB | NPU
| ResNet18 | TFLITE | float | Qualcomm® QCS8450 (Proxy) | 2.453 ms | 0 - 61 MB | NPU
| ResNet18 | TFLITE | float | Qualcomm® SA7255P | 5.743 ms | 0 - 27 MB | NPU
| ResNet18 | TFLITE | float | Qualcomm® SA8295P | 2.273 ms | 0 - 22 MB | NPU
| ResNet18 | TFLITE | float | Snapdragon® 8 Elite For Galaxy Mobile | 0.707 ms | 0 - 26 MB | NPU
| ResNet18 | TFLITE | float | Snapdragon® 8 Elite Gen 5 Mobile | 0.588 ms | 0 - 30 MB | NPU
| ResNet18 | TFLITE | w8a8 | Snapdragon® 8 Gen 3 Mobile | 0.287 ms | 0 - 46 MB | NPU
| ResNet18 | TFLITE | w8a8 | Qualcomm® QCS6490 | 1.458 ms | 0 - 13 MB | NPU
| ResNet18 | TFLITE | w8a8 | Qualcomm® QCS8275 (Proxy) | 1.03 ms | 0 - 23 MB | NPU
| ResNet18 | TFLITE | w8a8 | Qualcomm® QCS8550 (Proxy) | 0.388 ms | 0 - 1 MB | NPU
| ResNet18 | TFLITE | w8a8 | Qualcomm® SA8775P | 0.572 ms | 0 - 25 MB | NPU
| ResNet18 | TFLITE | w8a8 | Qualcomm® QCS9075 | 0.475 ms | 0 - 13 MB | NPU
| ResNet18 | TFLITE | w8a8 | Qualcomm® QCM6690 | 2.801 ms | 0 - 30 MB | NPU
| ResNet18 | TFLITE | w8a8 | Qualcomm® QCS8450 (Proxy) | 0.615 ms | 0 - 48 MB | NPU
| ResNet18 | TFLITE | w8a8 | Qualcomm® SA7255P | 1.03 ms | 0 - 23 MB | NPU
| ResNet18 | TFLITE | w8a8 | Qualcomm® SA8295P | 0.765 ms | 0 - 21 MB | NPU
| ResNet18 | TFLITE | w8a8 | Snapdragon® 8 Elite For Galaxy Mobile | 0.235 ms | 0 - 26 MB | NPU
| ResNet18 | TFLITE | w8a8 | Snapdragon® 7 Gen 4 Mobile | 0.55 ms | 0 - 30 MB | NPU
| ResNet18 | TFLITE | w8a8 | Snapdragon® 8 Elite Gen 5 Mobile | 0.224 ms | 0 - 25 MB | NPU
## License
* The license for the original implementation of ResNet18 can be found
[here](https://github.com/pytorch/vision/blob/main/LICENSE).
## References
* [Deep Residual Learning for Image Recognition](https://arxiv.org/abs/1512.03385)
* [Source Model Implementation](https://github.com/pytorch/vision/blob/main/torchvision/models/resnet.py)
## 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).
|