worlabel/ai/app/schemas/predict_response.py

23 lines
499 B
Python
Raw Normal View History

from pydantic import BaseModel
from typing import List, Optional, Tuple, Dict
class Shape(BaseModel):
label: str
color: str
points: List[Tuple[float, float]]
group_id: Optional[int] = None
shape_type: str
flags: Dict[str, Optional[bool]] = {}
class LabelData(BaseModel):
version: str
task_type: str
shapes: List[Shape]
split: str
imageHeight: int
imageWidth: int
imageDepth: int
class PredictResponse(BaseModel):
image_id: int
2024-09-23 16:34:07 +09:00
data: str