Compare commits

..

No commits in common. "0947bffeefd7e6f3f76d1e8d838c030f7e1f6ac9" and "53c8aa25cb0bbcbcd37c5f7737062b672c038db7" have entirely different histories.

5 changed files with 23 additions and 22 deletions

View File

@ -30,7 +30,7 @@ http {
gzip on; gzip on;
gzip_comp_level 6; gzip_comp_level 6;
gzip_types text/plain text/css application/json application/x-javascript application/javascript text/javascript image/svg+xml image/x-icon image/bmp; gzip_types text/plain text/css application/json application/x-javascript application/javascript text/javascript image/svg+xml image/x-icon image/bmp image/png image/gif image/jpeg image/jpg;
gzip_proxied no-cache no-store private expired auth; gzip_proxied no-cache no-store private expired auth;
gzip_vary on; gzip_vary on;

View File

@ -10,7 +10,7 @@ from scipy import stats
from frigate.config import FrigateConfig from frigate.config import FrigateConfig
from frigate.const import MODEL_CACHE_DIR from frigate.const import MODEL_CACHE_DIR
from frigate.embeddings.onnx.face_embedding import ArcfaceEmbedding from frigate.embeddings.onnx.facenet import ArcfaceEmbedding
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
@ -329,7 +329,7 @@ class ArcFaceRecognizer(FaceRecognizer):
cosine_similarity = dot_product / (magnitude_A * magnitude_B) cosine_similarity = dot_product / (magnitude_A * magnitude_B)
confidence = self.similarity_to_confidence(cosine_similarity) confidence = self.similarity_to_confidence(cosine_similarity)
if confidence > score: if cosine_similarity > score:
score = confidence score = confidence
label = name label = name

View File

@ -90,7 +90,8 @@ class ArcfaceEmbedding(BaseEmbedding):
frame[y_center : y_center + og_h, x_center : x_center + og_w] = og frame[y_center : y_center + og_h, x_center : x_center + og_w] = og
# run arcface normalization # run arcface normalization
frame = (frame / 127.5) - 1.0 normalized_image = frame.astype(np.float32) / 255.0
frame = (normalized_image - 0.5) / 0.5
frame = np.transpose(frame, (2, 0, 1)) frame = np.transpose(frame, (2, 0, 1))
frame = np.expand_dims(frame, axis=0) frame = np.expand_dims(frame, axis=0)

View File

@ -11,9 +11,9 @@
"frigatePlus": "Frigate+ Settings - Frigate" "frigatePlus": "Frigate+ Settings - Frigate"
}, },
"menu": { "menu": {
"ui": "UI", "uiSettings": "UI Settings",
"classification": "Classification", "classificationSettings": "Classification Settings",
"cameras": "Camera Settings", "cameraSettings": "Camera Settings",
"masksAndZones": "Masks / Zones", "masksAndZones": "Masks / Zones",
"motionTuner": "Motion Tuner", "motionTuner": "Motion Tuner",
"debug": "Debug", "debug": "Debug",

View File

@ -11,9 +11,9 @@
"frigatePlus": "Frigate+ 设置 - Frigate" "frigatePlus": "Frigate+ 设置 - Frigate"
}, },
"menu": { "menu": {
"ui": "界面设置", "uiSettings": "界面设置",
"classification": "分类设置", "classificationSettings": "分类设置",
"cameras": "摄像头设置", "cameraSettings": "摄像头设置",
"masksAndZones": "遮罩/ 区域", "masksAndZones": "遮罩/ 区域",
"motionTuner": "运动调整器", "motionTuner": "运动调整器",
"debug": "调试", "debug": "调试",
@ -109,16 +109,16 @@
"desc": "人脸识别功能允许为人物分配名称当识别到他们的面孔时Frigate 会将人物的名字作为子标签进行分配。这些信息会显示在界面、过滤器以及通知中。", "desc": "人脸识别功能允许为人物分配名称当识别到他们的面孔时Frigate 会将人物的名字作为子标签进行分配。这些信息会显示在界面、过滤器以及通知中。",
"readTheDocumentation": "阅读文档(英文)", "readTheDocumentation": "阅读文档(英文)",
"modelSize": { "modelSize": {
"label": "模型大小", "label": "模型大小",
"desc": "用于人脸识别的模型尺寸。", "desc": "用于人脸识别的模型尺寸。",
"small": { "small": {
"title": "小模型", "title": "小模型",
"desc": "使用<em>小模型</em>将采用OpenCV的局部二值模式直方图(LBPH)算法可在大多数CPU上高效运行。" "desc": "使用<em>小模型</em>将采用OpenCV的局部二值模式直方图(LBPH)算法可在大多数CPU上高效运行。"
}, },
"large": { "large": {
"title": "大模型", "title": "大模型",
"desc": "使用<em>大模型</em>将采用ArcFace人脸嵌入模型若适用将自动在GPU上运行。" "desc": "使用<em>大模型</em>将采用ArcFace人脸嵌入模型若适用将自动在GPU上运行。"
} }
} }
}, },
"licensePlateRecognition": { "licensePlateRecognition": {
@ -565,8 +565,8 @@
"modelSelect": "您可以在Frigate+上选择可用的模型。请注意,只能选择与当前探测器配置兼容的模型。" "modelSelect": "您可以在Frigate+上选择可用的模型。请注意,只能选择与当前探测器配置兼容的模型。"
}, },
"toast": { "toast": {
"success": "Frigate+ 设置已保存。请重启 Frigate 以应用更改。", "success": "Frigate+ 设置已保存。请重启 Frigate 以应用更改。",
"error": "配置更改保存失败:{{errorMessage}}" "error": "配置更改保存失败:{{errorMessage}}"
} }
} }
} }