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