initial commit, add backend poster analysis
This commit is contained in:
commit
6f10e387ad
15 files changed
+1147
No files matched your search
@@ -0,0 +1,32 @@
|
||||
"""detect 단계 VLM 응답 스키마.
|
||||
|
||||
strict structured output 제약: 전 필드 required, 없을 수 있는 값은 `| None`.
|
||||
좌표 단위는 격자 눈금 퍼센트(0~100)다 — 정규화 좌표는 후처리에서 만든다.
|
||||
"""
|
||||
from typing import Literal
|
||||
|
||||
from pydantic import BaseModel
|
||||
|
||||
|
||||
class GridBox(BaseModel):
|
||||
x0: int
|
||||
y0: int
|
||||
x1: int
|
||||
y1: int
|
||||
text: str | None
|
||||
|
||||
|
||||
class FocalAnswer(BaseModel):
|
||||
name: str
|
||||
x: int
|
||||
y: int
|
||||
|
||||
|
||||
class DetectAnswer(BaseModel):
|
||||
festival_name: str
|
||||
title: GridBox | None
|
||||
datetime: GridBox | None
|
||||
place: GridBox | None
|
||||
logo: GridBox | None
|
||||
title_style: Literal["calligraphy", "typeset"]
|
||||
focal_points: list[FocalAnswer]
|
||||
Reference in new issue
Block a user