v0.46.1
Browse filesSee https://github.com/quic/ai-hub-models/releases/v0.46.1 for changelog.
Files changed (8)
- README.md+113-262
- ResNet50_float.dlcDeleted-3
- ResNet50_float.onnx.zipDeleted-3
- ResNet50_float.tfliteDeleted-3
- ResNet50_w8a8.dlcDeleted-3
- ResNet50_w8a8.onnx.zipDeleted-3
- ResNet50_w8a8.tfliteDeleted-3
- tool-versions.yamlDeleted-4
10 unmodified lines111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929010 unmodified lines# ResNet50: Optimized for Mobile Deployment## Imagenet classifier and general purpose backboneResNet50 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 model is an implementation of ResNet50 found [here](https://github.com/pytorch/vision/blob/main/torchvision/models/resnet.py).This repository provides scripts to run ResNet50 on Qualcomm® devices.More details on model performance across various devices, can be found[here](https://aihub.qualcomm.com/models/resnet50).### Model Details- **Model Type:** Model_use_case.image_classification- **Model Stats:**- Model checkpoint: Imagenet- Input resolution: 224x224- Number of parameters: 25.5M- Model size (float): 97.4 MB- Model size (w8a8): 25.1 MB| Model | Precision | Device | Chipset | Target Runtime | Inference Time (ms) | Peak Memory Range (MB) | Primary Compute Unit | Target Model|---|---|---|---|---|---|---|---|---|| ResNet50 | float | QCS8275 (Proxy) | Qualcomm® QCS8275 (Proxy) | TFLITE | 10.599 ms | 0 - 166 MB | NPU | [ResNet50.tflite](https://huggingface.co/qualcomm/ResNet50/blob/main/ResNet50.tflite) || ResNet50 | float | QCS8275 (Proxy) | Qualcomm® QCS8275 (Proxy) | QNN_DLC | 10.654 ms | 1 - 136 MB | NPU | [ResNet50.dlc](https://huggingface.co/qualcomm/ResNet50/blob/main/ResNet50.dlc) || ResNet50 | float | QCS8450 (Proxy) | Qualcomm® QCS8450 (Proxy) | TFLITE | 3.649 ms | 0 - 198 MB | NPU | [ResNet50.tflite](https://huggingface.co/qualcomm/ResNet50/blob/main/ResNet50.tflite) || ResNet50 | float | QCS8450 (Proxy) | Qualcomm® QCS8450 (Proxy) | QNN_DLC | 3.65 ms | 1 - 160 MB | NPU | [ResNet50.dlc](https://huggingface.co/qualcomm/ResNet50/blob/main/ResNet50.dlc) || ResNet50 | float | QCS8550 (Proxy) | Qualcomm® QCS8550 (Proxy) | TFLITE | 2.169 ms | 0 - 3 MB | NPU | [ResNet50.tflite](https://huggingface.co/qualcomm/ResNet50/blob/main/ResNet50.tflite) || ResNet50 | float | QCS8550 (Proxy) | Qualcomm® QCS8550 (Proxy) | QNN_DLC | 2.201 ms | 1 - 3 MB | NPU | [ResNet50.dlc](https://huggingface.co/qualcomm/ResNet50/blob/main/ResNet50.dlc) || ResNet50 | float | QCS8550 (Proxy) | Qualcomm® QCS8550 (Proxy) | ONNX | 2.294 ms | 0 - 58 MB | NPU | [ResNet50.onnx.zip](https://huggingface.co/qualcomm/ResNet50/blob/main/ResNet50.onnx.zip) || ResNet50 | float | QCS9075 (Proxy) | Qualcomm® QCS9075 (Proxy) | TFLITE | 14.156 ms | 0 - 166 MB | NPU | [ResNet50.tflite](https://huggingface.co/qualcomm/ResNet50/blob/main/ResNet50.tflite) || ResNet50 | float | QCS9075 (Proxy) | Qualcomm® QCS9075 (Proxy) | QNN_DLC | 3.348 ms | 1 - 135 MB | NPU | [ResNet50.dlc](https://huggingface.co/qualcomm/ResNet50/blob/main/ResNet50.dlc) || ResNet50 | float | SA7255P ADP | Qualcomm® SA7255P | TFLITE | 10.599 ms | 0 - 166 MB | NPU | [ResNet50.tflite](https://huggingface.co/qualcomm/ResNet50/blob/main/ResNet50.tflite) || ResNet50 | float | SA7255P ADP | Qualcomm® SA7255P | QNN_DLC | 10.654 ms | 1 - 136 MB | NPU | [ResNet50.dlc](https://huggingface.co/qualcomm/ResNet50/blob/main/ResNet50.dlc) || ResNet50 | float | SA8295P ADP | Qualcomm® SA8295P | TFLITE | 3.598 ms | 0 - 160 MB | NPU | [ResNet50.tflite](https://huggingface.co/qualcomm/ResNet50/blob/main/ResNet50.tflite) || ResNet50 | float | SA8295P ADP | Qualcomm® SA8295P | QNN_DLC | 3.661 ms | 0 - 129 MB | NPU | [ResNet50.dlc](https://huggingface.co/qualcomm/ResNet50/blob/main/ResNet50.dlc) || ResNet50 | float | SA8775P ADP | Qualcomm® SA8775P | TFLITE | 14.156 ms | 0 - 166 MB | NPU | [ResNet50.tflite](https://huggingface.co/qualcomm/ResNet50/blob/main/ResNet50.tflite) || ResNet50 | float | SA8775P ADP | Qualcomm® SA8775P | QNN_DLC | 3.348 ms | 1 - 135 MB | NPU | [ResNet50.dlc](https://huggingface.co/qualcomm/ResNet50/blob/main/ResNet50.dlc) || ResNet50 | float | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 Mobile | TFLITE | 1.571 ms | 0 - 207 MB | NPU | [ResNet50.tflite](https://huggingface.co/qualcomm/ResNet50/blob/main/ResNet50.tflite) || ResNet50 | float | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 Mobile | QNN_DLC | 1.613 ms | 1 - 167 MB | NPU | [ResNet50.dlc](https://huggingface.co/qualcomm/ResNet50/blob/main/ResNet50.dlc) || ResNet50 | float | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 Mobile | ONNX | 1.649 ms | 0 - 142 MB | NPU | [ResNet50.onnx.zip](https://huggingface.co/qualcomm/ResNet50/blob/main/ResNet50.onnx.zip) || ResNet50 | float | Samsung Galaxy S25 | Snapdragon® 8 Elite For Galaxy Mobile | TFLITE | 1.282 ms | 0 - 166 MB | NPU | [ResNet50.tflite](https://huggingface.co/qualcomm/ResNet50/blob/main/ResNet50.tflite) || ResNet50 | float | Samsung Galaxy S25 | Snapdragon® 8 Elite For Galaxy Mobile | QNN_DLC | 1.281 ms | 1 - 140 MB | NPU | [ResNet50.dlc](https://huggingface.co/qualcomm/ResNet50/blob/main/ResNet50.dlc) || ResNet50 | float | Samsung Galaxy S25 | Snapdragon® 8 Elite For Galaxy Mobile | ONNX | 1.375 ms | 0 - 111 MB | NPU | [ResNet50.onnx.zip](https://huggingface.co/qualcomm/ResNet50/blob/main/ResNet50.onnx.zip) || ResNet50 | float | Snapdragon 8 Elite Gen 5 QRD | Snapdragon® 8 Elite Gen 5 Mobile | TFLITE | 1.101 ms | 0 - 187 MB | NPU | [ResNet50.tflite](https://huggingface.co/qualcomm/ResNet50/blob/main/ResNet50.tflite) || ResNet50 | float | Snapdragon 8 Elite Gen 5 QRD | Snapdragon® 8 Elite Gen 5 Mobile | QNN_DLC | 1.103 ms | 1 - 160 MB | NPU | [ResNet50.dlc](https://huggingface.co/qualcomm/ResNet50/blob/main/ResNet50.dlc) || ResNet50 | float | Snapdragon 8 Elite Gen 5 QRD | Snapdragon® 8 Elite Gen 5 Mobile | ONNX | 1.211 ms | 0 - 133 MB | NPU | [ResNet50.onnx.zip](https://huggingface.co/qualcomm/ResNet50/blob/main/ResNet50.onnx.zip) || ResNet50 | float | Snapdragon X Elite CRD | Snapdragon® X Elite | QNN_DLC | 2.318 ms | 1 - 1 MB | NPU | [ResNet50.dlc](https://huggingface.co/qualcomm/ResNet50/blob/main/ResNet50.dlc) || ResNet50 | float | Snapdragon X Elite CRD | Snapdragon® X Elite | ONNX | 2.103 ms | 49 - 49 MB | NPU | [ResNet50.onnx.zip](https://huggingface.co/qualcomm/ResNet50/blob/main/ResNet50.onnx.zip) || ResNet50 | w8a8 | Dragonwing Q-6690 MTP | Qualcomm® QCM6690 | TFLITE | 6.011 ms | 0 - 147 MB | NPU | [ResNet50.tflite](https://huggingface.co/qualcomm/ResNet50/blob/main/ResNet50_w8a8.tflite) || ResNet50 | w8a8 | Dragonwing Q-6690 MTP | Qualcomm® QCM6690 | QNN_DLC | 6.625 ms | 0 - 145 MB | NPU | [ResNet50.dlc](https://huggingface.co/qualcomm/ResNet50/blob/main/ResNet50_w8a8.dlc) || ResNet50 | w8a8 | Dragonwing Q-6690 MTP | Qualcomm® QCM6690 | ONNX | 23.102 ms | 7 - 21 MB | CPU | [ResNet50.onnx.zip](https://huggingface.co/qualcomm/ResNet50/blob/main/ResNet50_w8a8.onnx.zip) || ResNet50 | w8a8 | Dragonwing RB3 Gen 2 Vision Kit | Qualcomm® QCS6490 | TFLITE | 2.667 ms | 0 - 27 MB | NPU | [ResNet50.tflite](https://huggingface.co/qualcomm/ResNet50/blob/main/ResNet50_w8a8.tflite) || ResNet50 | w8a8 | Dragonwing RB3 Gen 2 Vision Kit | Qualcomm® QCS6490 | QNN_DLC | 2.996 ms | 2 - 4 MB | NPU | [ResNet50.dlc](https://huggingface.co/qualcomm/ResNet50/blob/main/ResNet50_w8a8.dlc) || ResNet50 | w8a8 | Dragonwing RB3 Gen 2 Vision Kit | Qualcomm® QCS6490 | ONNX | 32.221 ms | 9 - 29 MB | CPU | [ResNet50.onnx.zip](https://huggingface.co/qualcomm/ResNet50/blob/main/ResNet50_w8a8.onnx.zip) || ResNet50 | w8a8 | QCS8275 (Proxy) | Qualcomm® QCS8275 (Proxy) | TFLITE | 1.694 ms | 0 - 134 MB | NPU | [ResNet50.tflite](https://huggingface.co/qualcomm/ResNet50/blob/main/ResNet50_w8a8.tflite) || ResNet50 | w8a8 | QCS8275 (Proxy) | Qualcomm® QCS8275 (Proxy) | QNN_DLC | 1.962 ms | 0 - 134 MB | NPU | [ResNet50.dlc](https://huggingface.co/qualcomm/ResNet50/blob/main/ResNet50_w8a8.dlc) || ResNet50 | w8a8 | QCS8450 (Proxy) | Qualcomm® QCS8450 (Proxy) | TFLITE | 1.075 ms | 0 - 176 MB | NPU | [ResNet50.tflite](https://huggingface.co/qualcomm/ResNet50/blob/main/ResNet50_w8a8.tflite) || ResNet50 | w8a8 | QCS8450 (Proxy) | Qualcomm® QCS8450 (Proxy) | QNN_DLC | 1.215 ms | 0 - 174 MB | NPU | [ResNet50.dlc](https://huggingface.co/qualcomm/ResNet50/blob/main/ResNet50_w8a8.dlc) || ResNet50 | w8a8 | QCS8550 (Proxy) | Qualcomm® QCS8550 (Proxy) | TFLITE | 0.754 ms | 0 - 2 MB | NPU | [ResNet50.tflite](https://huggingface.co/qualcomm/ResNet50/blob/main/ResNet50_w8a8.tflite) || ResNet50 | w8a8 | QCS8550 (Proxy) | Qualcomm® QCS8550 (Proxy) | QNN_DLC | 0.904 ms | 0 - 2 MB | NPU | [ResNet50.dlc](https://huggingface.co/qualcomm/ResNet50/blob/main/ResNet50_w8a8.dlc) || ResNet50 | w8a8 | QCS8550 (Proxy) | Qualcomm® QCS8550 (Proxy) | ONNX | 1.113 ms | 0 - 31 MB | NPU | [ResNet50.onnx.zip](https://huggingface.co/qualcomm/ResNet50/blob/main/ResNet50_w8a8.onnx.zip) || ResNet50 | w8a8 | QCS9075 (Proxy) | Qualcomm® QCS9075 (Proxy) | TFLITE | 0.942 ms | 0 - 134 MB | NPU | [ResNet50.tflite](https://huggingface.co/qualcomm/ResNet50/blob/main/ResNet50_w8a8.tflite) || ResNet50 | w8a8 | QCS9075 (Proxy) | Qualcomm® QCS9075 (Proxy) | QNN_DLC | 3.898 ms | 0 - 134 MB | NPU | [ResNet50.dlc](https://huggingface.co/qualcomm/ResNet50/blob/main/ResNet50_w8a8.dlc) || ResNet50 | w8a8 | SA7255P ADP | Qualcomm® SA7255P | TFLITE | 1.694 ms | 0 - 134 MB | NPU | [ResNet50.tflite](https://huggingface.co/qualcomm/ResNet50/blob/main/ResNet50_w8a8.tflite) || ResNet50 | w8a8 | SA7255P ADP | Qualcomm® SA7255P | QNN_DLC | 1.962 ms | 0 - 134 MB | NPU | [ResNet50.dlc](https://huggingface.co/qualcomm/ResNet50/blob/main/ResNet50_w8a8.dlc) || ResNet50 | w8a8 | SA8295P ADP | Qualcomm® SA8295P | TFLITE | 1.264 ms | 0 - 140 MB | NPU | [ResNet50.tflite](https://huggingface.co/qualcomm/ResNet50/blob/main/ResNet50_w8a8.tflite) || ResNet50 | w8a8 | SA8295P ADP | Qualcomm® SA8295P | QNN_DLC | 1.408 ms | 0 - 141 MB | NPU | [ResNet50.dlc](https://huggingface.co/qualcomm/ResNet50/blob/main/ResNet50_w8a8.dlc) || ResNet50 | w8a8 | SA8775P ADP | Qualcomm® SA8775P | TFLITE | 0.942 ms | 0 - 134 MB | NPU | [ResNet50.tflite](https://huggingface.co/qualcomm/ResNet50/blob/main/ResNet50_w8a8.tflite) || ResNet50 | w8a8 | SA8775P ADP | Qualcomm® SA8775P | QNN_DLC | 3.898 ms | 0 - 134 MB | NPU | [ResNet50.dlc](https://huggingface.co/qualcomm/ResNet50/blob/main/ResNet50_w8a8.dlc) || ResNet50 | w8a8 | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 Mobile | TFLITE | 0.593 ms | 0 - 170 MB | NPU | [ResNet50.tflite](https://huggingface.co/qualcomm/ResNet50/blob/main/ResNet50_w8a8.tflite) || ResNet50 | w8a8 | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 Mobile | QNN_DLC | 0.664 ms | 0 - 172 MB | NPU | [ResNet50.dlc](https://huggingface.co/qualcomm/ResNet50/blob/main/ResNet50_w8a8.dlc) || ResNet50 | w8a8 | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 Mobile | ONNX | 0.796 ms | 0 - 152 MB | NPU | [ResNet50.onnx.zip](https://huggingface.co/qualcomm/ResNet50/blob/main/ResNet50_w8a8.onnx.zip) || ResNet50 | w8a8 | Samsung Galaxy S25 | Snapdragon® 8 Elite For Galaxy Mobile | TFLITE | 0.485 ms | 0 - 133 MB | NPU | [ResNet50.tflite](https://huggingface.co/qualcomm/ResNet50/blob/main/ResNet50_w8a8.tflite) || ResNet50 | w8a8 | Samsung Galaxy S25 | Snapdragon® 8 Elite For Galaxy Mobile | QNN_DLC | 0.525 ms | 0 - 136 MB | NPU | [ResNet50.dlc](https://huggingface.co/qualcomm/ResNet50/blob/main/ResNet50_w8a8.dlc) || ResNet50 | w8a8 | Samsung Galaxy S25 | Snapdragon® 8 Elite For Galaxy Mobile | ONNX | 0.687 ms | 0 - 111 MB | NPU | [ResNet50.onnx.zip](https://huggingface.co/qualcomm/ResNet50/blob/main/ResNet50_w8a8.onnx.zip) || ResNet50 | w8a8 | Snapdragon 7 Gen 4 QRD | Snapdragon® 7 Gen 4 Mobile | TFLITE | 1.103 ms | 0 - 146 MB | NPU | [ResNet50.tflite](https://huggingface.co/qualcomm/ResNet50/blob/main/ResNet50_w8a8.tflite) || ResNet50 | w8a8 | Snapdragon 7 Gen 4 QRD | Snapdragon® 7 Gen 4 Mobile | QNN_DLC | 1.256 ms | 0 - 147 MB | NPU | [ResNet50.dlc](https://huggingface.co/qualcomm/ResNet50/blob/main/ResNet50_w8a8.dlc) || ResNet50 | w8a8 | Snapdragon 7 Gen 4 QRD | Snapdragon® 7 Gen 4 Mobile | ONNX | 21.756 ms | 6 - 22 MB | CPU | [ResNet50.onnx.zip](https://huggingface.co/qualcomm/ResNet50/blob/main/ResNet50_w8a8.onnx.zip) || ResNet50 | w8a8 | Snapdragon 8 Elite Gen 5 QRD | Snapdragon® 8 Elite Gen 5 Mobile | TFLITE | 0.445 ms | 0 - 136 MB | NPU | [ResNet50.tflite](https://huggingface.co/qualcomm/ResNet50/blob/main/ResNet50_w8a8.tflite) || ResNet50 | w8a8 | Snapdragon 8 Elite Gen 5 QRD | Snapdragon® 8 Elite Gen 5 Mobile | QNN_DLC | 0.494 ms | 0 - 137 MB | NPU | [ResNet50.dlc](https://huggingface.co/qualcomm/ResNet50/blob/main/ResNet50_w8a8.dlc) || ResNet50 | w8a8 | Snapdragon 8 Elite Gen 5 QRD | Snapdragon® 8 Elite Gen 5 Mobile | ONNX | 0.662 ms | 0 - 114 MB | NPU | [ResNet50.onnx.zip](https://huggingface.co/qualcomm/ResNet50/blob/main/ResNet50_w8a8.onnx.zip) || ResNet50 | w8a8 | Snapdragon X Elite CRD | Snapdragon® X Elite | QNN_DLC | 0.959 ms | 0 - 0 MB | NPU | [ResNet50.dlc](https://huggingface.co/qualcomm/ResNet50/blob/main/ResNet50_w8a8.dlc) || ResNet50 | w8a8 | Snapdragon X Elite CRD | Snapdragon® X Elite | ONNX | 0.959 ms | 25 - 25 MB | NPU | [ResNet50.onnx.zip](https://huggingface.co/qualcomm/ResNet50/blob/main/ResNet50_w8a8.onnx.zip) |## InstallationInstall the package via pip:```bashpip install qai-hub-models```## Configure Qualcomm® AI Hub Workbench to run this model on a cloud-hosted deviceSign-in to [Qualcomm® AI Hub Workbench](https://workbench.aihub.qualcomm.com/) with yourQualcomm® ID. Once signed in navigate to `Account -> Settings -> API Token`.With this API token, you can configure your client to run models on the cloudhosted devices.```bashqai-hub configure --api_token API_TOKEN```Navigate to [docs](https://workbench.aihub.qualcomm.com/docs/) for more information.## Demo off targetThe package contains a simple end-to-end demo that downloads pre-trainedweights and runs this model on a sample input.```bashpython -m qai_hub_models.models.resnet50.demo```The above demo runs a reference implementation of pre-processing, modelinference, and post processing.**NOTE**: If you want running in a Jupyter Notebook or Google Colab likeenvironment, please add the following to your cell (instead of the above).```%run -m qai_hub_models.models.resnet50.demo```### Run model on a cloud-hosted deviceIn addition to the demo, you can also run the model on a cloud-hosted Qualcomm®device. This script does the following:* Performance check on-device on a cloud-hosted device* Downloads compiled assets that can be deployed on-device for Android.* Accuracy check between PyTorch and on-device outputs.```bashpython -m qai_hub_models.models.resnet50.export```## How does this work?This [export script](https://aihub.qualcomm.com/models/resnet50/qai_hub_models/models/ResNet50/export.py)leverages [Qualcomm® AI Hub](https://aihub.qualcomm.com/) to optimize, validate, and deploy this modelon-device. Lets go through each step below in detail:Step 1: **Compile model for on-device deployment**To compile a PyTorch model for on-device deployment, we first trace the modelin memory using the `jit.trace` and then call the `submit_compile_job` API.```pythonimport torchimport qai_hub as hubfrom qai_hub_models.models.resnet50 import Model# Load the modeltorch_model = Model.from_pretrained()# Devicedevice = hub.Device("Samsung Galaxy S25")# Trace modelinput_shape = torch_model.get_input_spec()sample_inputs = torch_model.sample_inputs()pt_model = torch.jit.trace(torch_model, [torch.tensor(data[0]) for _, data in sample_inputs.items()])# Compile model on a specific devicecompile_job = hub.submit_compile_job(model=pt_model,device=device,input_specs=torch_model.get_input_spec(),)# Get target model to run on-devicetarget_model = compile_job.get_target_model()```Step 2: **Performance profiling on cloud-hosted device**After compiling models from step 1. Models can be profiled model on-device using the`target_model`. Note that this scripts runs the model on a device automaticallyprovisioned in the cloud. Once the job is submitted, you can navigate to aprovided job URL to view a variety of on-device performance metrics.```pythonprofile_job = hub.submit_profile_job(model=target_model,device=device,)```Step 3: **Verify on-device accuracy**To verify the accuracy of the model on-device, you can run on-device inferenceon sample input data on the same cloud hosted device.```pythoninput_data = torch_model.sample_inputs()inference_job = hub.submit_inference_job(model=target_model,device=device,inputs=input_data,)on_device_output = inference_job.download_output_data()```With the output of the model, you can compute like PSNR, relative errors orspot check the output with expected output.**Note**: This on-device profiling and inference requires access to Qualcomm®AI Hub Workbench. [Sign up for access](https://myaccount.qualcomm.com/signup).## Run demo on a cloud-hosted deviceYou can also run the demo on-device.```bashpython -m qai_hub_models.models.resnet50.demo --eval-mode on-device```**NOTE**: If you want running in a Jupyter Notebook or Google Colab likeenvironment, please add the following to your cell (instead of the above).```%run -m qai_hub_models.models.resnet50.demo -- --eval-mode on-device```## Deploying compiled model to AndroidThe models can be deployed using multiple runtimes:- TensorFlow Lite (`.tflite` export): [Thistutorial](https://www.tensorflow.org/lite/android/quickstart) provides aguide to deploy the .tflite model in an Android application.- QNN (`.so` export ): This [sampleapp](https://docs.qualcomm.com/bundle/publicresource/topics/80-63442-50/sample_app.html)provides instructions on how to use the `.so` shared library in an Android application.## View on Qualcomm® AI HubGet more details on ResNet50's performance across various devices [here](https://aihub.qualcomm.com/models/resnet50).Explore all available models on [Qualcomm® AI Hub](https://aihub.qualcomm.com/)## License* The license for the original implementation of ResNet50 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).10 unmodified lines111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014110 unmodified lines# ResNet50: Optimized for Qualcomm DevicesResNet50 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 ResNet50 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/resnet50) 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 StartedThere are two ways to deploy this model on your device:### Option 1: Download Pre-Exported ModelsBelow are pre-exported model assets ready for deployment.| Runtime | Precision | Chipset | SDK Versions | Download ||---|---|---|---|---|| ONNX | float | Universal | QAIRT 2.37, ONNX Runtime 1.23.0 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/resnet50/releases/v0.46.1/resnet50-onnx-float.zip)| ONNX | w8a8 | Universal | QAIRT 2.37, ONNX Runtime 1.23.0 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/resnet50/releases/v0.46.1/resnet50-onnx-w8a8.zip)| QNN_DLC | float | Universal | QAIRT 2.42 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/resnet50/releases/v0.46.1/resnet50-qnn_dlc-float.zip)| QNN_DLC | w8a8 | Universal | QAIRT 2.42 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/resnet50/releases/v0.46.1/resnet50-qnn_dlc-w8a8.zip)| TFLITE | float | Universal | QAIRT 2.42, TFLite 2.17.0 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/resnet50/releases/v0.46.1/resnet50-tflite-float.zip)| TFLITE | w8a8 | Universal | QAIRT 2.42, TFLite 2.17.0 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/resnet50/releases/v0.46.1/resnet50-tflite-w8a8.zip)For more device-specific assets and performance metrics, visit **[ResNet50 on Qualcomm® AI Hub](https://aihub.qualcomm.com/models/resnet50)**.### Option 2: Export with Custom ConfigurationsUse the [Qualcomm® AI Hub Models](https://github.com/quic/ai-hub-models/blob/main/qai_hub_models/models/resnet50) 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 configurationsThis option is ideal if you need to customize the model beyond the default configuration provided here.See our repository for [ResNet50 on GitHub](https://github.com/quic/ai-hub-models/blob/main/qai_hub_models/models/resnet50) for usage instructions.## Model Details**Model Type:** Model_use_case.image_classification**Model Stats:**- Model checkpoint: Imagenet- Input resolution: 224x224- Number of parameters: 25.5M- Model size (float): 97.4 MB- Model size (w8a8): 25.1 MB## Performance Summary| Model | Runtime | Precision | Chipset | Inference Time (ms) | Peak Memory Range (MB) | Primary Compute Unit|---|---|---|---|---|---|---| ResNet50 | ONNX | float | Snapdragon® X Elite | 2.108 ms | 49 - 49 MB | NPU| ResNet50 | ONNX | float | Snapdragon® 8 Gen 3 Mobile | 1.724 ms | 0 - 140 MB | NPU| ResNet50 | ONNX | float | Qualcomm® QCS8550 (Proxy) | 2.281 ms | 0 - 61 MB | NPU| ResNet50 | ONNX | float | Qualcomm® QCS9075 | 3.284 ms | 1 - 4 MB | NPU| ResNet50 | ONNX | float | Snapdragon® 8 Elite For Galaxy Mobile | 1.387 ms | 0 - 111 MB | NPU| ResNet50 | ONNX | float | Snapdragon® 8 Elite Gen 5 Mobile | 1.212 ms | 0 - 134 MB | NPU| ResNet50 | ONNX | w8a8 | Snapdragon® X Elite | 0.962 ms | 25 - 25 MB | NPU| ResNet50 | ONNX | w8a8 | Snapdragon® 8 Gen 3 Mobile | 0.864 ms | 0 - 147 MB | NPU| ResNet50 | ONNX | w8a8 | Qualcomm® QCS6490 | 32.258 ms | 9 - 31 MB | CPU| ResNet50 | ONNX | w8a8 | Qualcomm® QCS8550 (Proxy) | 1.118 ms | 0 - 173 MB | NPU| ResNet50 | ONNX | w8a8 | Qualcomm® QCS9075 | 1.205 ms | 0 - 3 MB | NPU| ResNet50 | ONNX | w8a8 | Qualcomm® QCM6690 | 22.973 ms | 1 - 11 MB | CPU| ResNet50 | ONNX | w8a8 | Snapdragon® 8 Elite For Galaxy Mobile | 0.716 ms | 0 - 110 MB | NPU| ResNet50 | ONNX | w8a8 | Snapdragon® 7 Gen 4 Mobile | 17.351 ms | 6 - 13 MB | CPU| ResNet50 | ONNX | w8a8 | Snapdragon® 8 Elite Gen 5 Mobile | 0.663 ms | 0 - 114 MB | NPU| ResNet50 | QNN_DLC | float | Snapdragon® X Elite | 2.379 ms | 1 - 1 MB | NPU| ResNet50 | QNN_DLC | float | Snapdragon® 8 Gen 3 Mobile | 1.638 ms | 0 - 79 MB | NPU| ResNet50 | QNN_DLC | float | Qualcomm® QCS8275 (Proxy) | 10.695 ms | 1 - 47 MB | NPU| ResNet50 | QNN_DLC | float | Qualcomm® QCS8550 (Proxy) | 2.233 ms | 1 - 3 MB | NPU| ResNet50 | QNN_DLC | float | Qualcomm® SA8775P | 3.386 ms | 1 - 48 MB | NPU| ResNet50 | QNN_DLC | float | Qualcomm® QCS9075 | 3.311 ms | 1 - 3 MB | NPU| ResNet50 | QNN_DLC | float | Qualcomm® QCS8450 (Proxy) | 3.739 ms | 0 - 62 MB | NPU| ResNet50 | QNN_DLC | float | Qualcomm® SA7255P | 10.695 ms | 1 - 47 MB | NPU| ResNet50 | QNN_DLC | float | Qualcomm® SA8295P | 3.67 ms | 0 - 30 MB | NPU| ResNet50 | QNN_DLC | float | Snapdragon® 8 Elite For Galaxy Mobile | 1.325 ms | 0 - 48 MB | NPU| ResNet50 | QNN_DLC | float | Snapdragon® 8 Elite Gen 5 Mobile | 1.099 ms | 1 - 70 MB | NPU| ResNet50 | QNN_DLC | w8a8 | Snapdragon® X Elite | 0.958 ms | 0 - 0 MB | NPU| ResNet50 | QNN_DLC | w8a8 | Snapdragon® 8 Gen 3 Mobile | 0.687 ms | 0 - 70 MB | NPU| ResNet50 | QNN_DLC | w8a8 | Qualcomm® QCS6490 | 3.002 ms | 0 - 2 MB | NPU| ResNet50 | QNN_DLC | w8a8 | Qualcomm® QCS8275 (Proxy) | 1.975 ms | 0 - 41 MB | NPU| ResNet50 | QNN_DLC | w8a8 | Qualcomm® QCS8550 (Proxy) | 0.902 ms | 0 - 183 MB | NPU| ResNet50 | QNN_DLC | w8a8 | Qualcomm® SA8775P | 1.081 ms | 0 - 44 MB | NPU| ResNet50 | QNN_DLC | w8a8 | Qualcomm® QCS9075 | 0.962 ms | 0 - 2 MB | NPU| ResNet50 | QNN_DLC | w8a8 | Qualcomm® QCM6690 | 6.501 ms | 0 - 162 MB | NPU| ResNet50 | QNN_DLC | w8a8 | Qualcomm® QCS8450 (Proxy) | 1.199 ms | 0 - 74 MB | NPU| ResNet50 | QNN_DLC | w8a8 | Qualcomm® SA7255P | 1.975 ms | 0 - 41 MB | NPU| ResNet50 | QNN_DLC | w8a8 | Qualcomm® SA8295P | 1.445 ms | 0 - 39 MB | NPU| ResNet50 | QNN_DLC | w8a8 | Snapdragon® 8 Elite For Galaxy Mobile | 0.532 ms | 0 - 38 MB | NPU| ResNet50 | QNN_DLC | w8a8 | Snapdragon® 7 Gen 4 Mobile | 1.259 ms | 0 - 47 MB | NPU| ResNet50 | QNN_DLC | w8a8 | Snapdragon® 8 Elite Gen 5 Mobile | 0.494 ms | 0 - 41 MB | NPU| ResNet50 | TFLITE | float | Snapdragon® 8 Gen 3 Mobile | 1.6 ms | 0 - 121 MB | NPU| ResNet50 | TFLITE | float | Qualcomm® QCS8275 (Proxy) | 10.624 ms | 0 - 82 MB | NPU| ResNet50 | TFLITE | float | Qualcomm® QCS8550 (Proxy) | 2.198 ms | 0 - 2 MB | NPU| ResNet50 | TFLITE | float | Qualcomm® SA8775P | 14.365 ms | 0 - 82 MB | NPU| ResNet50 | TFLITE | float | Qualcomm® QCS9075 | 3.343 ms | 0 - 52 MB | NPU| ResNet50 | TFLITE | float | Qualcomm® QCS8450 (Proxy) | 3.728 ms | 0 - 105 MB | NPU| ResNet50 | TFLITE | float | Qualcomm® SA7255P | 10.624 ms | 0 - 82 MB | NPU| ResNet50 | TFLITE | float | Qualcomm® SA8295P | 3.686 ms | 0 - 67 MB | NPU| ResNet50 | TFLITE | float | Snapdragon® 8 Elite For Galaxy Mobile | 1.302 ms | 0 - 78 MB | NPU| ResNet50 | TFLITE | float | Snapdragon® 8 Elite Gen 5 Mobile | 1.1 ms | 0 - 103 MB | NPU| ResNet50 | TFLITE | w8a8 | Snapdragon® 8 Gen 3 Mobile | 0.576 ms | 0 - 72 MB | NPU| ResNet50 | TFLITE | w8a8 | Qualcomm® QCS6490 | 2.612 ms | 0 - 27 MB | NPU| ResNet50 | TFLITE | w8a8 | Qualcomm® QCS8275 (Proxy) | 1.733 ms | 0 - 40 MB | NPU| ResNet50 | TFLITE | w8a8 | Qualcomm® QCS8550 (Proxy) | 0.767 ms | 0 - 31 MB | NPU| ResNet50 | TFLITE | w8a8 | Qualcomm® SA8775P | 0.96 ms | 0 - 43 MB | NPU| ResNet50 | TFLITE | w8a8 | Qualcomm® QCS9075 | 0.813 ms | 0 - 27 MB | NPU| ResNet50 | TFLITE | w8a8 | Qualcomm® QCM6690 | 6.25 ms | 0 - 159 MB | NPU| ResNet50 | TFLITE | w8a8 | Qualcomm® QCS8450 (Proxy) | 1.059 ms | 0 - 74 MB | NPU| ResNet50 | TFLITE | w8a8 | Qualcomm® SA7255P | 1.733 ms | 0 - 40 MB | NPU| ResNet50 | TFLITE | w8a8 | Qualcomm® SA8295P | 1.314 ms | 0 - 37 MB | NPU| ResNet50 | TFLITE | w8a8 | Snapdragon® 8 Elite For Galaxy Mobile | 0.491 ms | 0 - 38 MB | NPU| ResNet50 | TFLITE | w8a8 | Snapdragon® 7 Gen 4 Mobile | 1.088 ms | 0 - 46 MB | NPU| ResNet50 | TFLITE | w8a8 | Snapdragon® 8 Elite Gen 5 Mobile | 0.445 ms | 0 - 41 MB | NPU## License* The license for the original implementation of ResNet50 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).
123version https://git-lfs.github.com/spec/v1oid sha256:17e3c4a0f8f12ab8d56a8157956de495af464284bd1cf8cda531ef596724a1bdsize 102260596123version https://git-lfs.github.com/spec/v1oid sha256:7b4a223b95aaf1cf0ead1dd74af440aa6dc5db8ffe2b0d83d0dc20c0286c704asize 95254689123version https://git-lfs.github.com/spec/v1oid sha256:e352c0f14c2ca0e243259d6e73c9739a76e607831d81db8cf6b7a8f6c6df18b2size 102147696123version https://git-lfs.github.com/spec/v1oid sha256:98008d3188153e67601d11445af10dfbf6a639e5e6caf2423d3786188098c6d2size 27246108123version https://git-lfs.github.com/spec/v1oid sha256:f269e497e2e0866356c21b614b9d799cb38938e9e5f6fdf253c8d5d43ad82031size 44974946123version https://git-lfs.github.com/spec/v1oid sha256:6f23b9eff40808c4dc7477d71e90d186d43227cc7985ce9a9bfcb42cf8e51cefsize 263032881234tool_versions: onnx: qairt: 2.37.1.250807093845_124904 onnx_runtime: 1.23.0README.md+113-262
ResNet50_float.dlcDeleted-3
ResNet50_float.onnx.zipDeleted-3
ResNet50_float.tfliteDeleted-3
ResNet50_w8a8.dlcDeleted-3
ResNet50_w8a8.onnx.zipDeleted-3
ResNet50_w8a8.tfliteDeleted-3
tool-versions.yamlDeleted-4