Skip to content

Commit

Permalink
predict: use smaller image for face detect
Browse files Browse the repository at this point in the history
  • Loading branch information
koush committed Jun 5, 2024
1 parent dc9b5f4 commit 2a2f96a
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions plugins/coreml/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/coreml/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,5 @@
"devDependencies": {
"@scrypted/sdk": "file:../../sdk"
},
"version": "0.1.57"
"version": "0.1.58"
}
2 changes: 1 addition & 1 deletion plugins/coreml/src/coreml/face_recognition.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ async def predictFaceModel(self, input: np.ndarray):
def predict():
model, inputName = self.faceModel
out_dict = model.predict({inputName: input})
results = out_dict["var_2167"][0]
results = list(out_dict.values())[0][0]
return results
results = await asyncio.get_event_loop().run_in_executor(
self.recogExecutor, lambda: predict()
Expand Down
4 changes: 2 additions & 2 deletions plugins/onnx/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/onnx/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,5 @@
"devDependencies": {
"@scrypted/sdk": "file:../../sdk"
},
"version": "0.1.95"
"version": "0.1.96"
}
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 @@ -42,5 +42,5 @@
"devDependencies": {
"@scrypted/sdk": "file:../../sdk"
},
"version": "0.1.96"
"version": "0.1.97"
}
6 changes: 3 additions & 3 deletions plugins/tensorflow-lite/src/predict/face_recognize.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,16 @@ class FaceRecognizeDetection(PredictPlugin):
def __init__(self, nativeId: str | None = None):
super().__init__(nativeId=nativeId)

self.inputheight = 640
self.inputwidth = 640
self.inputheight = 320
self.inputwidth = 320

self.labels = {
0: "face",
}
self.loop = asyncio.get_event_loop()
self.minThreshold = 0.2

self.detectModel = self.downloadModel("scrypted_yolov10n_face")
self.detectModel = self.downloadModel("scrypted_yolov10n_face_320")
self.faceModel = self.downloadModel("inception_resnet_v1")

def downloadModel(self, model: str):
Expand Down
4 changes: 2 additions & 2 deletions server/package-lock.json

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

0 comments on commit 2a2f96a

Please sign in to comment.