Skip to content

Invoke is a leading creative engine that uses image and video generation models to empower professionals, artists, and enthusiasts to generate and create visual media using the latest AI-driven technologies. The solution offers an industry-leading application interface, and serves as the foundation for multiple commercial products.

455 B
Raw Blame
from pydantic import BaseModel, ConfigDict


class BoundingBox(BaseModel):
    """Bounding box helper class."""

    xmin: int
    ymin: int
    xmax: int
    ymax: int


class DetectionResult(BaseModel):
    """Detection result from Grounding DINO."""

    score: float
    label: str
    box: BoundingBox
    model_config = ConfigDict(
        # Allow arbitrary types for mask, since it will be a numpy array.
        arbitrary_types_allowed=True
    )