mirror of
https://github.com/koush/scrypted.git
synced 2026-05-05 05:40:27 +01:00
tensorflow: update to new api, add opencv dep
This commit is contained in:
4
plugins/tensorflow/package-lock.json
generated
4
plugins/tensorflow/package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@scrypted/tensorflow-lite",
|
||||
"version": "0.1.4",
|
||||
"version": "0.1.5",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@scrypted/tensorflow-lite",
|
||||
"version": "0.1.4",
|
||||
"version": "0.1.5",
|
||||
"devDependencies": {
|
||||
"@scrypted/sdk": "file:../../sdk"
|
||||
}
|
||||
|
||||
@@ -41,5 +41,5 @@
|
||||
"devDependencies": {
|
||||
"@scrypted/sdk": "file:../../sdk"
|
||||
},
|
||||
"version": "0.1.4"
|
||||
"version": "0.1.5"
|
||||
}
|
||||
|
||||
@@ -3,7 +3,10 @@ Pillow>=5.4.1
|
||||
tensorflow-macos; sys_platform == 'darwin'
|
||||
tensorflow; sys_platform != 'darwin'
|
||||
PyGObject>=3.30.4; sys_platform != 'win32'
|
||||
# not available on armhf
|
||||
av>=10.0.0; sys_platform != 'linux' or platform_machine == 'x86_64' or platform_machine == 'aarch64'
|
||||
# not available on armhf
|
||||
opencv-python; sys_platform != 'linux' or platform_machine == 'x86_64' or platform_machine == 'aarch64'
|
||||
|
||||
# sort_oh
|
||||
scipy
|
||||
|
||||
@@ -47,7 +47,7 @@ class TensorFlowPlugin(PredictPlugin, scrypted_sdk.BufferConverter, scrypted_sdk
|
||||
def get_input_size(self) -> Tuple[float, float]:
|
||||
return (self.inputwidth, self.inputheight)
|
||||
|
||||
def detect_once(self, input: Image.Image, settings: Any, src_size, cvss):
|
||||
async def detect_once(self, input: Image.Image, settings: Any, src_size, cvss):
|
||||
image_array = tf.keras.utils.img_to_array(input)
|
||||
|
||||
input_tensor = tf.convert_to_tensor(image_array, dtype = tf.uint8)
|
||||
|
||||
Reference in New Issue
Block a user