mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-10-02 04:46:50 +03:00
Face tweaks (#17290)
* Ensure doesn't fail due to missing dir * Remove redundant settings from tabs * Adjust selection method for mobile * Fix button descendent error * Ensure train is option on mobile * Cleanup face images * Cleanup
This commit is contained in:
@@ -30,6 +30,9 @@ router = APIRouter(tags=[Tags.events])
|
||||
def get_faces():
|
||||
face_dict: dict[str, list[str]] = {}
|
||||
|
||||
if not os.path.exists(FACE_DIR):
|
||||
return JSONResponse(status_code=200, content={})
|
||||
|
||||
for name in os.listdir(FACE_DIR):
|
||||
face_dir = os.path.join(FACE_DIR, name)
|
||||
|
||||
|
||||
@@ -506,6 +506,7 @@ class FaceRealTimeProcessor(RealTimeProcessorApi):
|
||||
if self.config.face_recognition.save_attempts:
|
||||
# write face to library
|
||||
folder = os.path.join(FACE_DIR, "train")
|
||||
os.makedirs(folder, exist_ok=True)
|
||||
new_file = os.path.join(
|
||||
folder, f"{id}-{sub_label}-{score}-{face_score}.webp"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user