Skip to content

Commit

Permalink
rknn: show model name + clean up detection classes (#1545)
Browse files Browse the repository at this point in the history
  • Loading branch information
bjia56 committed Aug 6, 2024
1 parent 608f82c commit 22cb23a
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 38 deletions.
68 changes: 33 additions & 35 deletions plugins/rknn/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion plugins/rknn/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,5 @@
"devDependencies": {
"@scrypted/sdk": "file:../../sdk"
},
"version": "0.1.2"
"version": "0.1.3"
}
1 change: 1 addition & 0 deletions plugins/rknn/src/rknn/optimized/yolo.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"spoon","bowl","banana","apple","sandwich","orange","broccoli","carrot","hot dog","pizza ","donut","cake","chair","sofa",
"pottedplant","bed","diningtable","toilet ","tvmonitor","laptop ","mouse ","remote ","keyboard ","cell phone","microwave ",
"oven ","toaster","sink","refrigerator ","book","clock","vase","scissors ","teddy bear ","hair drier", "toothbrush ")
CLASSES = [c.strip() for c in CLASSES]

coco_id_list = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 27, 28, 31, 32, 33, 34,
35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
Expand Down
4 changes: 2 additions & 2 deletions plugins/rknn/src/rknn/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class RKNNPlugin(PredictPlugin, DeviceProvider):
def __init__(self, nativeId=None):
super().__init__(nativeId)
self.cpu = ensure_compatibility_and_get_cpu()
model = 'yolov6n'
self.modelName = 'yolov6n'

self.rknn_runtimes = {}

Expand All @@ -80,7 +80,7 @@ def __init__(self, nativeId=None):
else:
raise RuntimeError('librknnrt.so not found. Please download it from {} and place it at {}'.format(lib_download, lib_path))

model_download = model_download_tmpl.format(model, self.cpu)
model_download = model_download_tmpl.format(self.modelName, self.cpu)
model_file = os.path.basename(model_download)
model_path = self.downloadFile(model_download, model_file)
print('Using model {}'.format(model_path))
Expand Down

0 comments on commit 22cb23a

Please sign in to comment.