Skip to content

Latest commit

 

History

History
81 lines (62 loc) · 3.71 KB

File metadata and controls

81 lines (62 loc) · 3.71 KB

RTMDet is a highly efficient model for real-time object detection,capable of predicting both the bounding boxes and classes of objects within an image.It is highly optimized for real-time applications, making it reliable for industrial and commercial use

This is based on the implementation of RTMDet found here. This repository contains scripts for optimized on-device export suitable to run on Qualcomm® devices. More details on model performance across various devices, can be found here.

Qualcomm AI Hub Models uses Qualcomm AI Hub Workbench to compile, profile, and evaluate this model. Sign up to run these models on a hosted Qualcomm® device.

Quick Start

Use our lightweight command-line interface to inspect RTMDet:

pip install qai_hub_models_cli # (the CLI is also available with the qai-hub-models package)

# Inspect the model's metadata
qai-hub-models info RTMDet

# Print performance and accuracy metrics
qai-hub-models perf RTMDet
qai-hub-models numerics RTMDet

# Pre-exported assets are not available to download for this model due to
# licensing restrictions. Continue to the next section to export it yourself.

See the CLI README for the full list of commands and filters.

Setup

1. Install the package

Install the package via pip:

# NOTE: 3.10 <= PYTHON_VERSION < 3.14 is supported.
pip install "qai-hub-models[rtmdet]"

2. Configure Qualcomm® AI Hub Workbench

Sign-in to Qualcomm® AI Hub Workbench with your Qualcomm® ID. Once signed in navigate to Account -> Settings -> API Token.

With this API token, you can configure your client to run models on the cloud hosted devices.

qai-hub configure --api_token API_TOKEN

Navigate to docs for more information.

Run CLI Demo

Run the following simple CLI demo to verify the model is working end to end:

python -m qai_hub_models.models.rtmdet.demo { --quantize w8a16 }

More details on the CLI tool can be found with the --help option. See demo.py for sample usage of the model including pre/post processing scripts. Please refer to our general instructions on using models for more usage instructions.

By default, the demo will run locally in PyTorch. Pass --eval-mode on-device to the demo script to run the model on a cloud-hosted target device.

Export for on-device deployment

To run the model on Qualcomm® devices, you must export the model for use with an edge runtime such as TensorFlow Lite, ONNX Runtime, or Qualcomm AI Engine Direct. Use the following command to export the model:

qai-hub-models export rtmdet --target-runtime tflite --precision float

Additional options are documented with the --help option.

License

  • The license for the original implementation of RTMDet can be found here.

References

Community