mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-11-30 19:09:13 +01:00
d81dd60fef
* refactor existing motion detector * implement and use cnt bgsub * pass fps to motion detector * create a simplified motion detector * lightning detection * update default motion config * lint imports * use estimated boxes for regions * use improved motion detector * update test * use a different strategy for clustering motion and object boxes * increase alpha during calibration * simplify object consolidation * add some reasonable constraints to the estimated box * adjust cluster boundary to 10% * refactor * add disabled debug code * fix variable scope
23 lines
424 B
Python
23 lines
424 B
Python
from abc import ABC, abstractmethod
|
|
from typing import Tuple
|
|
|
|
from frigate.config import MotionConfig
|
|
|
|
|
|
class MotionDetector(ABC):
|
|
@abstractmethod
|
|
def __init__(
|
|
self,
|
|
frame_shape: Tuple[int, int, int],
|
|
config: MotionConfig,
|
|
fps: int,
|
|
improve_contrast,
|
|
threshold,
|
|
contour_area,
|
|
):
|
|
pass
|
|
|
|
@abstractmethod
|
|
def detect(self, frame):
|
|
pass
|