mirror of
https://github.com/blakeblackshear/frigate.git
synced 2025-12-06 13:34:13 +03:00
* Implement extraction of images for classification state models * Add object classification dataset preparation * Add first step wizard * Update i18n * Add state classification image selection step * Improve box handling * Add object selector * Improve object cropping implementation * Fix state classification selection * Finalize training and image selection step * Cleanup * Design optimizations * Cleanup mobile styling * Update no models screen * Cleanups and fixes * Fix bugs * Improve model training and creation process * Cleanup * Dynamically add metrics for new model * Add loading when hitting continue * Improve image selection mechanism * Remove unused translation keys * Adjust wording * Add retry button for image generation * Make no models view more specific * Adjust plus icon * Adjust form label * Start with correct type selected * Cleanup sizing and more font colors * Small tweaks * Add tips and more info * Cleanup dialog sizing * Add cursor rule for frontend * Cleanup * remove underline * Lazy loading
32 lines
1006 B
Python
32 lines
1006 B
Python
from typing import Dict, List, Tuple
|
|
|
|
from pydantic import BaseModel, Field
|
|
|
|
|
|
class RenameFaceBody(BaseModel):
|
|
new_name: str = Field(description="New name for the face")
|
|
|
|
|
|
class AudioTranscriptionBody(BaseModel):
|
|
event_id: str = Field(description="ID of the event to transcribe audio for")
|
|
|
|
|
|
class DeleteFaceImagesBody(BaseModel):
|
|
ids: List[str] = Field(
|
|
description="List of image filenames to delete from the face folder"
|
|
)
|
|
|
|
|
|
class GenerateStateExamplesBody(BaseModel):
|
|
model_name: str = Field(description="Name of the classification model")
|
|
cameras: Dict[str, Tuple[float, float, float, float]] = Field(
|
|
description="Dictionary mapping camera names to normalized crop coordinates in [x1, y1, x2, y2] format (values 0-1)"
|
|
)
|
|
|
|
|
|
class GenerateObjectExamplesBody(BaseModel):
|
|
model_name: str = Field(description="Name of the classification model")
|
|
label: str = Field(
|
|
description="Object label to collect examples for (e.g., 'person', 'car')"
|
|
)
|