mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-05-10 07:25:27 +03:00
Compare commits
3 Commits
722ef6a1fe
...
dc27d4ad16
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dc27d4ad16 | ||
|
|
7708523865 | ||
|
|
aea91a91d5 |
@ -205,14 +205,14 @@ class EmbeddingsContext:
|
||||
)
|
||||
|
||||
def get_face_ids(self, name: str) -> list[str]:
|
||||
sql_query = f"""
|
||||
sql_query = """
|
||||
SELECT
|
||||
id
|
||||
FROM vec_descriptions
|
||||
WHERE id LIKE '%{name}%'
|
||||
WHERE id LIKE ?
|
||||
"""
|
||||
|
||||
return self.db.execute_sql(sql_query).fetchall()
|
||||
return self.db.execute_sql(sql_query, (f"%{name}%",)).fetchall()
|
||||
|
||||
def reprocess_face(self, face_file: str) -> dict[str, Any]:
|
||||
return self.requestor.send_data(
|
||||
|
||||
@ -266,7 +266,7 @@ class Embeddings:
|
||||
)
|
||||
|
||||
duration = datetime.datetime.now().timestamp() - start
|
||||
self.text_inference_speed.update(duration / len(valid_ids))
|
||||
self.image_inference_speed.update(duration / len(valid_ids))
|
||||
|
||||
return embeddings
|
||||
|
||||
|
||||
@ -105,9 +105,9 @@ class PlusApi:
|
||||
|
||||
def upload_image(self, image: ndarray, camera: str) -> str:
|
||||
r = self._get("image/signed_urls")
|
||||
presigned_urls = r.json()
|
||||
if not r.ok:
|
||||
raise Exception("Unable to get signed urls")
|
||||
presigned_urls = r.json()
|
||||
|
||||
# resize and submit original
|
||||
files = {"file": get_jpg_bytes(image, 1920, 85)}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user