Commit Graph

148 Commits

Author SHA1 Message Date
Blake Blackshear
e7c536ea31 allow mqtt password to be set by env var 2020-03-03 20:26:53 -06:00
Blake Blackshear
a5bef89123 improve detection processing and restart when stuck 2020-03-03 20:26:53 -06:00
Blake Blackshear
01bf89907d dont kill the camera process from the main process 2020-03-03 20:26:53 -06:00
Blake Blackshear
088bd18adb add a few more metrics to debug 2020-03-03 20:26:53 -06:00
Blake Blackshear
9340a74371 dont redirect stdout for plasma store 2020-03-03 20:26:53 -06:00
Blake Blackshear
5998de610b reset detection fps 2020-03-03 20:26:53 -06:00
Blake Blackshear
1d2a41129c Fix watchdog last_frame calculation 2020-03-03 20:26:53 -06:00
Blake Blackshear
6ef22cf578 fix watchdog 2020-03-03 20:26:53 -06:00
Blake Blackshear
81c5b96ed7 fix watchdog restart 2020-03-03 20:26:53 -06:00
Blake Blackshear
6f6d202c99 improve watchdog and coral fps tracking 2020-03-03 20:26:53 -06:00
Blake Blackshear
2fc389c3ad dont log http requests 2020-03-03 20:26:53 -06:00
Blake Blackshear
05951aa7da cleanup 2020-03-03 20:26:53 -06:00
Blake Blackshear
bb8e4621f5 add models and convert speed to ms 2020-03-03 20:26:53 -06:00
Blake Blackshear
04e9ab5ce4 add watchdog for camera processes 2020-03-03 20:26:53 -06:00
Blake Blackshear
68c3a069ba add a min_fps option 2020-03-03 20:26:53 -06:00
Blake Blackshear
80b9652f7a check plasma store and consolidate frame drawing 2020-03-03 20:26:53 -06:00
Blake Blackshear
569e07949f split into separate processes 2020-03-03 20:26:53 -06:00
Blake Blackshear
50bcad8b77 skip regions when the queue is too full and add more locks 2020-02-22 09:03:00 -06:00
Blake Blackshear
cfffb219ae switch back to stretch for hwaccel issues 2020-02-22 09:03:00 -06:00
Blake Blackshear
e261c20819 let the queues get as big as needed 2020-02-22 09:03:00 -06:00
Blake Blackshear
08174d8db2 fix color of best image 2020-02-22 09:03:00 -06:00
Blake Blackshear
b6130e77ff label threads and implements stats endpoint 2020-02-22 09:03:00 -06:00
Blake Blackshear
4180c710cd refactor resizing into generic priority queues 2020-02-22 09:03:00 -06:00
Blake Blackshear
6c87ce0879 cache the computed jpg bytes to reduce cpu usage 2020-01-02 07:39:57 -06:00
Blake Blackshear
b7b4e38f62 slow down the preview feed to lower cpu usage 2020-01-02 07:39:57 -06:00
Blake Blackshear
bee99ca6ff track and report all detected object types 2020-01-02 07:39:57 -06:00
Blake Blackshear
3a3afe14bf change the ffmpeg config for global defaults and overrides 2019-12-08 16:03:23 -06:00
Blake Blackshear
39d64f7ba7 add health check and handle bad camera names 2019-12-08 16:03:23 -06:00
Blake Blackshear
297e2f1c0c allow mqtt client_id to be set for multi frigate setups 2019-12-08 16:03:23 -06:00
blakeblackshear
a770ab7f69 specify a client id for frigate 2019-07-30 19:11:22 -05:00
Mike Wilkinson
2c2f0044b9
Remove error redundant check 2019-05-14 11:09:57 -04:00
Mike Wilkinson
874e9085a7
Add MQTT connection error handling 2019-05-14 08:34:14 -04:00
blakeblackshear
e0b9b616ce cleanup and update readme 2019-03-30 07:58:31 -05:00
blakeblackshear
4476bd8a13 log capture process pid 2019-03-29 21:18:20 -05:00
blakeblackshear
5aa3775c77 create a camera object for each camera in the config 2019-03-29 21:14:24 -05:00
blakeblackshear
edf0cd36df add back flask endpoints 2019-03-29 21:02:40 -05:00
blakeblackshear
0279121d77 WIP: convert to camera class 2019-03-29 20:49:27 -05:00
blakeblackshear
8774e537dc implementing a config file for a single camera 2019-03-28 07:30:58 -05:00
blakeblackshear
0514eeac03 switch to a thread for object detection 2019-03-27 20:44:57 -05:00
blakeblackshear
a074945394 missing param and updated readme 2019-03-27 06:55:32 -05:00
blakeblackshear
200d769003 removing motion detection 2019-03-27 06:17:00 -05:00
blakeblackshear
ada8ffccf9 fix for queue size growing too large 2019-03-25 20:35:44 -05:00
blakeblackshear
bca4e78e9a use a queue instead 2019-03-25 06:24:36 -05:00
blakeblackshear
7d3027e056 looping over all regions with motion. ugly, but working 2019-03-20 07:11:38 -05:00
blakeblackshear
8ff9a982b6 start the detection process 2019-03-18 07:48:04 -05:00
blakeblackshear
f2c205be99 prep frames for object detection in a separate process 2019-03-18 07:24:24 -05:00
blakeblackshear
8bae05cfe2 first working version, single region and motion detection disabled 2019-03-17 09:03:52 -05:00
blakeblackshear
c12e19349e only cleanup old objects when motion is detected so stationary objects are still detected 2019-03-15 20:15:41 -05:00
blakeblackshear
85259ca00c add support for mqtt user/pass. closes #7 2019-03-09 13:41:35 -06:00
blakeblackshear
5dc76803d6 cleanup 2019-02-28 06:49:27 -06:00
blakeblackshear
80f7e998ae resend availability if disconnected 2019-02-28 06:30:34 -06:00
blakeblackshear
df7b90e367 store the best recent person image and reconnect the RTSP stream if unable to grab several consecutive frames 2019-02-27 20:55:07 -06:00
blakeblackshear
2e3c9da650 manage 2 seconds worth of motion frames for processing 2019-02-26 20:29:52 -06:00
blakeblackshear
86f5d8128d initial refactoring 2019-02-25 20:27:02 -06:00
blakeblackshear
039782ad2e add min person area per region 2019-02-25 06:48:01 -06:00
blakeblackshear
bf6d6c3796 make debug a env var 2019-02-24 08:41:03 -06:00
blakeblackshear
b4e5c812ce switch to a queue for detected objects and expire objects after 1 second 2019-02-24 08:13:36 -06:00
blakeblackshear
122a1666ca just save images when a person is detected 2019-02-23 07:43:14 -06:00
blakeblackshear
5258803cd7 only save images of persons 2019-02-22 21:03:47 -06:00
blakeblackshear
bff1826bf5 only write the first motion frame 2019-02-20 17:44:51 -06:00
blakeblackshear
19323ac957 only clear the flag and notify if it was set 2019-02-20 17:43:27 -06:00
blakeblackshear
aeece7b98c handle RTSP stream errors 2019-02-20 07:12:07 -06:00
blakeblackshear
a73760989c clarify comment 2019-02-20 07:11:49 -06:00
blakeblackshear
496b96b4f7 make motion detection less sensitive to rain
reduces the significance of fast moving objects and prioritizes objects that overlap in location across. multiple frames
2019-02-20 06:20:52 -06:00
blakeblackshear
f54fa2e56c add the ability to apply a masking image 2019-02-19 21:15:57 -06:00
blakeblackshear
b6547de82c adjust debugging params and alpha for background averaging 2019-02-19 06:47:00 -06:00
blakeblackshear
290150603e remove debug time 2019-02-17 20:36:01 -06:00
blakeblackshear
03c57bf67d use a condition to signal to the mqtt publisher that objects were parsed 2019-02-17 13:12:27 -06:00
blakeblackshear
42ff739cea move mqtt motion publishing into separate thread 2019-02-17 12:59:51 -06:00
blakeblackshear
92e1833def use a condition to notify when object detection has run 2019-02-17 12:32:19 -06:00
blakeblackshear
957bd2adeb use events to signal when motion is detected 2019-02-17 12:12:48 -06:00
blakeblackshear
8525f05f29 get a lock when copying frame for mjpeg stream 2019-02-17 11:54:40 -06:00
blakeblackshear
b67f323215 use a lock and condition to signal to motion detection processes 2019-02-17 11:52:56 -06:00
blakeblackshear
a84f88c5a5 comments 2019-02-17 10:36:09 -06:00
blakeblackshear
2b0ebfa354 draw contours and area on image for motion debugging 2019-02-17 10:34:48 -06:00
blakeblackshear
d9d3937a0f reset motion counter when no contours exist 2019-02-17 08:00:35 -06:00
blakeblackshear
7d4cfe43ad WIP: debug images 2019-02-17 07:27:11 -06:00
blakeblackshear
f7c8b742e8 increase min confidence to .5 2019-02-17 07:26:09 -06:00
blakeblackshear
861539e8b5 require a minimum of 3 consecutive motion frames to try and reduce false positives from rain 2019-02-16 15:05:58 -06:00
blakeblackshear
225f434718 reduce motion timeout to 2 seconds 2019-02-16 15:04:31 -06:00
blakeblackshear
6bdacffa2e reduce the motion detection timeout to 5 seconds 2019-02-10 20:09:25 -06:00
blakeblackshear
a3c5dd91a1 use a topic prefix and implement last will messages 2019-02-10 14:43:21 -06:00
blakeblackshear
f3376a83d6 merged shared memory objects and regions and set color of bounding box based on motion 2019-02-10 14:25:17 -06:00
blakeblackshear
ab1fda3a0e add mqtt and update readme 2019-02-10 12:00:52 -06:00
blakeblackshear
ebd15489b0 add support for a minimum object size 2019-02-09 20:38:11 -06:00
blakeblackshear
80dbed8055 integrate object detection with motion detection 2019-02-09 10:17:07 -06:00
blakeblackshear
53c9a7368d rework object detection to watch the motion flag 2019-02-09 09:15:55 -06:00
blakeblackshear
5d894f006a basic motion detection working 2019-02-09 08:51:11 -06:00
blakeblackshear
d8f27658f8 create shared value for motion detection 2019-02-09 07:32:49 -06:00
blakeblackshear
0359e2d2a1 dynamic number of processes based on selected regions 2019-02-04 07:07:13 -06:00
blakeblackshear
623a3044fb multiple hard coded processes 2019-02-04 06:34:32 -06:00
blakeblackshear
072997736c parse the objects into a global array in a separate thread 2019-02-04 06:18:49 -06:00
blakeblackshear
b91c24bf8f crop the frame and calculate the coordinates in the subprocess and add labels to the image 2019-02-02 08:16:35 -06:00
blakeblackshear
11af9bb953 wip: focus on dynamic region and delay drawing until viewing 2019-02-01 21:38:13 -06:00
blakeblackshear
a976403edc got bounding boxes repositioned for full frame 2019-02-01 06:57:03 -06:00
blakeblackshear
98ce5a4a59 wip: just detect objects in a specific area 2019-02-01 06:35:48 -06:00
blakeblackshear
7e3d2f6611 reduce CPU usage 2019-02-01 06:35:10 -06:00
blakeblackshear
72393be6d6 initial commit 2019-01-26 08:02:59 -06:00