mirror of
https://github.com/MarcA711/frigate-rockchip.git
synced 2025-10-06 17:26:51 +08:00
Convert detectors to factory pattern, ability to set different model for each detector (#4635)
* refactor detectors * move create_detector and DetectorTypeEnum * fixed code formatting * add detector model config models * fix detector unit tests * adjust SharedMemory size to largest detector model shape * fix detector model config defaults * enable auto-discovery of detectors * simplify config * simplify config changes further * update detectors docs; detect detector configs dynamic * add suggested changes * remove custom detector doc * fix grammar, adjust device defaults
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
import logging
|
||||
|
||||
from abc import ABC, abstractmethod
|
||||
from typing import Dict
|
||||
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class DetectionApi(ABC):
|
||||
type_key: str
|
||||
|
||||
@abstractmethod
|
||||
def __init__(self, det_device=None, model_config=None):
|
||||
def __init__(self, detector_config):
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
|
Reference in New Issue
Block a user