blakeblackshear / frigate

NVR with realtime local object detection for IP cameras
https://frigate.video
MIT License
18.66k stars 1.69k forks source link

Allow custom object thresholds based on time of the day #2569

Open gulo101 opened 2 years ago

gulo101 commented 2 years ago

I would like to be able to set min_score and threshold (and maybe based on time of the day. Ideally the effective time range would be dynamically calculated based on location-based sunrise/sunset time +- custom offset (or somehow fed from Home Assistant?), but as easier initial solution it may be hard coded times in the YAML file. This would allow to lower the object detection sensitivity at night to generate alerts despite lower confidence level because lower image quality.

Perhaps add something like this:

  filters:
    person:
      #Effective time range for this setting
      #Day time
      start_time: 08:00
      end_time: 17:30
      min_score: 0.5
      threshold: 0.7

    person:
     #Night time
      start_time: 17:30
      end_time: 08:00
      min_score: 0.4
      threshold: 0.55
mantaalex commented 2 years ago

would be great idea

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

gulo101 commented 2 years ago

Anything we can do to keep this one alive?

blakeblackshear commented 2 years ago

I don't think I will approach it this way, but I can pin this issue so it stays open as a reminder.

itkfilelor commented 2 years ago

What about profiles that can be called up with an MQTT message as well as manually within the dashboard?

EDIT: oops realized I already suggested this a few months ago and Blake said detecting IR would be easier.

ajerion commented 2 years ago

I'd like to put in a vote for setting the thresholds via MQTT. Then I could have Node-Red/Home Assistant control the timing.

toxicantidote commented 8 months ago

I would support this as a time or IR based approach. I would not limit this to MQTT based configuration though, as I suspect many users only have an MQTT server to keep Frigate happy, and don't actually use it for anything else. I am one such user.

NickM-27 commented 8 months ago

@toxicantidote frigate doesn't require MQTT anymore

esand commented 4 months ago

I'd like to mention that while MQTT would be nice, IR detection would definitely be my preferred vote for this. I currently have an issue with Frigate detecting insects at night due to IR light as motion. I could play with settings to adjust sensitivity, but then it would impact daytime recording. It would be very nice to at least be able to configure day/night settings and toggle them with the API easily, or even have Frigate detect IR transition and auto-toggle to night settings if configured.

alexsahka commented 2 months ago

Setting the thresholds via MQTT would be great! I'm having trouble with object recognition at night, even with IR.