worlabel/ai/app/schemas/predict_request.py
2024-09-03 15:45:05 +09:00

15 lines
384 B
Python

from pydantic import BaseModel
from typing import List, Optional
class ImageInfo(BaseModel):
image_id: int
image_url: str
class PredictRequest(BaseModel):
project_id: int
image_list: List[ImageInfo]
version: Optional[str] = "latest"
conf_threshold: Optional[float] = 0.25
iou_threshold: Optional[float] = 0.45
classes: Optional[List[int]] = None