Robotics
PyTorch
bu_iot
android
HFNet / README.md
qaihm-bot's picture
v0.64.0
80241e3 verified
|
Raw History Blame Contribute Delete
7.47 kB
---
library_name: pytorch
license: bsd-3-clause
tags:
- bu_iot
- android
pipeline_tag: robotics
---
![](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/hfnet/web-assets/model_demo.png)
# HFNet: Optimized for Qualcomm Devices
HFNet provides local keypoints and descriptors together with a global descriptor for image matching and localization pipelines.
This is based on the implementation of HFNet found [here](https://github.com/ethz-asl/hfnet).
This repository contains pre-exported model files optimized for Qualcomm® devices. You can use the [Qualcomm® AI Hub Models](https://github.com/qualcomm/ai-hub-models/blob/v0.64.0/src/qai_hub_models/models/hfnet) 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.50, ONNX Runtime 1.30.0 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/hfnet/releases/v0.64.0/hfnet-onnx-float.zip)
| QNN_DLC | float | Universal | QAIRT 2.50 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/hfnet/releases/v0.64.0/hfnet-qnn_dlc-float.zip)
| TFLITE | float | Universal | QAIRT 2.50 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/hfnet/releases/v0.64.0/hfnet-tflite-float.zip)
For more device-specific assets and performance metrics, visit **[HFNet on Qualcomm® AI Hub](https://aihub.qualcomm.com/models/hfnet)**.
### Option 2: Export with Custom Configurations
Use the [Qualcomm® AI Hub Models](https://github.com/qualcomm/ai-hub-models/blob/v0.64.0/src/qai_hub_models/models/hfnet) 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 [HFNet on GitHub](https://github.com/qualcomm/ai-hub-models/blob/v0.64.0/src/qai_hub_models/models/hfnet) for usage instructions.
## Model Details
**Model Type:** Model_use_case.robotics
**Model Stats:**
- Input format: NHWC float32, range 0..255
- Input resolution: 640x480 (grayscale)
- Model size (float): 126MB
- Number of parameters: 33.0M
- Outputs: Global descriptor, keypoints, keypoint scores, dense scores
- Source model: hfnet.onnx
## Performance Summary
| Model | Runtime | Precision | Chipset | Inference Time (ms) | Peak Memory Range (MB) | Primary Compute Unit
|---|---|---|---|---|---|---
| HFNet | ONNX | float | Snapdragon® 8 Elite Gen 5 For Galaxy Mobile | 67.148 ms | 8 - 218 MB | NPU
| HFNet | ONNX | float | Snapdragon® 8 Elite For Galaxy Mobile | 69.305 ms | 10 - 208 MB | NPU
| HFNet | ONNX | float | Snapdragon® X2 Elite | 67.013 ms | 16 - 16 MB | NPU
| HFNet | ONNX | float | Snapdragon® X Elite | 117.702 ms | 66 - 66 MB | NPU
| HFNet | ONNX | float | Snapdragon® 8 Gen 3 Mobile | 81.859 ms | 0 - 316 MB | NPU
| HFNet | ONNX | float | Snapdragon® 8 Gen 1 Mobile | 119.598 ms | 0 - 312 MB | NPU
| HFNet | ONNX | float | Qualcomm® Dragonwing™ IQ-8275 | 104.8 ms | 8 - 13 MB | NPU
| HFNet | ONNX | float | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 117.978 ms | 0 - 81 MB | NPU
| HFNet | ONNX | float | Qualcomm® QCS8450 | 119.598 ms | 0 - 312 MB | NPU
| HFNet | ONNX | float | Qualcomm® Dragonwing™ IQ-9075 | 119.424 ms | 9 - 14 MB | NPU
| HFNet | ONNX | float | Qualcomm® Dragonwing™ IQ-X7181 | 117.702 ms | 66 - 66 MB | NPU
| HFNet | ONNX | float | Qualcomm® Dragonwing™ Q-8750 | 69.305 ms | 10 - 208 MB | NPU
| HFNet | QNN_DLC | float | Snapdragon® 8 Elite Gen 5 For Galaxy Mobile | 65.291 ms | 1 - 217 MB | NPU
| HFNet | QNN_DLC | float | Snapdragon® 8 Elite For Galaxy Mobile | 69.375 ms | 2 - 206 MB | NPU
| HFNet | QNN_DLC | float | Snapdragon® X2 Elite | 68.248 ms | 1 - 1 MB | NPU
| HFNet | QNN_DLC | float | Snapdragon® X Elite | 118.775 ms | 1 - 1 MB | NPU
| HFNet | QNN_DLC | float | Snapdragon® 8 Gen 3 Mobile | 81.774 ms | 0 - 313 MB | NPU
| HFNet | QNN_DLC | float | Snapdragon® 8 Gen 1 Mobile | 120.393 ms | 1 - 311 MB | NPU
| HFNet | QNN_DLC | float | Qualcomm® Dragonwing™ IQ-8275 | 104.206 ms | 1 - 9 MB | NPU
| HFNet | QNN_DLC | float | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 116.944 ms | 1 - 3 MB | NPU
| HFNet | QNN_DLC | float | Qualcomm® SA8775P | 119.88 ms | 2 - 198 MB | NPU
| HFNet | QNN_DLC | float | Qualcomm® SA8650P | 119.88 ms | 2 - 198 MB | NPU
| HFNet | QNN_DLC | float | Qualcomm® SA8255P | 119.88 ms | 2 - 198 MB | NPU
| HFNet | QNN_DLC | float | Qualcomm® QCS8450 | 120.393 ms | 1 - 311 MB | NPU
| HFNet | QNN_DLC | float | Qualcomm® Dragonwing™ IQ-9075 | 118.929 ms | 1 - 8 MB | NPU
| HFNet | QNN_DLC | float | Qualcomm® Dragonwing™ IQ-X7181 | 118.775 ms | 1 - 1 MB | NPU
| HFNet | QNN_DLC | float | Qualcomm® Dragonwing™ Q-8750 | 69.375 ms | 2 - 206 MB | NPU
| HFNet | QNN_DLC | float | Qualcomm® SA7255P | 184.735 ms | 1 - 196 MB | NPU
| HFNet | QNN_DLC | float | Qualcomm® SA8295P | 128.435 ms | 2 - 201 MB | NPU
| HFNet | TFLITE | float | Snapdragon® 8 Elite Gen 5 For Galaxy Mobile | 67.176 ms | 2 - 214 MB | NPU
| HFNet | TFLITE | float | Snapdragon® 8 Elite For Galaxy Mobile | 68.351 ms | 0 - 204 MB | NPU
| HFNet | TFLITE | float | Snapdragon® 8 Gen 3 Mobile | 82.476 ms | 4 - 327 MB | NPU
| HFNet | TFLITE | float | Snapdragon® 8 Gen 1 Mobile | 122.661 ms | 4 - 323 MB | NPU
| HFNet | TFLITE | float | Qualcomm® Dragonwing™ IQ-8275 | 104.369 ms | 4 - 78 MB | NPU
| HFNet | TFLITE | float | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 119.124 ms | 0 - 88 MB | NPU
| HFNet | TFLITE | float | Qualcomm® SA8775P | 120.633 ms | 4 - 207 MB | NPU
| HFNet | TFLITE | float | Qualcomm® SA8650P | 120.633 ms | 4 - 207 MB | NPU
| HFNet | TFLITE | float | Qualcomm® SA8255P | 120.633 ms | 4 - 207 MB | NPU
| HFNet | TFLITE | float | Qualcomm® QCS8450 | 122.661 ms | 4 - 323 MB | NPU
| HFNet | TFLITE | float | Qualcomm® Dragonwing™ IQ-9075 | 121.005 ms | 4 - 77 MB | NPU
| HFNet | TFLITE | float | Qualcomm® Dragonwing™ Q-8750 | 68.351 ms | 0 - 204 MB | NPU
| HFNet | TFLITE | float | Qualcomm® SA7255P | 184.775 ms | 4 - 207 MB | NPU
| HFNet | TFLITE | float | Qualcomm® SA8295P | 130.442 ms | 4 - 207 MB | NPU
## License
* The license for the original implementation of HFNet can be found
[here](https://github.com/ethz-asl/hfnet/blob/master/LICENSE).
## References
* [HF-Net: Combining Hierarchical Local and Global Features for Visual Localization](https://arxiv.org/abs/1812.03506)
* [Source Model Implementation](https://github.com/ethz-asl/hfnet)
## 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).