Skip to content

Commit

Permalink
tensorflow-lite: fix prediction crash
Browse files Browse the repository at this point in the history
  • Loading branch information
koush committed Apr 8, 2024
1 parent f15526f commit 10a7877
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
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.51"
"version": "0.1.52"
}
2 changes: 1 addition & 1 deletion plugins/tensorflow-lite/src/predict/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def create_detection_result(self, objs: List[Prediction], size, convert_to_src_s
obj.bbox.xmin, obj.bbox.ymin, obj.bbox.xmax - obj.bbox.xmin, obj.bbox.ymax - obj.bbox.ymin)
detection['className'] = className
detection['score'] = obj.score
if obj.embedding is not None:
if hasattr(obj, 'embedding') and obj.embedding is not None:
detection['embedding'] = obj.embedding
detections.append(detection)

Expand Down

0 comments on commit 10a7877

Please sign in to comment.