Spaces:
Sleeping
Sleeping
File size: 446 Bytes
65aa0cb |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
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")
|