mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-05-03 06:50:58 +00:00
Compare commits
3 Commits
53c8aa25cb
...
0947bffeef
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0947bffeef | ||
|
|
ff34739f40 | ||
|
|
a37f804469 |
@ -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 image/png image/gif image/jpeg image/jpg;
|
gzip_types text/plain text/css application/json application/x-javascript application/javascript text/javascript image/svg+xml image/x-icon image/bmp;
|
||||||
gzip_proxied no-cache no-store private expired auth;
|
gzip_proxied no-cache no-store private expired auth;
|
||||||
gzip_vary on;
|
gzip_vary on;
|
||||||
|
|
||||||
|
|||||||
@ -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.facenet import ArcfaceEmbedding
|
from frigate.embeddings.onnx.face_embedding 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 cosine_similarity > score:
|
if confidence > score:
|
||||||
score = confidence
|
score = confidence
|
||||||
label = name
|
label = name
|
||||||
|
|
||||||
|
|||||||
@ -90,8 +90,7 @@ 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
|
||||||
normalized_image = frame.astype(np.float32) / 255.0
|
frame = (frame / 127.5) - 1.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)
|
||||||
@ -11,9 +11,9 @@
|
|||||||
"frigatePlus": "Frigate+ Settings - Frigate"
|
"frigatePlus": "Frigate+ Settings - Frigate"
|
||||||
},
|
},
|
||||||
"menu": {
|
"menu": {
|
||||||
"uiSettings": "UI Settings",
|
"ui": "UI",
|
||||||
"classificationSettings": "Classification Settings",
|
"classification": "Classification",
|
||||||
"cameraSettings": "Camera Settings",
|
"cameras": "Camera Settings",
|
||||||
"masksAndZones": "Masks / Zones",
|
"masksAndZones": "Masks / Zones",
|
||||||
"motionTuner": "Motion Tuner",
|
"motionTuner": "Motion Tuner",
|
||||||
"debug": "Debug",
|
"debug": "Debug",
|
||||||
|
|||||||
@ -11,9 +11,9 @@
|
|||||||
"frigatePlus": "Frigate+ 设置 - Frigate"
|
"frigatePlus": "Frigate+ 设置 - Frigate"
|
||||||
},
|
},
|
||||||
"menu": {
|
"menu": {
|
||||||
"uiSettings": "界面设置",
|
"ui": "界面设置",
|
||||||
"classificationSettings": "分类设置",
|
"classification": "分类设置",
|
||||||
"cameraSettings": "摄像头设置",
|
"cameras": "摄像头设置",
|
||||||
"masksAndZones": "遮罩/ 区域",
|
"masksAndZones": "遮罩/ 区域",
|
||||||
"motionTuner": "运动调整器",
|
"motionTuner": "运动调整器",
|
||||||
"debug": "调试",
|
"debug": "调试",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user