--- 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.42, ONNX Runtime 1.24.1 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/resnet_2plus1d/releases/v0.47.0/resnet_2plus1d-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/resnet_2plus1d/releases/v0.47.0/resnet_2plus1d-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/resnet_2plus1d/releases/v0.47.0/resnet_2plus1d-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/resnet_2plus1d/releases/v0.47.0/resnet_2plus1d-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/resnet_2plus1d/releases/v0.47.0/resnet_2plus1d-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/resnet_2plus1d/releases/v0.47.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.203 ms | 60 - 60 MB | NPU | ResNet-2Plus1D | ONNX | float | Snapdragon® 8 Gen 3 Mobile | 9.023 ms | 2 - 300 MB | NPU | ResNet-2Plus1D | ONNX | float | Qualcomm® QCS8550 (Proxy) | 11.987 ms | 2 - 8 MB | NPU | ResNet-2Plus1D | ONNX | float | Qualcomm® QCS9075 | 21.906 ms | 2 - 7 MB | NPU | ResNet-2Plus1D | ONNX | float | Snapdragon® 8 Elite For Galaxy Mobile | 7.21 ms | 0 - 211 MB | NPU | ResNet-2Plus1D | ONNX | float | Snapdragon® 8 Elite Gen 5 Mobile | 5.52 ms | 2 - 215 MB | NPU | ResNet-2Plus1D | ONNX | float | Snapdragon® X2 Elite | 6.147 ms | 60 - 60 MB | NPU | ResNet-2Plus1D | ONNX | w8a8 | Snapdragon® X Elite | 4.544 ms | 31 - 31 MB | NPU | ResNet-2Plus1D | ONNX | w8a8 | Snapdragon® 8 Gen 3 Mobile | 3.302 ms | 0 - 226 MB | NPU | ResNet-2Plus1D | ONNX | w8a8 | Qualcomm® QCS6490 | 323.43 ms | 98 - 127 MB | CPU | ResNet-2Plus1D | ONNX | w8a8 | Qualcomm® QCS8550 (Proxy) | 4.263 ms | 0 - 34 MB | NPU | ResNet-2Plus1D | ONNX | w8a8 | Qualcomm® QCS9075 | 4.101 ms | 1 - 3 MB | NPU | ResNet-2Plus1D | ONNX | w8a8 | Qualcomm® QCM6690 | 300.872 ms | 100 - 107 MB | CPU | ResNet-2Plus1D | ONNX | w8a8 | Snapdragon® 8 Elite For Galaxy Mobile | 2.582 ms | 0 - 189 MB | NPU | ResNet-2Plus1D | ONNX | w8a8 | Snapdragon® 7 Gen 4 Mobile | 274.471 ms | 67 - 75 MB | CPU | ResNet-2Plus1D | ONNX | w8a8 | Snapdragon® 8 Elite Gen 5 Mobile | 1.931 ms | 0 - 191 MB | NPU | ResNet-2Plus1D | ONNX | w8a8 | Snapdragon® X2 Elite | 2.039 ms | 31 - 31 MB | NPU | ResNet-2Plus1D | QNN_DLC | float | Snapdragon® X Elite | 13.027 ms | 2 - 2 MB | NPU | ResNet-2Plus1D | QNN_DLC | float | Snapdragon® 8 Gen 3 Mobile | 9.209 ms | 0 - 301 MB | NPU | ResNet-2Plus1D | QNN_DLC | float | Qualcomm® QCS8275 (Proxy) | 81.804 ms | 1 - 216 MB | NPU | ResNet-2Plus1D | QNN_DLC | float | Qualcomm® QCS8550 (Proxy) | 12.66 ms | 2 - 7 MB | NPU | ResNet-2Plus1D | QNN_DLC | float | Qualcomm® SA8775P | 21.301 ms | 0 - 215 MB | NPU | ResNet-2Plus1D | QNN_DLC | float | Qualcomm® QCS9075 | 22.983 ms | 4 - 8 MB | NPU | ResNet-2Plus1D | QNN_DLC | float | Qualcomm® QCS8450 (Proxy) | 29.086 ms | 0 - 280 MB | NPU | ResNet-2Plus1D | QNN_DLC | float | Qualcomm® SA7255P | 81.804 ms | 1 - 216 MB | NPU | ResNet-2Plus1D | QNN_DLC | float | Qualcomm® SA8295P | 22.723 ms | 0 - 198 MB | NPU | ResNet-2Plus1D | QNN_DLC | float | Snapdragon® 8 Elite For Galaxy Mobile | 7.2 ms | 0 - 217 MB | NPU | ResNet-2Plus1D | QNN_DLC | float | Snapdragon® 8 Elite Gen 5 Mobile | 5.713 ms | 2 - 230 MB | NPU | ResNet-2Plus1D | QNN_DLC | float | Snapdragon® X2 Elite | 6.602 ms | 2 - 2 MB | NPU | ResNet-2Plus1D | QNN_DLC | w8a8 | Snapdragon® X Elite | 4.901 ms | 1 - 1 MB | NPU | ResNet-2Plus1D | QNN_DLC | w8a8 | Snapdragon® 8 Gen 3 Mobile | 3.363 ms | 0 - 221 MB | NPU | ResNet-2Plus1D | QNN_DLC | w8a8 | Qualcomm® QCS6490 | 19.701 ms | 0 - 3 MB | NPU | ResNet-2Plus1D | QNN_DLC | w8a8 | Qualcomm® QCS8275 (Proxy) | 13.281 ms | 1 - 182 MB | NPU | ResNet-2Plus1D | QNN_DLC | w8a8 | Qualcomm® QCS8550 (Proxy) | 4.574 ms | 1 - 150 MB | NPU | ResNet-2Plus1D | QNN_DLC | w8a8 | Qualcomm® SA8775P | 4.659 ms | 1 - 184 MB | NPU | ResNet-2Plus1D | QNN_DLC | w8a8 | Qualcomm® QCS9075 | 4.799 ms | 1 - 3 MB | NPU | ResNet-2Plus1D | QNN_DLC | w8a8 | Qualcomm® QCM6690 | 71.411 ms | 1 - 196 MB | NPU | ResNet-2Plus1D | QNN_DLC | w8a8 | Qualcomm® QCS8450 (Proxy) | 7.516 ms | 1 - 218 MB | NPU | ResNet-2Plus1D | QNN_DLC | w8a8 | Qualcomm® SA7255P | 13.281 ms | 1 - 182 MB | NPU | ResNet-2Plus1D | QNN_DLC | w8a8 | Qualcomm® SA8295P | 7.78 ms | 1 - 181 MB | NPU | ResNet-2Plus1D | QNN_DLC | w8a8 | Snapdragon® 8 Elite For Galaxy Mobile | 2.545 ms | 0 - 178 MB | NPU | ResNet-2Plus1D | QNN_DLC | w8a8 | Snapdragon® 7 Gen 4 Mobile | 7.86 ms | 1 - 188 MB | NPU | ResNet-2Plus1D | QNN_DLC | w8a8 | Snapdragon® 8 Elite Gen 5 Mobile | 1.881 ms | 1 - 183 MB | NPU | ResNet-2Plus1D | QNN_DLC | w8a8 | Snapdragon® X2 Elite | 2.308 ms | 1 - 1 MB | NPU | ResNet-2Plus1D | TFLITE | float | Snapdragon® 8 Gen 3 Mobile | 289.093 ms | 0 - 322 MB | NPU | ResNet-2Plus1D | TFLITE | float | Qualcomm® QCS8275 (Proxy) | 720.668 ms | 0 - 234 MB | NPU | ResNet-2Plus1D | TFLITE | float | Qualcomm® QCS8550 (Proxy) | 408.203 ms | 0 - 2 MB | NPU | ResNet-2Plus1D | TFLITE | float | Qualcomm® SA8775P | 386.866 ms | 0 - 233 MB | NPU | ResNet-2Plus1D | TFLITE | float | Qualcomm® QCS9075 | 386.646 ms | 0 - 66 MB | NPU | ResNet-2Plus1D | TFLITE | float | Qualcomm® QCS8450 (Proxy) | 440.319 ms | 0 - 313 MB | NPU | ResNet-2Plus1D | TFLITE | float | Qualcomm® SA7255P | 720.668 ms | 0 - 234 MB | NPU | ResNet-2Plus1D | TFLITE | float | Qualcomm® SA8295P | 468.085 ms | 0 - 229 MB | NPU | ResNet-2Plus1D | TFLITE | float | Snapdragon® 8 Elite For Galaxy Mobile | 254.75 ms | 0 - 240 MB | NPU | ResNet-2Plus1D | TFLITE | float | Snapdragon® 8 Elite Gen 5 Mobile | 262.953 ms | 0 - 244 MB | NPU | ResNet-2Plus1D | TFLITE | w8a8 | Snapdragon® 8 Gen 3 Mobile | 582.992 ms | 0 - 539 MB | NPU | ResNet-2Plus1D | TFLITE | w8a8 | Qualcomm® QCS8275 (Proxy) | 1516.514 ms | 0 - 443 MB | NPU | ResNet-2Plus1D | TFLITE | w8a8 | Qualcomm® QCS8550 (Proxy) | 800.022 ms | 0 - 3 MB | NPU | ResNet-2Plus1D | TFLITE | w8a8 | Qualcomm® SA8775P | 792.063 ms | 0 - 441 MB | NPU | ResNet-2Plus1D | TFLITE | w8a8 | Qualcomm® QCM6690 | 1605.374 ms | 309 - 477 MB | NPU | ResNet-2Plus1D | TFLITE | w8a8 | Qualcomm® QCS8450 (Proxy) | 859.652 ms | 1 - 431 MB | NPU | ResNet-2Plus1D | TFLITE | w8a8 | Qualcomm® SA7255P | 1516.514 ms | 0 - 443 MB | NPU | ResNet-2Plus1D | TFLITE | w8a8 | Qualcomm® SA8295P | 871.277 ms | 0 - 433 MB | NPU | ResNet-2Plus1D | TFLITE | w8a8 | Snapdragon® 8 Elite For Galaxy Mobile | 499.187 ms | 0 - 522 MB | NPU | ResNet-2Plus1D | TFLITE | w8a8 | Snapdragon® 7 Gen 4 Mobile | 1253.39 ms | 332 - 424 MB | NPU | ResNet-2Plus1D | TFLITE | w8a8 | Snapdragon® 8 Elite Gen 5 Mobile | 607.046 ms | 0 - 472 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).