Skip to content

Commit

Permalink
tensorflow: update to new api, add opencv dep
Browse files Browse the repository at this point in the history
  • Loading branch information
koush committed Mar 20, 2023
1 parent 420f070 commit d956ee0
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions plugins/tensorflow/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/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.4"
"version": "0.1.5"
}
3 changes: 3 additions & 0 deletions plugins/tensorflow/src/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion plugins/tensorflow/src/tf/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def get_input_details(self) -> Tuple[int, int, int]:
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)
Expand Down

0 comments on commit d956ee0

Please sign in to comment.