from pydantic import BaseModel, Field class Detection(BaseModel): class_name: str = Field(..., example="person") confidence: float = Field(..., example=0.99) xmin: float = Field(..., example=0.1) ymin: float = Field(..., example=0.2) xmax: float = Field(..., example=0.3) ymax: float = Field(..., example=0.4) class Detections(BaseModel): detections: list[Detection] = Field(..., description="List of detections")