blakeblackshear.frigate/frigate/motion/__init__.py
Blake Blackshear d81dd60fef
Improve motion detection and region selection (#6741)
* 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
2023-06-11 08:45:11 -05:00

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