Skip to content

Commit

Permalink
tensorflow-lite: switch usb edgetpu model
Browse files Browse the repository at this point in the history
  • Loading branch information
koush committed Mar 5, 2024
1 parent 9d92154 commit 6ebab81
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 6 deletions.
8 changes: 6 additions & 2 deletions plugins/tensorflow-lite/.vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,13 @@
// "scrypted.debugHost": "192.168.2.119",
// "scrypted.serverRoot": "/home/pi/.scrypted",

// lxc installation
"scrypted.debugHost": "scrypted-server",
"scrypted.serverRoot": "/root/.scrypted",

// local checkout
"scrypted.debugHost": "127.0.0.1",
"scrypted.serverRoot": "/Users/koush/.scrypted",
// "scrypted.debugHost": "127.0.0.1",
// "scrypted.serverRoot": "/Users/koush/.scrypted",
// "scrypted.debugHost": "koushik-windows",
// "scrypted.serverRoot": "C:\\Users\\koush\\.scrypted",

Expand Down
4 changes: 2 additions & 2 deletions plugins/tensorflow-lite/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/tensorflow-lite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,5 @@
"devDependencies": {
"@scrypted/sdk": "file:../../sdk"
},
"version": "0.1.47"
"version": "0.1.48"
}
8 changes: 7 additions & 1 deletion plugins/tensorflow-lite/src/tflite/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,13 @@ def configureModel():
nonlocal model

if defaultModel:
model = "efficientdet_lite0_320_ptq"
if edge_tpus and next((obj for obj in edge_tpus if obj['type'] == 'usb'), None):
model = "yolov8n_full_integer_quant_320"
# this model seems completely wacky with lots of false positives.
# might be broken?
# model = "ssdlite_mobiledet_coco_qat_postprocess"
else:
model = "efficientdet_lite0_320_ptq"
self.yolo = "yolo" in model
self.yolov8 = "yolov8" in model

Expand Down

0 comments on commit 6ebab81

Please sign in to comment.