Skip to content

Commit

Permalink
openvino: publish new models
Browse files Browse the repository at this point in the history
  • Loading branch information
koush committed Mar 30, 2024
1 parent 4518631 commit f4dcb8e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
4 changes: 2 additions & 2 deletions plugins/openvino/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/openvino/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,5 @@
"devDependencies": {
"@scrypted/sdk": "file:../../sdk"
},
"version": "0.1.54"
"version": "0.1.55"
}
16 changes: 11 additions & 5 deletions plugins/openvino/src/ov/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,19 @@ def __init__(self, nativeId: str | None = None):
self.yolo = 'yolo' in model
self.yolov8 = "yolov8" in model
self.yolov9 = "yolov9" in model
self.scrypted_model = "scrypted" in model
self.sigmoid = model == 'yolo-v4-tiny-tf'

print(f'model/mode/precision: {model}/{mode}/{precision}')

ovmodel = 'best' if self.scrypted_model else model

model_version = 'v4'
xmlFile = self.downloadFile(f'https://raw.githubusercontent.com/koush/openvino-models/main/{model}/{precision}/{model}.xml', f'{model_version}/{precision}/{model}.xml')
binFile = self.downloadFile(f'https://raw.githubusercontent.com/koush/openvino-models/main/{model}/{precision}/{model}.bin', f'{model_version}/{precision}/{model}.bin')
if self.yolo:
xmlFile = self.downloadFile(f'https://raw.githubusercontent.com/koush/openvino-models/main/{model}/{precision}/{ovmodel}.xml', f'{model_version}/{precision}/{ovmodel}.xml')
binFile = self.downloadFile(f'https://raw.githubusercontent.com/koush/openvino-models/main/{model}/{precision}/{ovmodel}.bin', f'{model_version}/{precision}/{ovmodel}.bin')
if self.scrypted_model:
labelsFile = self.downloadFile('https://raw.githubusercontent.com/koush/openvino-models/main/scrypted_labels.txt', 'scrypted_labels.txt')
elif self.yolo:
labelsFile = self.downloadFile('https://raw.githubusercontent.com/koush/openvino-models/main/coco_80cl.txt', 'coco_80cl.txt')
else:
labelsFile = self.downloadFile('https://raw.githubusercontent.com/koush/openvino-models/main/coco_labels.txt', 'coco_labels.txt')
Expand Down Expand Up @@ -132,13 +137,14 @@ async def getSettings(self) -> list[Setting]:
'description': 'The detection model used to find objects.',
'choices': [
'Default',
'scrypted_yolov8n_320',
'yolov8n_320',
'yolov9c_320',
'ssd_mobilenet_v1_coco',
'ssdlite_mobilenet_v2',
'yolo-v3-tiny-tf',
'yolo-v4-tiny-tf',
'yolov8n',
'yolov8n_320',
'yolov9c_320',
],
'value': model,
},
Expand Down

0 comments on commit f4dcb8e

Please sign in to comment.