mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-15 15:45:27 +03:00
Use webp images
This commit is contained in:
parent
e3cc943b0d
commit
7c3f842fb9
@ -244,7 +244,7 @@ class Embeddings:
|
||||
|
||||
# write face to library
|
||||
folder = os.path.join(FACE_DIR, label)
|
||||
file = os.path.join(folder, f"{id}.jpg")
|
||||
file = os.path.join(folder, f"{id}.webp")
|
||||
os.makedirs(folder, exist_ok=True)
|
||||
|
||||
# save face image
|
||||
|
||||
@ -336,7 +336,7 @@ class EmbeddingMaintainer(threading.Thread):
|
||||
face_frame = cv2.cvtColor(frame, cv2.COLOR_YUV2BGR_I420)
|
||||
face_frame = face_frame[face_box[1] : face_box[3], face_box[0] : face_box[2]]
|
||||
ret, jpg = cv2.imencode(
|
||||
".jpg", face_frame, [int(cv2.IMWRITE_JPEG_QUALITY), 100]
|
||||
".webp", face_frame, [int(cv2.IMWRITE_WEBP_QUALITY), 100]
|
||||
)
|
||||
|
||||
if not ret:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user