Commit Graph

157 Commits

Author SHA1 Message Date
Blake Blackshear
f4aa02cc19 allow specific objects to be listed for a zone (fixes #1123) 2021-07-07 07:33:14 -05:00
Blake Blackshear
da2492413f publish on zone change (fixes #1310) 2021-07-07 07:03:28 -05:00
Blake Blackshear
98d8118fb2 add options to define jpeg quality 2021-07-02 07:52:02 -05:00
Jason Hunter
3fb24b4bf5 fix timestamp 2021-06-25 06:13:08 -05:00
Jason Hunter
1e21a62851 remove unneeded changes 2021-06-24 06:53:05 -05:00
Jason Hunter
c664bd63f6 initial conversion to pydantic 2021-06-24 06:53:05 -05:00
Sebastian Englbrecht
b3ee2de079 Fix review finding 2021-06-22 06:33:04 -05:00
Sebastian Englbrecht
211fcd64c7 Add and use config for timestamp style 2021-06-22 06:33:04 -05:00
Sebastian Englbrecht
5075e4eee1 Use timestamp decorator helper in codebase 2021-06-22 06:33:04 -05:00
Blake Blackshear
fd9c8c1f0d add snapshot time to event data 2021-06-19 08:49:06 -05:00
Blake Blackshear
3a3b788c65 save clean snapshot 2021-06-19 08:49:06 -05:00
Blake Blackshear
3b695040d1 send clip_ready mqtt to event topic 2021-06-14 18:20:12 -05:00
Blake Blackshear
ed761d1767 cap the array size of the output queue 2021-06-12 07:23:14 -05:00
Blake Blackshear
d1a5e2e8e0 add config for birdseye 2021-06-12 07:23:14 -05:00
Blake Blackshear
8e2ba4a8ea move birdseye placeholder to output process 2021-06-12 07:23:14 -05:00
Blake Blackshear
7a6ffb1032 adding output process to handle downstream processing of frames 2021-06-12 07:23:14 -05:00
Blake Blackshear
7fc9026ca6 basic plumbing for birdseye view 2021-06-12 07:23:14 -05:00
Sean Vig
abbc608ee4 Updates to object processing
Lock updates to tracked objects, current frame time, motion boxes, and
regions on `update()`.

Directly create Counters using counted values.

Don't convert removed_ids, new_ids, or updated_ids sets to lists.

Update defaultdict's to remove un-necessary lambdas when possible.

When possible, drop un-necessay list comprehensions, such as when
calling `any`.

Use set comprehension, rather than passing a list comprehension into
`set()`.

Do the slightly more pythonic `x not in y` rather than `not x in y` to
check list inclusion.
2021-05-23 21:00:56 -05:00
Sean Vig
57864f2be6 Wait on stop event when possible
Generally eliminate the `while True` loops while waiting for a stop
event and prefer to condition the loops on if the stop event is set,
blocking on that where it makes sense.  This generally comes in 3
flavors.  First and simplest, when there is a sleep and the stop event
is the only thing the loop blocks on, instead do a check using
`stop_event.wait(timeout)` to instead block on the stop event for the
designated amount of time. Second, when there is a different event that
is blocking in the loop, condition the loop on `stop_event.is_set()`
rather than breaking when it is set. Finally, when there is a separate
internal condition that requires a counter, have the loop iterate over
the counter and use `if stop_event.wait(timeout)` internal to the loop.
2021-05-22 07:54:16 -05:00
Blake Blackshear
6d12a34c40 remove thumbnail attribute if null 2021-02-25 07:01:59 -06:00
Blake Blackshear
39ff49e054 formatting cleanup 2021-02-25 07:01:57 -06:00
Blake Blackshear
513a099c24 better error handling (fixes #739) 2021-02-20 08:20:17 -06:00
Blake Blackshear
d3524ee46f adjust jpg quality in other locations too 2021-02-20 08:20:17 -06:00
Blake Blackshear
121ea37825 allow defining required zones for snapshots/clips/mqtt 2021-02-20 08:20:17 -06:00
Blake Blackshear
d315dbea22 rate limit tracked object updates to every 5 seconds 2021-01-26 21:40:33 -06:00
Blake Blackshear
1785c69e1b handle exception when frame isnt in cache 2021-01-26 21:40:33 -06:00
Blake Blackshear
d1d833ea9a add change type to events topic
#476
2021-01-26 21:40:33 -06:00
Blake Blackshear
bca0531963 handle null thumbnail data 2021-01-26 21:40:33 -06:00
Blake Blackshear
b2c7fc8f5b add mask as object filter 2021-01-26 21:40:33 -06:00
Blake Blackshear
25e3fe8eab init variables on camera state 2021-01-26 21:40:33 -06:00
Blake Blackshear
89e3c2e4b1 store has_clip and has_snapshot on events 2021-01-26 21:40:33 -06:00
Blake Blackshear
9dc97d4b6b add jpg snapshots to disk and clean up config 2021-01-26 21:40:33 -06:00
Paul Armstrong
d8c9169af2 fix: ensure timestamp is drawn above mask 2021-01-26 21:40:33 -06:00
Blake Blackshear
44d45c5880 publish event updates on zone change 2021-01-26 21:40:33 -06:00
Blake Blackshear
af8594c5c6 re-crop to the object rather than the region 2021-01-26 21:40:33 -06:00
Blake Blackshear
899d41f361 allow runtime drawing settings for mjpeg and latest 2021-01-26 21:40:33 -06:00
Blake Blackshear
d304718ea0 no need to write jpg disk 2021-01-26 21:40:33 -06:00
Blake Blackshear
d4afcde6c9 reduce min timestamp size 2021-01-26 21:40:33 -06:00
Blake Blackshear
257de89ce4 publish object counts rather than on/off 2021-01-26 21:40:33 -06:00
Blake Blackshear
735cc3962b make directories constants 2021-01-26 21:40:33 -06:00
Blake Blackshear
bd77b74689 oops 2021-01-26 21:40:33 -06:00
Blake Blackshear
810c23d8ee only publish end events for true positives 2021-01-26 21:40:33 -06:00
Blake Blackshear
63c5c8412a publish events like a change feed 2021-01-26 21:40:33 -06:00
Blake Blackshear
60207723d1 pull from memory if event in progress 2021-01-26 21:40:33 -06:00
Blake Blackshear
1b5b02d286 add bas64 encoded thumbnail to the database 2021-01-26 21:40:33 -06:00
Blake Blackshear
946d655cee check for None value thumbnail_data 2021-01-26 21:40:33 -06:00
Blake Blackshear
d56710b0b5 only set thumbnail data if object is a true positive 2021-01-26 21:40:33 -06:00
Blake Blackshear
0cf78277b5 add some debug logging to frame cache 2021-01-26 21:40:33 -06:00
Blake Blackshear
ce2a583ff9 dont use a property 2021-01-26 21:40:33 -06:00
Blake Blackshear
84bddad30e attempt to fix missing thumbs 2021-01-26 21:40:33 -06:00
Blake Blackshear
0ff682504a better frame handling for best images 2021-01-26 21:40:33 -06:00
Blake Blackshear
5d5984166f cleanup false_positive attribute 2021-01-26 21:40:33 -06:00
Blake Blackshear
b825eb44fe ensure some valid thumbnail is available 2021-01-26 21:40:33 -06:00
Blake Blackshear
7015eb66f2 don't save thumbnails for false positives 2021-01-26 21:40:33 -06:00
Blake Blackshear
aff87d4372 create tracked object class and save thumbnails 2021-01-26 21:40:33 -06:00
Blake Blackshear
373ca87887 maintain thumbnail frames for tracked objects 2021-01-26 21:40:33 -06:00
Blake Blackshear
03c855ecbe sort imports 2021-01-26 21:40:33 -06:00
Blake Blackshear
3a3cb24631 naming threads and processes for logs 2021-01-26 21:40:33 -06:00
Blake Blackshear
4c3fea25a5 use a queue for logging 2021-01-26 21:40:33 -06:00
Blake Blackshear
af303cbf2a create typed config classes 2021-01-26 21:40:33 -06:00
Blake Blackshear
d67a56d37e update events model 2021-01-26 21:40:33 -06:00
Blake Blackshear
75977128f0 ensure dummy frame is in yuv shape 2020-10-25 14:30:36 -05:00
Blake Blackshear
c6ed16465b move the timestamp to bottom 2020-10-18 13:47:13 -05:00
Blake Blackshear
8f14b36f5a tweak size 2020-10-18 13:47:13 -05:00
Blake Blackshear
b6c2491e3b use the actual original shape 2020-10-18 13:47:13 -05:00
Blake Blackshear
8e31d04d90 scale font of timestamp dynamically 2020-10-18 13:47:13 -05:00
Blake Blackshear
bf93fbb357 add ability to draw bounding boxes/timestamps on snapshots 2020-10-18 13:47:13 -05:00
Blake Blackshear
4363623c45 reduce zone filter bouncing 2020-10-18 13:47:13 -05:00
Blake Blackshear
76befc1249 only draw during debug 2020-10-18 13:47:13 -05:00
Blake Blackshear
12c4cd77c5 only convert pix_fmt when necessary 2020-10-18 13:47:13 -05:00
Blake Blackshear
a611cbb942 use yuv420p pixel format for motion 2020-10-18 13:47:13 -05:00
Blake Blackshear
54cb4a2180 prevent frame from being deleted while in use 2020-10-18 13:47:13 -05:00
Blake Blackshear
ec4d048905 upgrade to python3.8 and switch from plasma store to shared_memory 2020-10-18 13:47:13 -05:00
Blake Blackshear
b063099b2a fix zone filters fixes #218 2020-10-11 11:38:32 -05:00
Blake Blackshear
b35cc01035 allow the best image timeout to be configurable 2020-09-18 07:14:44 -05:00
Blake Blackshear
fdc8bbf72d move zone config under each camera 2020-09-17 07:37:27 -05:00
Blake Blackshear
adcc3e9b98 copy obj so crop doesnt change 2020-09-17 07:37:27 -05:00
Blake Blackshear
974f7bd0df fix mqtt snapshot 2020-09-17 07:37:27 -05:00
Blake Blackshear
50e568b84c allow setting size and cropping of snapshots and best.jpg endpoint 2020-09-17 07:37:27 -05:00
Blake Blackshear
bfcaabecfa fix var name 2020-09-17 07:37:27 -05:00
Blake Blackshear
606fa6f6d5 once a true positive always a true positive 2020-09-17 07:37:27 -05:00
Blake Blackshear
6a8d8bf53d dont trigger zones for false positives 2020-09-17 07:37:27 -05:00
Blake Blackshear
acb75fa02d refactor and reduce false positives 2020-09-17 07:37:27 -05:00
Blake Blackshear
ea4ecae27c Refactor with a working false positive test 2020-09-17 07:37:27 -05:00
Ryan Press
df2aae5169 Fix zone filters 2020-08-19 09:58:53 -05:00
Blake Blackshear
469259d663 dont refresh cache if exiting 2020-08-08 07:40:48 -05:00
Blake Blackshear
f3db69d975 update docs 2020-08-08 07:40:48 -05:00
Blake Blackshear
0ae2806eb4 fix overwriting variable 2020-08-08 07:40:48 -05:00
Blake Blackshear
adcfe699c2 ensure frigate can exit gracefully 2020-08-08 07:40:48 -05:00
Blake Blackshear
69f5249788 initial implementation of zones 2020-08-08 07:40:48 -05:00
Blake Blackshear
709d917f0c update snapshot with better scores 2020-08-01 18:20:44 -05:00
Blake Blackshear
3d2f1437e4 filter objects before triggering events 2020-08-01 18:20:44 -05:00
Blake Blackshear
7383db60b0 save clips for tracked objects 2020-08-01 18:20:44 -05:00
Blake Blackshear
15b4024715 expose frame time at each step of processing 2020-06-02 05:25:02 -05:00
Blake Blackshear
918112a793 ensure the previous frame is deleted when the new one is stored 2020-06-02 05:25:02 -05:00
Blake Blackshear
4ee200a81c move ffmpeg capture to a separate thread and use a queue 2020-06-02 05:25:02 -05:00
Blake Blackshear
e37eba49ff make object processor resilient to plasma failures 2020-06-02 05:25:02 -05:00
Blake Blackshear
6de8e3bd1f remove sharedarray references 2020-06-02 05:25:02 -05:00
Blake Blackshear
3a9781c4f8 handle various scenarios with external process failures 2020-06-02 05:25:02 -05:00
Blake Blackshear
a5bef89123 improve detection processing and restart when stuck 2020-03-03 20:26:53 -06:00