mirror of
https://github.com/blakeblackshear/frigate.git
synced 2025-07-30 13:48:07 +02:00
Face fixes (#17618)
* Correctly ensure updates are more periodic when lpr or face detection is needed * Cleanup * Update api schema * Don't update for stationary objects * Simplify check * Remove
This commit is contained in:
parent
5d63c58f2c
commit
3d2bfa34c8
552
docs/static/frigate-api.yaml
vendored
552
docs/static/frigate-api.yaml
vendored
@ -161,6 +161,253 @@ paths:
|
|||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/components/schemas/HTTPValidationError"
|
$ref: "#/components/schemas/HTTPValidationError"
|
||||||
|
"/users/{username}/role":
|
||||||
|
put:
|
||||||
|
tags:
|
||||||
|
- Auth
|
||||||
|
summary: Update Role
|
||||||
|
operationId: update_role_users__username__role_put
|
||||||
|
parameters:
|
||||||
|
- name: username
|
||||||
|
in: path
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
title: Username
|
||||||
|
requestBody:
|
||||||
|
required: true
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: "#/components/schemas/AppPutRoleBody"
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: Successful Response
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema: {}
|
||||||
|
"422":
|
||||||
|
description: Validation Error
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: "#/components/schemas/HTTPValidationError"
|
||||||
|
/faces:
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- Events
|
||||||
|
summary: Get Faces
|
||||||
|
operationId: get_faces_faces_get
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: Successful Response
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema: {}
|
||||||
|
/faces/reprocess:
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- Events
|
||||||
|
summary: Reclassify Face
|
||||||
|
operationId: reclassify_face_faces_reprocess_post
|
||||||
|
requestBody:
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
title: Body
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: Successful Response
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema: {}
|
||||||
|
"422":
|
||||||
|
description: Validation Error
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: "#/components/schemas/HTTPValidationError"
|
||||||
|
"/faces/train/{name}/classify":
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- Events
|
||||||
|
summary: Train Face
|
||||||
|
operationId: train_face_faces_train__name__classify_post
|
||||||
|
parameters:
|
||||||
|
- name: name
|
||||||
|
in: path
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
title: Name
|
||||||
|
requestBody:
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
title: Body
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: Successful Response
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema: {}
|
||||||
|
"422":
|
||||||
|
description: Validation Error
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: "#/components/schemas/HTTPValidationError"
|
||||||
|
"/faces/{name}/create":
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- Events
|
||||||
|
summary: Create Face
|
||||||
|
operationId: create_face_faces__name__create_post
|
||||||
|
parameters:
|
||||||
|
- name: name
|
||||||
|
in: path
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
title: Name
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: Successful Response
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema: {}
|
||||||
|
"422":
|
||||||
|
description: Validation Error
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: "#/components/schemas/HTTPValidationError"
|
||||||
|
"/faces/{name}/register":
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- Events
|
||||||
|
summary: Register Face
|
||||||
|
operationId: register_face_faces__name__register_post
|
||||||
|
parameters:
|
||||||
|
- name: name
|
||||||
|
in: path
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
title: Name
|
||||||
|
requestBody:
|
||||||
|
required: true
|
||||||
|
content:
|
||||||
|
multipart/form-data:
|
||||||
|
schema:
|
||||||
|
$ref: >-
|
||||||
|
#/components/schemas/Body_register_face_faces__name__register_post
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: Successful Response
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema: {}
|
||||||
|
"422":
|
||||||
|
description: Validation Error
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: "#/components/schemas/HTTPValidationError"
|
||||||
|
/faces/recognize:
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- Events
|
||||||
|
summary: Recognize Face
|
||||||
|
operationId: recognize_face_faces_recognize_post
|
||||||
|
requestBody:
|
||||||
|
required: true
|
||||||
|
content:
|
||||||
|
multipart/form-data:
|
||||||
|
schema:
|
||||||
|
$ref: "#/components/schemas/Body_recognize_face_faces_recognize_post"
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: Successful Response
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema: {}
|
||||||
|
"422":
|
||||||
|
description: Validation Error
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: "#/components/schemas/HTTPValidationError"
|
||||||
|
"/faces/{name}/delete":
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- Events
|
||||||
|
summary: Deregister Faces
|
||||||
|
operationId: deregister_faces_faces__name__delete_post
|
||||||
|
parameters:
|
||||||
|
- name: name
|
||||||
|
in: path
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
title: Name
|
||||||
|
requestBody:
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
title: Body
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: Successful Response
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema: {}
|
||||||
|
"422":
|
||||||
|
description: Validation Error
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: "#/components/schemas/HTTPValidationError"
|
||||||
|
/lpr/reprocess:
|
||||||
|
put:
|
||||||
|
tags:
|
||||||
|
- Events
|
||||||
|
summary: Reprocess License Plate
|
||||||
|
operationId: reprocess_license_plate_lpr_reprocess_put
|
||||||
|
parameters:
|
||||||
|
- name: event_id
|
||||||
|
in: query
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
title: Event Id
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: Successful Response
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema: {}
|
||||||
|
"422":
|
||||||
|
description: Validation Error
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: "#/components/schemas/HTTPValidationError"
|
||||||
|
/reindex:
|
||||||
|
put:
|
||||||
|
tags:
|
||||||
|
- Events
|
||||||
|
summary: Reindex Embeddings
|
||||||
|
operationId: reindex_embeddings_reindex_put
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: Successful Response
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema: {}
|
||||||
/review:
|
/review:
|
||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
@ -206,9 +453,7 @@ paths:
|
|||||||
in: query
|
in: query
|
||||||
required: false
|
required: false
|
||||||
schema:
|
schema:
|
||||||
allOf:
|
$ref: "#/components/schemas/SeverityEnum"
|
||||||
- $ref: "#/components/schemas/SeverityEnum"
|
|
||||||
title: Severity
|
|
||||||
- name: before
|
- name: before
|
||||||
in: query
|
in: query
|
||||||
required: false
|
required: false
|
||||||
@ -237,6 +482,35 @@ paths:
|
|||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/components/schemas/HTTPValidationError"
|
$ref: "#/components/schemas/HTTPValidationError"
|
||||||
|
/review_ids:
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- Review
|
||||||
|
summary: Review Ids
|
||||||
|
operationId: review_ids_review_ids_get
|
||||||
|
parameters:
|
||||||
|
- name: ids
|
||||||
|
in: query
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
title: Ids
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: Successful Response
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: "#/components/schemas/ReviewSegmentResponse"
|
||||||
|
title: Response Review Ids Review Ids Get
|
||||||
|
"422":
|
||||||
|
description: Validation Error
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: "#/components/schemas/HTTPValidationError"
|
||||||
/review/summary:
|
/review/summary:
|
||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
@ -575,6 +849,19 @@ paths:
|
|||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/components/schemas/HTTPValidationError"
|
$ref: "#/components/schemas/HTTPValidationError"
|
||||||
|
/metrics:
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- App
|
||||||
|
summary: Metrics
|
||||||
|
description: Expose Prometheus metrics endpoint and update metrics with latest stats
|
||||||
|
operationId: metrics_metrics_get
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: Successful Response
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema: {}
|
||||||
/config:
|
/config:
|
||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
@ -731,6 +1018,15 @@ paths:
|
|||||||
- type: string
|
- type: string
|
||||||
- type: "null"
|
- type: "null"
|
||||||
title: Download
|
title: Download
|
||||||
|
- name: stream
|
||||||
|
in: query
|
||||||
|
required: false
|
||||||
|
schema:
|
||||||
|
anyOf:
|
||||||
|
- type: boolean
|
||||||
|
- type: "null"
|
||||||
|
default: false
|
||||||
|
title: Stream
|
||||||
- name: start
|
- name: start
|
||||||
in: query
|
in: query
|
||||||
required: false
|
required: false
|
||||||
@ -825,6 +1121,59 @@ paths:
|
|||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/components/schemas/HTTPValidationError"
|
$ref: "#/components/schemas/HTTPValidationError"
|
||||||
|
/plus/models:
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- App
|
||||||
|
summary: Plusmodels
|
||||||
|
operationId: plusModels_plus_models_get
|
||||||
|
parameters:
|
||||||
|
- name: filterByCurrentModelDetector
|
||||||
|
in: query
|
||||||
|
required: false
|
||||||
|
schema:
|
||||||
|
type: boolean
|
||||||
|
default: false
|
||||||
|
title: Filterbycurrentmodeldetector
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: Successful Response
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema: {}
|
||||||
|
"422":
|
||||||
|
description: Validation Error
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: "#/components/schemas/HTTPValidationError"
|
||||||
|
/recognized_license_plates:
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- App
|
||||||
|
summary: Get Recognized License Plates
|
||||||
|
operationId: get_recognized_license_plates_recognized_license_plates_get
|
||||||
|
parameters:
|
||||||
|
- name: split_joined
|
||||||
|
in: query
|
||||||
|
required: false
|
||||||
|
schema:
|
||||||
|
anyOf:
|
||||||
|
- type: integer
|
||||||
|
- type: "null"
|
||||||
|
title: Split Joined
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: Successful Response
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema: {}
|
||||||
|
"422":
|
||||||
|
description: Validation Error
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: "#/components/schemas/HTTPValidationError"
|
||||||
/timeline:
|
/timeline:
|
||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
@ -1158,12 +1507,12 @@ paths:
|
|||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/components/schemas/HTTPValidationError"
|
$ref: "#/components/schemas/HTTPValidationError"
|
||||||
"/export/{event_id}/{new_name}":
|
"/export/{event_id}/rename":
|
||||||
patch:
|
patch:
|
||||||
tags:
|
tags:
|
||||||
- Export
|
- Export
|
||||||
summary: Export Rename
|
summary: Export Rename
|
||||||
operationId: export_rename_export__event_id___new_name__patch
|
operationId: export_rename_export__event_id__rename_patch
|
||||||
parameters:
|
parameters:
|
||||||
- name: event_id
|
- name: event_id
|
||||||
in: path
|
in: path
|
||||||
@ -1171,12 +1520,12 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
title: Event Id
|
title: Event Id
|
||||||
- name: new_name
|
requestBody:
|
||||||
in: path
|
required: true
|
||||||
required: true
|
content:
|
||||||
schema:
|
application/json:
|
||||||
type: string
|
schema:
|
||||||
title: New Name
|
$ref: "#/components/schemas/ExportRenameBody"
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: Successful Response
|
description: Successful Response
|
||||||
@ -1409,6 +1758,31 @@ paths:
|
|||||||
- type: number
|
- type: number
|
||||||
- type: "null"
|
- type: "null"
|
||||||
title: Max Score
|
title: Max Score
|
||||||
|
- name: min_speed
|
||||||
|
in: query
|
||||||
|
required: false
|
||||||
|
schema:
|
||||||
|
anyOf:
|
||||||
|
- type: number
|
||||||
|
- type: "null"
|
||||||
|
title: Min Speed
|
||||||
|
- name: max_speed
|
||||||
|
in: query
|
||||||
|
required: false
|
||||||
|
schema:
|
||||||
|
anyOf:
|
||||||
|
- type: number
|
||||||
|
- type: "null"
|
||||||
|
title: Max Speed
|
||||||
|
- name: recognized_license_plate
|
||||||
|
in: query
|
||||||
|
required: false
|
||||||
|
schema:
|
||||||
|
anyOf:
|
||||||
|
- type: string
|
||||||
|
- type: "null"
|
||||||
|
default: all
|
||||||
|
title: Recognized License Plate
|
||||||
- name: is_submitted
|
- name: is_submitted
|
||||||
in: query
|
in: query
|
||||||
required: false
|
required: false
|
||||||
@ -1684,6 +2058,31 @@ paths:
|
|||||||
- type: number
|
- type: number
|
||||||
- type: "null"
|
- type: "null"
|
||||||
title: Max Score
|
title: Max Score
|
||||||
|
- name: min_speed
|
||||||
|
in: query
|
||||||
|
required: false
|
||||||
|
schema:
|
||||||
|
anyOf:
|
||||||
|
- type: number
|
||||||
|
- type: "null"
|
||||||
|
title: Min Speed
|
||||||
|
- name: max_speed
|
||||||
|
in: query
|
||||||
|
required: false
|
||||||
|
schema:
|
||||||
|
anyOf:
|
||||||
|
- type: number
|
||||||
|
- type: "null"
|
||||||
|
title: Max Speed
|
||||||
|
- name: recognized_license_plate
|
||||||
|
in: query
|
||||||
|
required: false
|
||||||
|
schema:
|
||||||
|
anyOf:
|
||||||
|
- type: string
|
||||||
|
- type: "null"
|
||||||
|
default: all
|
||||||
|
title: Recognized License Plate
|
||||||
- name: sort
|
- name: sort
|
||||||
in: query
|
in: query
|
||||||
required: false
|
required: false
|
||||||
@ -1867,9 +2266,7 @@ paths:
|
|||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
allOf:
|
$ref: "#/components/schemas/SubmitPlusBody"
|
||||||
- $ref: "#/components/schemas/SubmitPlusBody"
|
|
||||||
title: Body
|
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: Successful Response
|
description: Successful Response
|
||||||
@ -2056,15 +2453,13 @@ paths:
|
|||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
allOf:
|
$ref: "#/components/schemas/EventsCreateBody"
|
||||||
- $ref: "#/components/schemas/EventsCreateBody"
|
|
||||||
default:
|
default:
|
||||||
source_type: api
|
source_type: api
|
||||||
score: 0
|
score: 0
|
||||||
duration: 30
|
duration: 30
|
||||||
include_recording: true
|
include_recording: true
|
||||||
draw: {}
|
draw: {}
|
||||||
title: Body
|
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: Successful Response
|
description: Successful Response
|
||||||
@ -2305,6 +2700,14 @@ paths:
|
|||||||
- type: integer
|
- type: integer
|
||||||
- type: "null"
|
- type: "null"
|
||||||
title: Height
|
title: Height
|
||||||
|
- name: store
|
||||||
|
in: query
|
||||||
|
required: false
|
||||||
|
schema:
|
||||||
|
anyOf:
|
||||||
|
- type: integer
|
||||||
|
- type: "null"
|
||||||
|
title: Store
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: Successful Response
|
description: Successful Response
|
||||||
@ -2407,6 +2810,42 @@ paths:
|
|||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema: {}
|
schema: {}
|
||||||
|
/recordings/summary:
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- Media
|
||||||
|
summary: All Recordings Summary
|
||||||
|
description: Returns true/false by day indicating if recordings exist
|
||||||
|
operationId: all_recordings_summary_recordings_summary_get
|
||||||
|
parameters:
|
||||||
|
- name: timezone
|
||||||
|
in: query
|
||||||
|
required: false
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
default: utc
|
||||||
|
title: Timezone
|
||||||
|
- name: cameras
|
||||||
|
in: query
|
||||||
|
required: false
|
||||||
|
schema:
|
||||||
|
anyOf:
|
||||||
|
- type: string
|
||||||
|
- type: "null"
|
||||||
|
default: all
|
||||||
|
title: Cameras
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: Successful Response
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema: {}
|
||||||
|
"422":
|
||||||
|
description: Validation Error
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: "#/components/schemas/HTTPValidationError"
|
||||||
"/{camera_name}/recordings/summary":
|
"/{camera_name}/recordings/summary":
|
||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
@ -2461,14 +2900,14 @@ paths:
|
|||||||
required: false
|
required: false
|
||||||
schema:
|
schema:
|
||||||
type: number
|
type: number
|
||||||
default: 1733228876.15567
|
default: 1744227965.180043
|
||||||
title: After
|
title: After
|
||||||
- name: before
|
- name: before
|
||||||
in: query
|
in: query
|
||||||
required: false
|
required: false
|
||||||
schema:
|
schema:
|
||||||
type: number
|
type: number
|
||||||
default: 1733232476.15567
|
default: 1744231565.180048
|
||||||
title: Before
|
title: Before
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
@ -2749,12 +3188,12 @@ paths:
|
|||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/components/schemas/HTTPValidationError"
|
$ref: "#/components/schemas/HTTPValidationError"
|
||||||
"/events/{event_id}/thumbnail.jpg":
|
"/events/{event_id}/thumbnail.{extension}":
|
||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
- Media
|
- Media
|
||||||
summary: Event Thumbnail
|
summary: Event Thumbnail
|
||||||
operationId: event_thumbnail_events__event_id__thumbnail_jpg_get
|
operationId: event_thumbnail_events__event_id__thumbnail__extension__get
|
||||||
parameters:
|
parameters:
|
||||||
- name: event_id
|
- name: event_id
|
||||||
in: path
|
in: path
|
||||||
@ -2762,6 +3201,12 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
title: Event Id
|
title: Event Id
|
||||||
|
- name: extension
|
||||||
|
in: path
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
title: Extension
|
||||||
- name: max_cache_age
|
- name: max_cache_age
|
||||||
in: query
|
in: query
|
||||||
required: false
|
required: false
|
||||||
@ -3251,6 +3696,12 @@ components:
|
|||||||
password:
|
password:
|
||||||
type: string
|
type: string
|
||||||
title: Password
|
title: Password
|
||||||
|
role:
|
||||||
|
anyOf:
|
||||||
|
- type: string
|
||||||
|
- type: "null"
|
||||||
|
title: Role
|
||||||
|
default: viewer
|
||||||
type: object
|
type: object
|
||||||
required:
|
required:
|
||||||
- username
|
- username
|
||||||
@ -3265,6 +3716,35 @@ components:
|
|||||||
required:
|
required:
|
||||||
- password
|
- password
|
||||||
title: AppPutPasswordBody
|
title: AppPutPasswordBody
|
||||||
|
AppPutRoleBody:
|
||||||
|
properties:
|
||||||
|
role:
|
||||||
|
type: string
|
||||||
|
title: Role
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- role
|
||||||
|
title: AppPutRoleBody
|
||||||
|
Body_recognize_face_faces_recognize_post:
|
||||||
|
properties:
|
||||||
|
file:
|
||||||
|
type: string
|
||||||
|
format: binary
|
||||||
|
title: File
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- file
|
||||||
|
title: Body_recognize_face_faces_recognize_post
|
||||||
|
Body_register_face_faces__name__register_post:
|
||||||
|
properties:
|
||||||
|
file:
|
||||||
|
type: string
|
||||||
|
format: binary
|
||||||
|
title: File
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- file
|
||||||
|
title: Body_register_face_faces__name__register_post
|
||||||
DayReview:
|
DayReview:
|
||||||
properties:
|
properties:
|
||||||
day:
|
day:
|
||||||
@ -3354,7 +3834,9 @@ components:
|
|||||||
- type: "null"
|
- type: "null"
|
||||||
title: End Time
|
title: End Time
|
||||||
false_positive:
|
false_positive:
|
||||||
type: boolean
|
anyOf:
|
||||||
|
- type: boolean
|
||||||
|
- type: "null"
|
||||||
title: False Positive
|
title: False Positive
|
||||||
zones:
|
zones:
|
||||||
items:
|
items:
|
||||||
@ -3362,7 +3844,9 @@ components:
|
|||||||
type: array
|
type: array
|
||||||
title: Zones
|
title: Zones
|
||||||
thumbnail:
|
thumbnail:
|
||||||
type: string
|
anyOf:
|
||||||
|
- type: string
|
||||||
|
- type: "null"
|
||||||
title: Thumbnail
|
title: Thumbnail
|
||||||
has_clip:
|
has_clip:
|
||||||
type: boolean
|
type: boolean
|
||||||
@ -3394,6 +3878,7 @@ components:
|
|||||||
- type: "null"
|
- type: "null"
|
||||||
title: Model Type
|
title: Model Type
|
||||||
data:
|
data:
|
||||||
|
type: object
|
||||||
title: Data
|
title: Data
|
||||||
type: object
|
type: object
|
||||||
required:
|
required:
|
||||||
@ -3511,6 +3996,11 @@ components:
|
|||||||
exclusiveMinimum: 0
|
exclusiveMinimum: 0
|
||||||
- type: "null"
|
- type: "null"
|
||||||
title: Score for sub label
|
title: Score for sub label
|
||||||
|
camera:
|
||||||
|
anyOf:
|
||||||
|
- type: string
|
||||||
|
- type: "null"
|
||||||
|
title: Camera this object is detected on.
|
||||||
type: object
|
type: object
|
||||||
required:
|
required:
|
||||||
- subLabel
|
- subLabel
|
||||||
@ -3518,13 +4008,11 @@ components:
|
|||||||
ExportRecordingsBody:
|
ExportRecordingsBody:
|
||||||
properties:
|
properties:
|
||||||
playback:
|
playback:
|
||||||
allOf:
|
$ref: "#/components/schemas/PlaybackFactorEnum"
|
||||||
- $ref: "#/components/schemas/PlaybackFactorEnum"
|
|
||||||
title: Playback factor
|
title: Playback factor
|
||||||
default: realtime
|
default: realtime
|
||||||
source:
|
source:
|
||||||
allOf:
|
$ref: "#/components/schemas/PlaybackSourceEnum"
|
||||||
- $ref: "#/components/schemas/PlaybackSourceEnum"
|
|
||||||
title: Playback source
|
title: Playback source
|
||||||
default: recordings
|
default: recordings
|
||||||
name:
|
name:
|
||||||
@ -3536,6 +4024,16 @@ components:
|
|||||||
title: Image Path
|
title: Image Path
|
||||||
type: object
|
type: object
|
||||||
title: ExportRecordingsBody
|
title: ExportRecordingsBody
|
||||||
|
ExportRenameBody:
|
||||||
|
properties:
|
||||||
|
name:
|
||||||
|
type: string
|
||||||
|
maxLength: 256
|
||||||
|
title: Friendly name
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- name
|
||||||
|
title: ExportRenameBody
|
||||||
Extension:
|
Extension:
|
||||||
type: string
|
type: string
|
||||||
enum:
|
enum:
|
||||||
|
@ -250,12 +250,6 @@ def deregister_faces(request: Request, name: str, body: dict = None):
|
|||||||
json: dict[str, any] = body or {}
|
json: dict[str, any] = body or {}
|
||||||
list_of_ids = json.get("ids", "")
|
list_of_ids = json.get("ids", "")
|
||||||
|
|
||||||
if not list_of_ids or len(list_of_ids) == 0:
|
|
||||||
return JSONResponse(
|
|
||||||
content=({"success": False, "message": "Not a valid list of ids"}),
|
|
||||||
status_code=404,
|
|
||||||
)
|
|
||||||
|
|
||||||
context: EmbeddingsContext = request.app.embeddings
|
context: EmbeddingsContext = request.app.embeddings
|
||||||
context.delete_face_ids(
|
context.delete_face_ids(
|
||||||
name, map(lambda file: sanitize_filename(file), list_of_ids)
|
name, map(lambda file: sanitize_filename(file), list_of_ids)
|
||||||
|
@ -53,17 +53,6 @@ class CameraState:
|
|||||||
self.callbacks = defaultdict(list)
|
self.callbacks = defaultdict(list)
|
||||||
self.ptz_autotracker_thread = ptz_autotracker_thread
|
self.ptz_autotracker_thread = ptz_autotracker_thread
|
||||||
self.prev_enabled = self.camera_config.enabled
|
self.prev_enabled = self.camera_config.enabled
|
||||||
self.requires_face_detection = (
|
|
||||||
self.config.face_recognition.enabled
|
|
||||||
and "face" not in self.config.objects.all_objects
|
|
||||||
)
|
|
||||||
|
|
||||||
def get_max_update_frequency(self, obj: TrackedObject) -> int:
|
|
||||||
return (
|
|
||||||
1
|
|
||||||
if self.requires_face_detection and obj.obj_data["label"] == "person"
|
|
||||||
else 5
|
|
||||||
)
|
|
||||||
|
|
||||||
def get_current_frame(self, draw_options: dict[str, Any] = {}):
|
def get_current_frame(self, draw_options: dict[str, Any] = {}):
|
||||||
with self.current_frame_lock:
|
with self.current_frame_lock:
|
||||||
@ -280,8 +269,10 @@ class CameraState:
|
|||||||
|
|
||||||
for id in updated_ids:
|
for id in updated_ids:
|
||||||
updated_obj = tracked_objects[id]
|
updated_obj = tracked_objects[id]
|
||||||
thumb_update, significant_update, autotracker_update = updated_obj.update(
|
thumb_update, significant_update, path_update, autotracker_update = (
|
||||||
frame_time, current_detections[id], current_frame is not None
|
updated_obj.update(
|
||||||
|
frame_time, current_detections[id], current_frame is not None
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
if autotracker_update or significant_update:
|
if autotracker_update or significant_update:
|
||||||
@ -298,14 +289,18 @@ class CameraState:
|
|||||||
|
|
||||||
updated_obj.last_updated = frame_time
|
updated_obj.last_updated = frame_time
|
||||||
|
|
||||||
# if it has been more than max_update_frequency seconds since the last thumb update
|
# if it has been more than 5 seconds since the last thumb update
|
||||||
# and the last update is greater than the last publish or
|
# and the last update is greater than the last publish or
|
||||||
# the object has changed significantly
|
# the object has changed significantly or
|
||||||
|
# the object moved enough to update the path
|
||||||
if (
|
if (
|
||||||
frame_time - updated_obj.last_published
|
(
|
||||||
> self.get_max_update_frequency(updated_obj)
|
frame_time - updated_obj.last_published > 5
|
||||||
and updated_obj.last_updated > updated_obj.last_published
|
and updated_obj.last_updated > updated_obj.last_published
|
||||||
) or significant_update:
|
)
|
||||||
|
or significant_update
|
||||||
|
or path_update
|
||||||
|
):
|
||||||
# call event handlers
|
# call event handlers
|
||||||
for c in self.callbacks["update"]:
|
for c in self.callbacks["update"]:
|
||||||
c(self.name, updated_obj, frame_name)
|
c(self.name, updated_obj, frame_name)
|
||||||
|
@ -117,6 +117,7 @@ class TrackedObject:
|
|||||||
def update(self, current_frame_time: float, obj_data, has_valid_frame: bool):
|
def update(self, current_frame_time: float, obj_data, has_valid_frame: bool):
|
||||||
thumb_update = False
|
thumb_update = False
|
||||||
significant_change = False
|
significant_change = False
|
||||||
|
path_update = False
|
||||||
autotracker_update = False
|
autotracker_update = False
|
||||||
# if the object is not in the current frame, add a 0.0 to the score history
|
# if the object is not in the current frame, add a 0.0 to the score history
|
||||||
if obj_data["frame_time"] != current_frame_time:
|
if obj_data["frame_time"] != current_frame_time:
|
||||||
@ -324,19 +325,21 @@ class TrackedObject:
|
|||||||
|
|
||||||
if not self.path_data:
|
if not self.path_data:
|
||||||
self.path_data.append((bottom_center, obj_data["frame_time"]))
|
self.path_data.append((bottom_center, obj_data["frame_time"]))
|
||||||
|
path_update = True
|
||||||
elif (
|
elif (
|
||||||
math.dist(self.path_data[-1][0], bottom_center) >= threshold
|
math.dist(self.path_data[-1][0], bottom_center) >= threshold
|
||||||
or len(self.path_data) == 1
|
or len(self.path_data) == 1
|
||||||
):
|
):
|
||||||
# check Euclidean distance before appending
|
# check Euclidean distance before appending
|
||||||
self.path_data.append((bottom_center, obj_data["frame_time"]))
|
self.path_data.append((bottom_center, obj_data["frame_time"]))
|
||||||
|
path_update = True
|
||||||
logger.debug(
|
logger.debug(
|
||||||
f"Point tracking: {obj_data['id']}, {bottom_center}, {obj_data['frame_time']}"
|
f"Point tracking: {obj_data['id']}, {bottom_center}, {obj_data['frame_time']}"
|
||||||
)
|
)
|
||||||
|
|
||||||
self.obj_data.update(obj_data)
|
self.obj_data.update(obj_data)
|
||||||
self.current_zones = current_zones
|
self.current_zones = current_zones
|
||||||
return (thumb_update, significant_change, autotracker_update)
|
return (thumb_update, significant_change, path_update, autotracker_update)
|
||||||
|
|
||||||
def to_dict(self):
|
def to_dict(self):
|
||||||
event = {
|
event = {
|
||||||
|
Loading…
Reference in New Issue
Block a user