mirror of
https://github.com/blakeblackshear/frigate.git
synced 2025-12-07 22:05:44 +03:00
[Update] Update detector from synap1680 to synaptics
This update is in order to make the synaptics SL-series NPU detector more general. - Fix detector `os` module not import bug - Update detector type `synap1680` to `synaptics` - Update document description `SL1680` to `Synaptics` only - Update docker build content `synap1680` to `synaptics`
This commit is contained in:
parent
72f2052cda
commit
504b80444b
@ -1,15 +0,0 @@
|
|||||||
BOARDS += synap1680
|
|
||||||
|
|
||||||
local-synap1680: version
|
|
||||||
docker buildx bake --file=docker/synap1680/synap1680.hcl synap1680 \
|
|
||||||
--set synap1680.tags=frigate:latest-synap1680 \
|
|
||||||
--load
|
|
||||||
|
|
||||||
build-synap1680: version
|
|
||||||
docker buildx bake --file=docker/synap1680/synap1680.hcl synap1680 \
|
|
||||||
--set synap1680.tags=$(IMAGE_REPO):${GITHUB_REF_NAME}-$(COMMIT_HASH)-synap1680
|
|
||||||
|
|
||||||
push-synap1680: build-synap1680
|
|
||||||
docker buildx bake --file=docker/synap1680/synap1680.hcl synap1680 \
|
|
||||||
--set synap1680.tags=$(IMAGE_REPO):${GITHUB_REF_NAME}-$(COMMIT_HASH)-synap1680 \
|
|
||||||
--push
|
|
||||||
@ -16,8 +16,8 @@ target rootfs {
|
|||||||
target = "rootfs"
|
target = "rootfs"
|
||||||
}
|
}
|
||||||
|
|
||||||
target synap1680 {
|
target synaptics {
|
||||||
dockerfile = "docker/synap1680/Dockerfile"
|
dockerfile = "docker/synaptics/Dockerfile"
|
||||||
contexts = {
|
contexts = {
|
||||||
wheels = "target:wheels",
|
wheels = "target:wheels",
|
||||||
deps = "target:deps",
|
deps = "target:deps",
|
||||||
15
docker/synaptics/synaptics.mk
Normal file
15
docker/synaptics/synaptics.mk
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
BOARDS += synaptics
|
||||||
|
|
||||||
|
local-synaptics: version
|
||||||
|
docker buildx bake --file=docker/synaptics/synaptics.hcl synaptics \
|
||||||
|
--set synaptics.tags=frigate:latest-synaptics \
|
||||||
|
--load
|
||||||
|
|
||||||
|
build-synaptics: version
|
||||||
|
docker buildx bake --file=docker/synaptics/synaptics.hcl synaptics \
|
||||||
|
--set synaptics.tags=$(IMAGE_REPO):${GITHUB_REF_NAME}-$(COMMIT_HASH)-synaptics
|
||||||
|
|
||||||
|
push-synaptics: build-synaptics
|
||||||
|
docker buildx bake --file=docker/synaptics/synaptics.hcl synaptics \
|
||||||
|
--set synaptics.tags=$(IMAGE_REPO):${GITHUB_REF_NAME}-$(COMMIT_HASH)-synaptics \
|
||||||
|
--push
|
||||||
@ -429,13 +429,13 @@ cameras:
|
|||||||
|
|
||||||
:::
|
:::
|
||||||
|
|
||||||
## Synaptics SL1680
|
## Synaptics
|
||||||
|
|
||||||
Hardware accelerated video de-/encoding is supported on Synpatics SL1680 SoC.
|
Hardware accelerated video de-/encoding is supported on Synpatics SL-series SoC.
|
||||||
|
|
||||||
### Prerequisites
|
### Prerequisites
|
||||||
|
|
||||||
Make sure to follow the [Synap1680 specific installation instructions](/frigate/installation#synaptics-sl1680).
|
Make sure to follow the [Synaptics specific installation instructions](/frigate/installation#synaptics).
|
||||||
|
|
||||||
### Configuration
|
### Configuration
|
||||||
|
|
||||||
@ -451,8 +451,6 @@ output_args:
|
|||||||
|
|
||||||
:::warning
|
:::warning
|
||||||
|
|
||||||
Make sure that your SoC supports hardware acceleration for your input stream and your stream input is h264 encoding. For example, if your camera streams with h264 encoding, your SoC must be able to de- and encode with it. If you are unsure whether your SoC meets the requirements, take a look at the datasheet.
|
Make sure that your SoC supports hardware acceleration for your input stream and your input stream is h264 encoding. For example, if your camera streams with h264 encoding, your SoC must be able to de- and encode with it. If you are unsure whether your SoC meets the requirements, take a look at the datasheet.
|
||||||
|
|
||||||
:::
|
:::
|
||||||
|
|
||||||
```
|
|
||||||
|
|||||||
@ -40,9 +40,9 @@ Frigate supports multiple different detectors that work on different types of ha
|
|||||||
|
|
||||||
- [RKNN](#rockchip-platform): RKNN models can run on Rockchip devices with included NPUs.
|
- [RKNN](#rockchip-platform): RKNN models can run on Rockchip devices with included NPUs.
|
||||||
|
|
||||||
**Synaptics SL1680**
|
**Synaptics**
|
||||||
|
|
||||||
- [Synap](#synaptics-sl1680): synap models can run on Synaptics devices(e.g astra machina) with included NPUs.
|
- [Synaptics](#synaptics): synap models can run on Synaptics devices(e.g astra machina) with included NPUs.
|
||||||
|
|
||||||
**For Testing**
|
**For Testing**
|
||||||
|
|
||||||
@ -842,15 +842,15 @@ model:
|
|||||||
height: 320 # MUST match the chosen model i.e yolov7-320 -> 320 yolov4-416 -> 416
|
height: 320 # MUST match the chosen model i.e yolov7-320 -> 320 yolov4-416 -> 416
|
||||||
```
|
```
|
||||||
|
|
||||||
## Synaptics SL1680
|
## Synaptics
|
||||||
|
|
||||||
Hardware accelerated object detection is supported on the following SoCs:
|
Hardware accelerated object detection is supported on the following SoCs:
|
||||||
|
|
||||||
- SL1680
|
- SL1680
|
||||||
|
|
||||||
This implementation uses the [SL1680 model conversion](https://synaptics-synap.github.io/doc/v/latest/docs/manual/introduction.html#offline-model-conversion), version v3.1.0.
|
This implementation uses the [Synaptics model conversion](https://synaptics-synap.github.io/doc/v/latest/docs/manual/introduction.html#offline-model-conversion), version v3.1.0.
|
||||||
|
|
||||||
See the [installation docs](../frigate/installation.md#synaptics-sl1680) for information on configuring the SL1680 NPU hardware.
|
See the [installation docs](../frigate/installation.md#synaptics) for information on configuring the SL-series NPU hardware.
|
||||||
|
|
||||||
### Configuration
|
### Configuration
|
||||||
|
|
||||||
@ -863,7 +863,7 @@ Use this configuration for ssd models. Here's a default pre-converted ssd model
|
|||||||
```yaml
|
```yaml
|
||||||
detectors:
|
detectors:
|
||||||
synap_npu:
|
synap_npu:
|
||||||
type: synap1680
|
type: synap
|
||||||
|
|
||||||
model:
|
model:
|
||||||
path: /model.synap
|
path: /model.synap
|
||||||
|
|||||||
@ -90,20 +90,20 @@ Frigate supports multiple different detectors that work on different types of ha
|
|||||||
- Runs best with tiny or small size models
|
- Runs best with tiny or small size models
|
||||||
- Runs efficiently on low power hardware
|
- Runs efficiently on low power hardware
|
||||||
|
|
||||||
**Synaptics SL1680**
|
**Synaptics**
|
||||||
|
|
||||||
- [Synaptics SL1680](#synaptics-sl1680): synap models can run on Synaptics devices(e.g astra machina) with included NPUs to provide efficient object detection.
|
- [Synaptics](#synaptics): synap models can run on Synaptics devices(e.g astra machina) with included NPUs to provide efficient object detection.
|
||||||
|
|
||||||
:::
|
:::
|
||||||
|
|
||||||
### Synaptics SL1680
|
### Synaptics
|
||||||
|
|
||||||
- **Synaptics SL1680** Default model is **mobilenet**
|
- **Synaptics** Default model is **mobilenet**
|
||||||
|
|
||||||
| Name | Synaptics SL1680 Inference Time |
|
| Name | Synaptics SL1680 Inference Time |
|
||||||
| ---------------- | ------------------------------- |
|
| ---------------- | ------------------------------- |
|
||||||
| ssd mobilenet | ~ 25 ms |
|
| ssd mobilenet | ~ 25 ms |
|
||||||
| yolov5n | ~ 118 ms |
|
| yolov5m | ~ 118 ms |
|
||||||
|
|
||||||
### Hailo-8
|
### Hailo-8
|
||||||
|
|
||||||
|
|||||||
@ -185,11 +185,13 @@ or add these options to your `docker run` command:
|
|||||||
|
|
||||||
Next, you should configure [hardware object detection](/configuration/object_detectors#rockchip-platform) and [hardware video processing](/configuration/hardware_acceleration_video#rockchip-platform).
|
Next, you should configure [hardware object detection](/configuration/object_detectors#rockchip-platform) and [hardware video processing](/configuration/hardware_acceleration_video#rockchip-platform).
|
||||||
|
|
||||||
### Synaptics SL1680
|
### Synaptics
|
||||||
|
|
||||||
|
- SL1680
|
||||||
|
|
||||||
#### Setup
|
#### Setup
|
||||||
|
|
||||||
Follow Frigate's default installation instructions, but use a docker image with `-synap1680` suffix for example `ghcr.io/blakeblackshear/frigate:stable-synap1680`.
|
Follow Frigate's default installation instructions, but use a docker image with `-synaptics` suffix for example `ghcr.io/blakeblackshear/frigate:stable-synaptics`.
|
||||||
|
|
||||||
Next, you need to grant docker permissions to access your hardware:
|
Next, you need to grant docker permissions to access your hardware:
|
||||||
|
|
||||||
@ -212,7 +214,7 @@ or add these options to your `docker run` command:
|
|||||||
|
|
||||||
#### Configuration
|
#### Configuration
|
||||||
|
|
||||||
Next, you should configure [hardware object detection](/configuration/object_detectors#synaptics-sl1680) and [hardware video processing](/configuration/hardware_acceleration_video#synaptics-sl1680).
|
Next, you should configure [hardware object detection](/configuration/object_detectors#synaptics) and [hardware video processing](/configuration/hardware_acceleration_video#synaptics).
|
||||||
|
|
||||||
## Docker
|
## Docker
|
||||||
|
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
import os
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
from typing_extensions import Literal
|
from typing_extensions import Literal
|
||||||
@ -13,7 +14,7 @@ from frigate.detectors.detector_config import BaseDetectorConfig, ModelTypeEnum
|
|||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
DETECTOR_KEY = "synap1680"
|
DETECTOR_KEY = "synaptics"
|
||||||
|
|
||||||
|
|
||||||
class SynapDetectorConfig(BaseDetectorConfig):
|
class SynapDetectorConfig(BaseDetectorConfig):
|
||||||
Loading…
Reference in New Issue
Block a user