mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-05-10 07:25:27 +03:00
Compare commits
No commits in common. "b147b535224805d835f418827215e1f26e138daa" and "544d3c6139cce1c1c3f07da228aefdb8bfd738fc" have entirely different histories.
b147b53522
...
544d3c6139
@ -89,14 +89,6 @@ After closing VS Code, you may still have containers running. To close everythin
|
|||||||
|
|
||||||
### Testing
|
### Testing
|
||||||
|
|
||||||
#### Unit Tests
|
|
||||||
|
|
||||||
GitHub will execute unit tests on new PRs. You must ensure that all tests pass.
|
|
||||||
|
|
||||||
```shell
|
|
||||||
python3 -u -m unittest
|
|
||||||
```
|
|
||||||
|
|
||||||
#### FFMPEG Hardware Acceleration
|
#### FFMPEG Hardware Acceleration
|
||||||
|
|
||||||
The following commands are used inside the container to ensure hardware acceleration is working properly.
|
The following commands are used inside the container to ensure hardware acceleration is working properly.
|
||||||
@ -133,28 +125,6 @@ ffmpeg -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format
|
|||||||
ffmpeg -c:v h264_qsv -re -stream_loop -1 -i https://streams.videolan.org/ffmpeg/incoming/720p60.mp4 -f rawvideo -pix_fmt yuv420p pipe: > /dev/null
|
ffmpeg -c:v h264_qsv -re -stream_loop -1 -i https://streams.videolan.org/ffmpeg/incoming/720p60.mp4 -f rawvideo -pix_fmt yuv420p pipe: > /dev/null
|
||||||
```
|
```
|
||||||
|
|
||||||
### Submitting a pull request
|
|
||||||
|
|
||||||
Code must be formatted, linted and type-tested. GitHub will run these checks on pull requests, so it is advised to run them yourself prior to opening.
|
|
||||||
|
|
||||||
**Formatting**
|
|
||||||
|
|
||||||
```shell
|
|
||||||
ruff format frigate migrations docker *.py
|
|
||||||
```
|
|
||||||
|
|
||||||
**Linting**
|
|
||||||
|
|
||||||
```shell
|
|
||||||
ruff check frigate migrations docker *.py
|
|
||||||
```
|
|
||||||
|
|
||||||
**MyPy Static Typing**
|
|
||||||
|
|
||||||
```shell
|
|
||||||
python3 -u -m mypy --config-file frigate/mypy.ini frigate
|
|
||||||
```
|
|
||||||
|
|
||||||
## Web Interface
|
## Web Interface
|
||||||
|
|
||||||
### Prerequisites
|
### Prerequisites
|
||||||
|
|||||||
@ -55,14 +55,6 @@ DYNAMIC_OBJECT_THRESHOLDS = StationaryThresholds(
|
|||||||
motion_classifier_enabled=True,
|
motion_classifier_enabled=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
# Thresholds for objects that are not expected to be stationary
|
|
||||||
NON_STATIONARY_OBJECT_THRESHOLDS = StationaryThresholds(
|
|
||||||
objects=["license_plate"],
|
|
||||||
known_active_iou=0.9,
|
|
||||||
stationary_check_iou=0.9,
|
|
||||||
max_stationary_history=4,
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def get_stationary_threshold(label: str) -> StationaryThresholds:
|
def get_stationary_threshold(label: str) -> StationaryThresholds:
|
||||||
"""Get the stationary thresholds for a given object label."""
|
"""Get the stationary thresholds for a given object label."""
|
||||||
@ -73,9 +65,6 @@ def get_stationary_threshold(label: str) -> StationaryThresholds:
|
|||||||
if label in DYNAMIC_OBJECT_THRESHOLDS.objects:
|
if label in DYNAMIC_OBJECT_THRESHOLDS.objects:
|
||||||
return DYNAMIC_OBJECT_THRESHOLDS
|
return DYNAMIC_OBJECT_THRESHOLDS
|
||||||
|
|
||||||
if label in NON_STATIONARY_OBJECT_THRESHOLDS.objects:
|
|
||||||
return NON_STATIONARY_OBJECT_THRESHOLDS
|
|
||||||
|
|
||||||
return StationaryThresholds()
|
return StationaryThresholds()
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -125,13 +125,7 @@ export default function ClassificationSelectionDialog({
|
|||||||
isMobile && "gap-2 pb-4",
|
isMobile && "gap-2 pb-4",
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
{classes
|
{classes.sort().map((category) => (
|
||||||
.sort((a, b) => {
|
|
||||||
if (a === "none") return 1;
|
|
||||||
if (b === "none") return -1;
|
|
||||||
return a.localeCompare(b);
|
|
||||||
})
|
|
||||||
.map((category) => (
|
|
||||||
<SelectorItem
|
<SelectorItem
|
||||||
key={category}
|
key={category}
|
||||||
className="flex cursor-pointer gap-2 smart-capitalize"
|
className="flex cursor-pointer gap-2 smart-capitalize"
|
||||||
|
|||||||
@ -598,18 +598,18 @@ function LibrarySelector({
|
|||||||
{Object.values(faces).map((face) => (
|
{Object.values(faces).map((face) => (
|
||||||
<DropdownMenuItem
|
<DropdownMenuItem
|
||||||
key={face}
|
key={face}
|
||||||
className="group flex items-center justify-between p-0"
|
className="group flex items-center justify-between"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
className="flex-grow cursor-pointer"
|
className="flex-grow cursor-pointer"
|
||||||
onClick={() => setPageToggle(face)}
|
onClick={() => setPageToggle(face)}
|
||||||
>
|
>
|
||||||
{face}
|
{face}
|
||||||
<span className="ml-2 px-2 py-1.5 text-muted-foreground">
|
<span className="ml-2 text-muted-foreground">
|
||||||
({faceData?.[face].length})
|
({faceData?.[face].length})
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex gap-0.5 px-2">
|
<div className="flex gap-0.5">
|
||||||
<Tooltip>
|
<Tooltip>
|
||||||
<TooltipTrigger asChild>
|
<TooltipTrigger asChild>
|
||||||
<Button
|
<Button
|
||||||
|
|||||||
@ -700,19 +700,13 @@ function LibrarySelector({
|
|||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{Object.keys(dataset)
|
{Object.keys(dataset).map((id) => (
|
||||||
.sort((a, b) => {
|
|
||||||
if (a === "none") return 1;
|
|
||||||
if (b === "none") return -1;
|
|
||||||
return a.localeCompare(b);
|
|
||||||
})
|
|
||||||
.map((id) => (
|
|
||||||
<DropdownMenuItem
|
<DropdownMenuItem
|
||||||
key={id}
|
key={id}
|
||||||
className="group flex items-center justify-between p-0"
|
className="group flex items-center justify-between"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
className="flex-grow cursor-pointer px-2 py-1.5 capitalize"
|
className="flex-grow cursor-pointer capitalize"
|
||||||
onClick={() => setPageToggle(id)}
|
onClick={() => setPageToggle(id)}
|
||||||
>
|
>
|
||||||
{id === "none" ? t("details.none") : id.replaceAll("_", " ")}
|
{id === "none" ? t("details.none") : id.replaceAll("_", " ")}
|
||||||
@ -721,7 +715,7 @@ function LibrarySelector({
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
{id != "none" && (
|
{id != "none" && (
|
||||||
<div className="flex gap-0.5 px-2">
|
<div className="flex gap-0.5">
|
||||||
<Tooltip>
|
<Tooltip>
|
||||||
<TooltipTrigger asChild>
|
<TooltipTrigger asChild>
|
||||||
<Button
|
<Button
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user