robmarkcole / HASS-Deepstack-object

Home Assistant custom component for using Deepstack object detection
https://community.home-assistant.io/t/face-and-person-detection-with-deepstack-local-and-free/92041
MIT License
438 stars 98 forks source link

Timestamped filename ends with _None #243

Closed sylarevan closed 3 years ago

sylarevan commented 3 years ago

Hi there,

I would like, for debug burpose, to have access to each image that as been processed by deepstack.

Fortunately, the option save_timestamped_file: True is there for that purpose, but it does not seem to work, as the only file I get is something like :

Then, all images are saved with this _None name, and I do not have access to past processed pictures.

Any idea on the reason it is happening?

My deepstack custom component configuration:

image_processing:
  - platform: deepstack_object
    ip_address: 192.168.1.6
    port: 5000
    save_file_folder: /media/deepstack/
    save_file_format: png
    save_timestamped_file: True
    always_save_latest_file: True
    scale: 1.0
    show_boxes: True
    roi_x_min: 0
    roi_x_max: 1.0
    roi_y_min: 0.28
    roi_y_max: 1.0
    targets:
      - target: person
        confidence: 30
    source:
      - entity_id: camera.synok_jardin

I'm running v4.3.0 of deepstack object custom integration, and HA v.2021.5.4.

Thanks!

robmarkcole commented 3 years ago

This is bug when self._last_detection is None. Instead you should use always_save_latest_file

sylarevan commented 3 years ago

OK @robmarkcole, so this means:

For debug purpose (calibrating the confidence threshold, assessing the detection efficiency, etc.), I would really like to save all processed image, no matter if there is a detection or not. So this is not possible for now?

robmarkcole commented 3 years ago

Yes use always_save_latest_file cheers