--- library_name: pytorch license: other tags: - backbone - android pipeline_tag: video-classification --- ![](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/resnet_2plus1d/web-assets/model_demo.png) # ResNet-2Plus1D: Optimized for Qualcomm Devices ResNet (2+1)D Convolutions is a network which explicitly factorizes 3D convolution into two separate and successive operations, a 2D spatial convolution and a 1D temporal convolution. It used for video understanding applications. This is based on the implementation of ResNet-2Plus1D found [here](https://github.com/pytorch/vision/blob/main/torchvision/models/video/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/resnet_2plus1d) 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.37, ONNX Runtime 1.23.0 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/resnet_2plus1d/releases/v0.46.0/resnet_2plus1d-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/resnet_2plus1d/releases/v0.46.0/resnet_2plus1d-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/resnet_2plus1d/releases/v0.46.0/resnet_2plus1d-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/resnet_2plus1d/releases/v0.46.0/resnet_2plus1d-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/resnet_2plus1d/releases/v0.46.0/resnet_2plus1d-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/resnet_2plus1d/releases/v0.46.0/resnet_2plus1d-tflite-w8a8.zip) For more device-specific assets and performance metrics, visit **[ResNet-2Plus1D on Qualcomm® AI Hub](https://aihub.qualcomm.com/models/resnet_2plus1d)**. ### 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/resnet_2plus1d) 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 [ResNet-2Plus1D on GitHub](https://github.com/quic/ai-hub-models/blob/main/qai_hub_models/models/resnet_2plus1d) for usage instructions. ## Model Details **Model Type:** Model_use_case.video_classification **Model Stats:** - Model checkpoint: Kinetics-400 - Input resolution: 112x112 - Number of parameters: 31.5M - Model size (float): 120 MB - Model size (w8a8): 30.8 MB ## Performance Summary | Model | Runtime | Precision | Chipset | Inference Time (ms) | Peak Memory Range (MB) | Primary Compute Unit |---|---|---|---|---|---|--- | ResNet-2Plus1D | ONNX | float | Snapdragon® X Elite | 12.314 ms | 60 - 60 MB | NPU | ResNet-2Plus1D | ONNX | float | Snapdragon® 8 Gen 3 Mobile | 8.743 ms | 0 - 229 MB | NPU | ResNet-2Plus1D | ONNX | float | Qualcomm® QCS8550 (Proxy) | 12.02 ms | 0 - 64 MB | NPU | ResNet-2Plus1D | ONNX | float | Qualcomm® QCS9075 | 22.247 ms | 2 - 7 MB | NPU | ResNet-2Plus1D | ONNX | float | Snapdragon® 8 Elite For Galaxy Mobile | 7.188 ms | 0 - 144 MB | NPU | ResNet-2Plus1D | ONNX | float | Snapdragon® 8 Elite Gen 5 Mobile | 5.493 ms | 2 - 150 MB | NPU | ResNet-2Plus1D | ONNX | w8a8 | Snapdragon® X Elite | 4.492 ms | 31 - 31 MB | NPU | ResNet-2Plus1D | ONNX | w8a8 | Snapdragon® 8 Gen 3 Mobile | 3.21 ms | 0 - 184 MB | NPU | ResNet-2Plus1D | ONNX | w8a8 | Qualcomm® QCS6490 | 316.355 ms | 97 - 129 MB | CPU | ResNet-2Plus1D | ONNX | w8a8 | Qualcomm® QCS8550 (Proxy) | 4.359 ms | 0 - 37 MB | NPU | ResNet-2Plus1D | ONNX | w8a8 | Qualcomm® QCS9075 | 4.338 ms | 1 - 3 MB | NPU | ResNet-2Plus1D | ONNX | w8a8 | Qualcomm® QCM6690 | 300.353 ms | 98 - 106 MB | CPU | ResNet-2Plus1D | ONNX | w8a8 | Snapdragon® 8 Elite For Galaxy Mobile | 2.618 ms | 0 - 130 MB | NPU | ResNet-2Plus1D | ONNX | w8a8 | Snapdragon® 7 Gen 4 Mobile | 266.261 ms | 67 - 74 MB | CPU | ResNet-2Plus1D | ONNX | w8a8 | Snapdragon® 8 Elite Gen 5 Mobile | 1.909 ms | 0 - 133 MB | NPU | ResNet-2Plus1D | QNN_DLC | float | Snapdragon® X Elite | 12.962 ms | 2 - 2 MB | NPU | ResNet-2Plus1D | QNN_DLC | float | Snapdragon® 8 Gen 3 Mobile | 9.292 ms | 0 - 301 MB | NPU | ResNet-2Plus1D | QNN_DLC | float | Qualcomm® QCS8275 (Proxy) | 81.966 ms | 1 - 216 MB | NPU | ResNet-2Plus1D | QNN_DLC | float | Qualcomm® QCS8550 (Proxy) | 12.555 ms | 2 - 4 MB | NPU | ResNet-2Plus1D | QNN_DLC | float | Qualcomm® SA8775P | 21.332 ms | 0 - 214 MB | NPU | ResNet-2Plus1D | QNN_DLC | float | Qualcomm® QCS9075 | 22.91 ms | 2 - 6 MB | NPU | ResNet-2Plus1D | QNN_DLC | float | Qualcomm® QCS8450 (Proxy) | 28.82 ms | 1 - 278 MB | NPU | ResNet-2Plus1D | QNN_DLC | float | Qualcomm® SA7255P | 81.966 ms | 1 - 216 MB | NPU | ResNet-2Plus1D | QNN_DLC | float | Qualcomm® SA8295P | 22.718 ms | 0 - 198 MB | NPU | ResNet-2Plus1D | QNN_DLC | float | Snapdragon® 8 Elite For Galaxy Mobile | 7.243 ms | 0 - 233 MB | NPU | ResNet-2Plus1D | QNN_DLC | float | Snapdragon® 8 Elite Gen 5 Mobile | 5.598 ms | 2 - 230 MB | NPU | ResNet-2Plus1D | QNN_DLC | w8a8 | Snapdragon® X Elite | 4.897 ms | 1 - 1 MB | NPU | ResNet-2Plus1D | QNN_DLC | w8a8 | Snapdragon® 8 Gen 3 Mobile | 3.334 ms | 1 - 221 MB | NPU | ResNet-2Plus1D | QNN_DLC | w8a8 | Qualcomm® QCS6490 | 19.711 ms | 1 - 3 MB | NPU | ResNet-2Plus1D | QNN_DLC | w8a8 | Qualcomm® QCS8275 (Proxy) | 13.435 ms | 1 - 182 MB | NPU | ResNet-2Plus1D | QNN_DLC | w8a8 | Qualcomm® QCS8550 (Proxy) | 4.565 ms | 1 - 28 MB | NPU | ResNet-2Plus1D | QNN_DLC | w8a8 | Qualcomm® SA8775P | 20.06 ms | 1 - 181 MB | NPU | ResNet-2Plus1D | QNN_DLC | w8a8 | Qualcomm® QCS9075 | 4.778 ms | 3 - 5 MB | NPU | ResNet-2Plus1D | QNN_DLC | w8a8 | Qualcomm® QCM6690 | 72.289 ms | 1 - 197 MB | NPU | ResNet-2Plus1D | QNN_DLC | w8a8 | Qualcomm® QCS8450 (Proxy) | 7.878 ms | 0 - 218 MB | NPU | ResNet-2Plus1D | QNN_DLC | w8a8 | Qualcomm® SA7255P | 13.435 ms | 1 - 182 MB | NPU | ResNet-2Plus1D | QNN_DLC | w8a8 | Qualcomm® SA8295P | 7.834 ms | 1 - 180 MB | NPU | ResNet-2Plus1D | QNN_DLC | w8a8 | Snapdragon® 8 Elite For Galaxy Mobile | 2.574 ms | 1 - 181 MB | NPU | ResNet-2Plus1D | QNN_DLC | w8a8 | Snapdragon® 7 Gen 4 Mobile | 7.789 ms | 1 - 189 MB | NPU | ResNet-2Plus1D | QNN_DLC | w8a8 | Snapdragon® 8 Elite Gen 5 Mobile | 1.874 ms | 1 - 185 MB | NPU | ResNet-2Plus1D | TFLITE | float | Snapdragon® 8 Gen 3 Mobile | 287.649 ms | 0 - 323 MB | NPU | ResNet-2Plus1D | TFLITE | float | Qualcomm® QCS8275 (Proxy) | 726.044 ms | 0 - 236 MB | NPU | ResNet-2Plus1D | TFLITE | float | Qualcomm® QCS8550 (Proxy) | 405.049 ms | 0 - 3 MB | NPU | ResNet-2Plus1D | TFLITE | float | Qualcomm® SA8775P | 369.49 ms | 0 - 236 MB | NPU | ResNet-2Plus1D | TFLITE | float | Qualcomm® QCS9075 | 391.464 ms | 0 - 66 MB | NPU | ResNet-2Plus1D | TFLITE | float | Qualcomm® QCS8450 (Proxy) | 468.721 ms | 0 - 313 MB | NPU | ResNet-2Plus1D | TFLITE | float | Qualcomm® SA7255P | 726.044 ms | 0 - 236 MB | NPU | ResNet-2Plus1D | TFLITE | float | Qualcomm® SA8295P | 476.42 ms | 0 - 229 MB | NPU | ResNet-2Plus1D | TFLITE | float | Snapdragon® 8 Elite For Galaxy Mobile | 270.467 ms | 0 - 241 MB | NPU | ResNet-2Plus1D | TFLITE | float | Snapdragon® 8 Elite Gen 5 Mobile | 253.274 ms | 0 - 246 MB | NPU | ResNet-2Plus1D | TFLITE | w8a8 | Snapdragon® 8 Gen 3 Mobile | 550.687 ms | 0 - 507 MB | NPU | ResNet-2Plus1D | TFLITE | w8a8 | Qualcomm® QCS6490 | 1789.997 ms | 269 - 430 MB | NPU | ResNet-2Plus1D | TFLITE | w8a8 | Qualcomm® QCS8275 (Proxy) | 1427.743 ms | 0 - 437 MB | NPU | ResNet-2Plus1D | TFLITE | w8a8 | Qualcomm® QCS8550 (Proxy) | 757.743 ms | 0 - 2 MB | NPU | ResNet-2Plus1D | TFLITE | w8a8 | Qualcomm® SA8775P | 754.27 ms | 0 - 434 MB | NPU | ResNet-2Plus1D | TFLITE | w8a8 | Qualcomm® QCS9075 | 569.83 ms | 0 - 65 MB | NPU | ResNet-2Plus1D | TFLITE | w8a8 | Qualcomm® QCM6690 | 1614.51 ms | 258 - 440 MB | NPU | ResNet-2Plus1D | TFLITE | w8a8 | Qualcomm® QCS8450 (Proxy) | 858.539 ms | 0 - 428 MB | NPU | ResNet-2Plus1D | TFLITE | w8a8 | Qualcomm® SA7255P | 1427.743 ms | 0 - 437 MB | NPU | ResNet-2Plus1D | TFLITE | w8a8 | Qualcomm® SA8295P | 829.459 ms | 0 - 400 MB | NPU | ResNet-2Plus1D | TFLITE | w8a8 | Snapdragon® 8 Elite For Galaxy Mobile | 478.279 ms | 0 - 546 MB | NPU | ResNet-2Plus1D | TFLITE | w8a8 | Snapdragon® 7 Gen 4 Mobile | 1250.05 ms | 260 - 363 MB | NPU | ResNet-2Plus1D | TFLITE | w8a8 | Snapdragon® 8 Elite Gen 5 Mobile | 565.356 ms | 0 - 476 MB | NPU ## License * The license for the original implementation of ResNet-2Plus1D can be found [here](https://github.com/pytorch/vision/blob/main/LICENSE). ## References * [A Closer Look at Spatiotemporal Convolutions for Action Recognition](https://arxiv.org/abs/1711.11248) * [Source Model Implementation](https://github.com/pytorch/vision/blob/main/torchvision/models/video/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).