from pydantic import BaseModel, Field class BaseBox(BaseModel): class_name: int = Field(..., description="Integers that each show type of box") x_min: float = Field(..., description="X-coordinate of the top-left corner.") y_min: float = Field(..., description="Y-coordinate of the top-left corner.") x_max: float = Field(..., description="X-coordinate of the bottom-right corner.") y_max: float = Field(..., description="Y-coordinate of the bottom-right corner.") confidence: float saved_img_path: str class Config: from_attributes = True