-
Notifications
You must be signed in to change notification settings - Fork 162
Expand file tree
/
Copy pathdemo.py
More file actions
34 lines (28 loc) · 1.08 KB
/
demo.py
File metadata and controls
34 lines (28 loc) · 1.08 KB
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
27
28
29
30
31
32
33
34
# ---------------------------------------------------------------------
# Copyright (c) 2025 Qualcomm Technologies, Inc. and/or its subsidiaries.
# SPDX-License-Identifier: BSD-3-Clause
# ---------------------------------------------------------------------
from qai_hub_models.models._shared.gear_guard_net.demo import gear_guard_demo
from qai_hub_models.models.gear_guard_net.app import GearGuardNetApp
from qai_hub_models.models.gear_guard_net.model import (
MODEL_ASSET_VERSION,
MODEL_ID,
GearGuardNet,
)
from qai_hub_models.utils.asset_loaders import CachedWebModelAsset
INPUT_IMAGE_ADDRESS = CachedWebModelAsset.from_asset_store(
MODEL_ID, MODEL_ASSET_VERSION, "test_image.jpg"
)
def main(is_test: bool = False) -> None:
gear_guard_demo(
model_type=GearGuardNet,
model_id=MODEL_ID,
app_type=GearGuardNetApp,
default_image=INPUT_IMAGE_ADDRESS,
default_score_threshold=0.9,
default_iou_threshold=0.5,
output_filename="gear_guard_demo_output.png",
is_test=is_test,
)
if __name__ == "__main__":
main()