Skip to content
This repository has been archived by the owner on Mar 19, 2023. It is now read-only.

Commit

Permalink
Merge pull request #53 from robmarkcole/fix-config
Browse files Browse the repository at this point in the history
Fixes timeout config
  • Loading branch information
robmarkcole authored Sep 15, 2019
2 parents 99a09d4 + 074b81e commit cfdc3cf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions custom_components/deepstack_object/image_processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
ip_address = config.get(CONF_IP_ADDRESS)
port = config.get(CONF_PORT)
api_key = config.get(CONF_API_KEY)
timeout = DEFAULT_TIMEOUT
timeout = config.get(CONF_TIMEOUT)
target = config.get(CONF_TARGET)
save_file_folder = config.get(CONF_SAVE_FILE_FOLDER)
confidence = config.get(ATTR_CONFIDENCE)
Expand Down Expand Up @@ -147,15 +147,15 @@ def process_image(self, image):
self._targets_confidences = []
self._predictions = {}
try:
self._dsobject.process_image_bytes(image)
self._dsobject.detect(image)
except ds.DeepstackException as exc:
_LOGGER.error("Depstack error : %s", exc)
return

predictions = self._dsobject.predictions.copy()

if len(predictions) > 0:
raw_confidences = ds.get_label_confidences(predictions, self._target)
raw_confidences = ds.get_object_confidences(predictions, self._target)
self._targets_confidences = [
ds.format_confidence(confidence) for confidence in raw_confidences
]
Expand Down
2 changes: 1 addition & 1 deletion custom_components/deepstack_object/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"domain": "deepstack_object",
"name": "deepstack_object custom component",
"documentation": "https://github.com/robmarkcole/HASS-Deepstack",
"requirements": ["pillow", "deepstack-python==0.2"],
"requirements": ["pillow", "deepstack-python==0.4"],
"dependencies": [],
"codeowners": ["@robmarkcole"]
}

0 comments on commit cfdc3cf

Please sign in to comment.