From 1da28eaa4599e49ddbee062c4fce0f724c8284ac Mon Sep 17 00:00:00 2001 From: Dennis George Date: Sat, 10 Dec 2022 17:32:31 -0600 Subject: [PATCH] remove custom detector doc --- docs/docs/configuration/detectors.md | 35 ---------------------------- 1 file changed, 35 deletions(-) diff --git a/docs/docs/configuration/detectors.md b/docs/docs/configuration/detectors.md index 45ffffa8e..cd26ecd26 100644 --- a/docs/docs/configuration/detectors.md +++ b/docs/docs/configuration/detectors.md @@ -147,38 +147,3 @@ device_cgroup_rules: volumes: - /dev/bus/usb:/dev/bus/usb ``` - -## Custom Detectors - -Custom python detector modules can be added at `/opt/frigate/frigate/detectors/plugins` in the container. -See the below for an example implementation. - -```python -from frigate.detectors.detection_api import DetectionApi -from frigate.detectors.detector_config import BaseDetectorConfig -from typing import Literal -from pydantic import Extra, Field - -DETECTOR_KEY = "" - -# A pydantic model inheriting from `BaseDetectorConfig` -# Must implement the `type` attribute as below -# Can add any number of fields to be passed from -# configuration to the constructor of your detector. -class CustomDetectorConfig(BaseDetectorConfig): - type: Literal[DETECTOR_KEY] - custom_field: str = Field(default="value", title="Custom field description") - - -# The custom detector class must inherit from `DetectionApi` -# and must implement the `type_key`, `__init__`, -# and `detect_raw` methods as below -class CustomDetector(DetectionApi): - type_key = DETECTOR_KEY - - def __init__(self, detector_config: CustomDetectorConfig): - ... - - def detect_raw(self, tensor_input): - return -``` \ No newline at end of file