mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-05-03 06:50:58 +00:00
Compare commits
5 Commits
80a13e43e9
...
6e79ec1624
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6e79ec1624 | ||
|
|
43a9641ae8 | ||
|
|
484ea10037 | ||
|
|
9a786a50d6 | ||
|
|
38ffe21b69 |
@ -152,7 +152,7 @@ go2rtc:
|
|||||||
my_camera: rtsp://username:$%40foo%25@192.168.1.100
|
my_camera: rtsp://username:$%40foo%25@192.168.1.100
|
||||||
```
|
```
|
||||||
|
|
||||||
See [this comment(https://github.com/AlexxIT/go2rtc/issues/1217#issuecomment-2242296489) for more information.
|
See [this comment](https://github.com/AlexxIT/go2rtc/issues/1217#issuecomment-2242296489) for more information.
|
||||||
|
|
||||||
## Advanced Restream Configurations
|
## Advanced Restream Configurations
|
||||||
|
|
||||||
|
|||||||
@ -175,6 +175,7 @@ class HailoAsyncInference:
|
|||||||
return self.hef.get_input_vstream_infos()[0].shape
|
return self.hef.get_input_vstream_infos()[0].shape
|
||||||
|
|
||||||
def run(self) -> None:
|
def run(self) -> None:
|
||||||
|
job = None
|
||||||
with self.infer_model.configure() as configured_infer_model:
|
with self.infer_model.configure() as configured_infer_model:
|
||||||
while True:
|
while True:
|
||||||
batch_data = self.input_store.get()
|
batch_data = self.input_store.get()
|
||||||
@ -202,7 +203,9 @@ class HailoAsyncInference:
|
|||||||
bindings_list=bindings_list,
|
bindings_list=bindings_list,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
job.wait(100)
|
|
||||||
|
if job is not None:
|
||||||
|
job.wait(100)
|
||||||
|
|
||||||
|
|
||||||
# ----------------- HailoDetector Class ----------------- #
|
# ----------------- HailoDetector Class ----------------- #
|
||||||
|
|||||||
@ -28,12 +28,12 @@ class RequestStore:
|
|||||||
|
|
||||||
def put(self, tensor_input: ndarray) -> int:
|
def put(self, tensor_input: ndarray) -> int:
|
||||||
request_id = self.__get_request_id()
|
request_id = self.__get_request_id()
|
||||||
self.input_queue.get((request_id, tensor_input))
|
self.input_queue.put((request_id, tensor_input))
|
||||||
return request_id
|
return request_id
|
||||||
|
|
||||||
def get(self) -> tuple[int, ndarray] | None:
|
def get(self) -> tuple[int, ndarray] | None:
|
||||||
try:
|
try:
|
||||||
return self.input_queue.get_nowait()
|
return self.input_queue.get()
|
||||||
except Exception:
|
except Exception:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|||||||
@ -24,6 +24,7 @@ from frigate.util.services import (
|
|||||||
get_intel_gpu_stats,
|
get_intel_gpu_stats,
|
||||||
get_jetson_stats,
|
get_jetson_stats,
|
||||||
get_nvidia_gpu_stats,
|
get_nvidia_gpu_stats,
|
||||||
|
get_rockchip_gpu_stats,
|
||||||
get_rockchip_npu_stats,
|
get_rockchip_npu_stats,
|
||||||
is_vaapi_amd_driver,
|
is_vaapi_amd_driver,
|
||||||
)
|
)
|
||||||
@ -232,6 +233,11 @@ async def set_gpu_stats(
|
|||||||
else:
|
else:
|
||||||
stats["intel-vaapi"] = {"gpu": "", "mem": ""}
|
stats["intel-vaapi"] = {"gpu": "", "mem": ""}
|
||||||
hwaccel_errors.append(args)
|
hwaccel_errors.append(args)
|
||||||
|
elif "preset-rk" in args:
|
||||||
|
rga_usage = get_rockchip_gpu_stats()
|
||||||
|
|
||||||
|
if rga_usage:
|
||||||
|
stats["rockchip"] = rga_usage
|
||||||
elif "v4l2m2m" in args or "rpi" in args:
|
elif "v4l2m2m" in args or "rpi" in args:
|
||||||
# RPi v4l2m2m is currently not able to get usage stats
|
# RPi v4l2m2m is currently not able to get usage stats
|
||||||
stats["rpi-v4l2m2m"] = {"gpu": "", "mem": ""}
|
stats["rpi-v4l2m2m"] = {"gpu": "", "mem": ""}
|
||||||
|
|||||||
@ -382,8 +382,29 @@ def get_intel_gpu_stats(sriov: bool) -> dict[str, str]:
|
|||||||
return results
|
return results
|
||||||
|
|
||||||
|
|
||||||
|
def get_rockchip_gpu_stats() -> dict[str, str]:
|
||||||
|
"""Get GPU stats using rk."""
|
||||||
|
try:
|
||||||
|
with open("/sys/kernel/debug/rkrga/load", "r") as f:
|
||||||
|
content = f.read()
|
||||||
|
except FileNotFoundError:
|
||||||
|
return None
|
||||||
|
|
||||||
|
load_values = []
|
||||||
|
for line in content.splitlines():
|
||||||
|
match = re.search(r"load = (\d+)%", line)
|
||||||
|
if match:
|
||||||
|
load_values.append(int(match.group(1)))
|
||||||
|
|
||||||
|
if not load_values:
|
||||||
|
return None
|
||||||
|
|
||||||
|
average_load = f"{round(sum(load_values) / len(load_values), 2)}%"
|
||||||
|
return {"gpu": average_load, "mem": "-"}
|
||||||
|
|
||||||
|
|
||||||
def get_rockchip_npu_stats() -> dict[str, str]:
|
def get_rockchip_npu_stats() -> dict[str, str]:
|
||||||
"""Get stats using rk."""
|
"""Get NPU stats using rk."""
|
||||||
try:
|
try:
|
||||||
with open("/sys/kernel/debug/rknpu/load", "r") as f:
|
with open("/sys/kernel/debug/rknpu/load", "r") as f:
|
||||||
npu_output = f.read()
|
npu_output = f.read()
|
||||||
|
|||||||
@ -474,7 +474,7 @@
|
|||||||
"deleteUser": {
|
"deleteUser": {
|
||||||
"title": "Delete User",
|
"title": "Delete User",
|
||||||
"desc": "This action cannot be undone. This will permanently delete the user account and remove all associated data.",
|
"desc": "This action cannot be undone. This will permanently delete the user account and remove all associated data.",
|
||||||
"warn": "Are you sure you want to delete"
|
"warn": "Are you sure you want to delete <strong>{{username}}</strong>?"
|
||||||
},
|
},
|
||||||
"passwordSetting": {
|
"passwordSetting": {
|
||||||
"updatePassword": "Update Password for {{username}}",
|
"updatePassword": "Update Password for {{username}}",
|
||||||
@ -483,7 +483,7 @@
|
|||||||
},
|
},
|
||||||
"changeRole": {
|
"changeRole": {
|
||||||
"title": "Change User Role",
|
"title": "Change User Role",
|
||||||
"desc": "Update permissions for",
|
"desc": "Update permissions for <strong>{{username}}</strong>",
|
||||||
"roleInfo": {
|
"roleInfo": {
|
||||||
"intro": "Select the appropriate role for this user:",
|
"intro": "Select the appropriate role for this user:",
|
||||||
"admin": "Admin",
|
"admin": "Admin",
|
||||||
|
|||||||
@ -101,6 +101,9 @@ export default function Statusbar() {
|
|||||||
case "intel-qsv":
|
case "intel-qsv":
|
||||||
gpuTitle = "Intel GPU";
|
gpuTitle = "Intel GPU";
|
||||||
break;
|
break;
|
||||||
|
case "rockchip":
|
||||||
|
gpuTitle = "Rockchip GPU";
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
gpuTitle = name;
|
gpuTitle = name;
|
||||||
break;
|
break;
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { useTranslation } from "react-i18next";
|
import { Trans, useTranslation } from "react-i18next";
|
||||||
import { Button } from "../ui/button";
|
import { Button } from "../ui/button";
|
||||||
import {
|
import {
|
||||||
Dialog,
|
Dialog,
|
||||||
@ -35,8 +35,14 @@ export default function DeleteUserDialog({
|
|||||||
|
|
||||||
<div className="my-4 rounded-md border border-destructive/20 bg-destructive/5 p-4 text-center text-sm">
|
<div className="my-4 rounded-md border border-destructive/20 bg-destructive/5 p-4 text-center text-sm">
|
||||||
<p className="font-medium text-destructive">
|
<p className="font-medium text-destructive">
|
||||||
{t("users.dialog.deleteUser.warn")}
|
<Trans
|
||||||
<span className="font-medium"> {username}</span>?
|
i18nKey="users.dialog.deleteUser.warn"
|
||||||
|
ns="views/settings"
|
||||||
|
values={{ username }}
|
||||||
|
components={{
|
||||||
|
strong: <span className="font-medium" />,
|
||||||
|
}}
|
||||||
|
/>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { useTranslation } from "react-i18next";
|
import { Trans, useTranslation } from "react-i18next";
|
||||||
import { Button } from "../ui/button";
|
import { Button } from "../ui/button";
|
||||||
import {
|
import {
|
||||||
Dialog,
|
Dialog,
|
||||||
@ -46,8 +46,14 @@ export default function RoleChangeDialog({
|
|||||||
{t("users.dialog.changeRole.title")}
|
{t("users.dialog.changeRole.title")}
|
||||||
</DialogTitle>
|
</DialogTitle>
|
||||||
<DialogDescription>
|
<DialogDescription>
|
||||||
{t("users.dialog.changeRole.desc")}
|
<Trans
|
||||||
<span className="font-medium"> {username}</span>
|
i18nKey="users.dialog.changeRole.desc"
|
||||||
|
ns="views/settings"
|
||||||
|
values={{ username }}
|
||||||
|
components={{
|
||||||
|
strong: <span className="font-medium" />,
|
||||||
|
}}
|
||||||
|
/>
|
||||||
</DialogDescription>
|
</DialogDescription>
|
||||||
</DialogHeader>
|
</DialogHeader>
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user