-
Notifications
You must be signed in to change notification settings - Fork 162
Expand file tree
/
Copy pathdemo.py
More file actions
26 lines (20 loc) · 863 Bytes
/
demo.py
File metadata and controls
26 lines (20 loc) · 863 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# ---------------------------------------------------------------------
# Copyright (c) 2025 Qualcomm Technologies, Inc. and/or its subsidiaries.
# SPDX-License-Identifier: BSD-3-Clause
# ---------------------------------------------------------------------
from qai_hub_models.models._shared.detr.demo import detr_demo
from qai_hub_models.models.detr_resnet50.model import (
MODEL_ASSET_VERSION,
MODEL_ID,
DETRResNet50,
)
from qai_hub_models.utils.asset_loaders import CachedWebModelAsset
IMAGE_ADDRESS = CachedWebModelAsset.from_asset_store(
MODEL_ID, MODEL_ASSET_VERSION, "detr_demo_image.jpg"
)
# Run DETR app end-to-end on a sample image.
# The demo will display the predicted mask in a window.
def main(is_test: bool = False) -> None:
detr_demo(DETRResNet50, MODEL_ID, IMAGE_ADDRESS, is_test)
if __name__ == "__main__":
main()