mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-05 10:45:21 +03:00
Merge branch 'dev' into 230523-optimize-sync-records
This commit is contained in:
commit
df24680693
19
.github/workflows/pull_request.yml
vendored
19
.github/workflows/pull_request.yml
vendored
@ -79,6 +79,10 @@ jobs:
|
|||||||
python_tests:
|
python_tests:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
name: Python Tests
|
name: Python Tests
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
platform: [amd64,arm64]
|
||||||
steps:
|
steps:
|
||||||
- name: Check out code
|
- name: Check out code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
@ -90,13 +94,22 @@ jobs:
|
|||||||
- name: Build web
|
- name: Build web
|
||||||
run: npm run build
|
run: npm run build
|
||||||
working-directory: ./web
|
working-directory: ./web
|
||||||
|
- run: make version
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v2
|
uses: docker/setup-qemu-action@v2
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v2
|
uses: docker/setup-buildx-action@v2
|
||||||
- name: Build
|
- name: Build
|
||||||
run: make
|
uses: docker/build-push-action@v4
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
push: false
|
||||||
|
load: true
|
||||||
|
platforms: linux/${{ matrix.platform }}
|
||||||
|
tags: |
|
||||||
|
frigate:${{ matrix.platform }}
|
||||||
|
target: frigate
|
||||||
- name: Run mypy
|
- name: Run mypy
|
||||||
run: docker run --rm --entrypoint=python3 frigate:latest -u -m mypy --config-file frigate/mypy.ini frigate
|
run: docker run --platform linux/${{ matrix.platform }} --rm --entrypoint=python3 frigate:${{ matrix.platform }} -u -m mypy --config-file frigate/mypy.ini frigate
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: docker run --rm --entrypoint=python3 frigate:latest -u -m unittest
|
run: docker run --platform linux/${{ matrix.platform }} --rm --entrypoint=python3 frigate:${{ matrix.platform }} -u -m unittest
|
||||||
|
|||||||
@ -3,7 +3,7 @@ import numpy as np
|
|||||||
|
|
||||||
from frigate.detectors.detection_api import DetectionApi
|
from frigate.detectors.detection_api import DetectionApi
|
||||||
from frigate.detectors.detector_config import BaseDetectorConfig
|
from frigate.detectors.detector_config import BaseDetectorConfig
|
||||||
from typing import Literal
|
from typing_extensions import Literal
|
||||||
from pydantic import Extra, Field
|
from pydantic import Extra, Field
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|||||||
@ -5,7 +5,7 @@ import io
|
|||||||
|
|
||||||
from frigate.detectors.detection_api import DetectionApi
|
from frigate.detectors.detection_api import DetectionApi
|
||||||
from frigate.detectors.detector_config import BaseDetectorConfig
|
from frigate.detectors.detector_config import BaseDetectorConfig
|
||||||
from typing import Literal
|
from typing_extensions import Literal
|
||||||
from pydantic import Extra, Field
|
from pydantic import Extra, Field
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
|
|
||||||
@ -50,7 +50,10 @@ class DeepStack(DetectionApi):
|
|||||||
image_bytes = output.getvalue()
|
image_bytes = output.getvalue()
|
||||||
data = {"api_key": self.api_key}
|
data = {"api_key": self.api_key}
|
||||||
response = requests.post(
|
response = requests.post(
|
||||||
self.api_url, files={"image": image_bytes}, timeout=self.api_timeout
|
self.api_url,
|
||||||
|
data=data,
|
||||||
|
files={"image": image_bytes},
|
||||||
|
timeout=self.api_timeout,
|
||||||
)
|
)
|
||||||
response_json = response.json()
|
response_json = response.json()
|
||||||
detections = np.zeros((20, 6), np.float32)
|
detections = np.zeros((20, 6), np.float32)
|
||||||
|
|||||||
@ -3,7 +3,7 @@ import numpy as np
|
|||||||
|
|
||||||
from frigate.detectors.detection_api import DetectionApi
|
from frigate.detectors.detection_api import DetectionApi
|
||||||
from frigate.detectors.detector_config import BaseDetectorConfig
|
from frigate.detectors.detector_config import BaseDetectorConfig
|
||||||
from typing import Literal
|
from typing_extensions import Literal
|
||||||
from pydantic import Extra, Field
|
from pydantic import Extra, Field
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|||||||
@ -4,7 +4,7 @@ import openvino.runtime as ov
|
|||||||
|
|
||||||
from frigate.detectors.detection_api import DetectionApi
|
from frigate.detectors.detection_api import DetectionApi
|
||||||
from frigate.detectors.detector_config import BaseDetectorConfig, ModelTypeEnum
|
from frigate.detectors.detector_config import BaseDetectorConfig, ModelTypeEnum
|
||||||
from typing import Literal
|
from typing_extensions import Literal
|
||||||
from pydantic import Extra, Field
|
from pydantic import Extra, Field
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -13,7 +13,7 @@ except ModuleNotFoundError as e:
|
|||||||
|
|
||||||
from frigate.detectors.detection_api import DetectionApi
|
from frigate.detectors.detection_api import DetectionApi
|
||||||
from frigate.detectors.detector_config import BaseDetectorConfig
|
from frigate.detectors.detector_config import BaseDetectorConfig
|
||||||
from typing import Literal
|
from typing_extensions import Literal
|
||||||
from pydantic import Field
|
from pydantic import Field
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user