Skip to content

pixano_inference.pydantic.tasks.image.zero_shot_detection

Pydantic models for image zero shot detection task.

ImageZeroShotDetectionInput

Bases: BaseModel

Input for image zero shot detection.

Attributes:

Name Type Description
image str | Path

Image for image zero shot detection.

classes str | list[str]

List of classes to detect.

ImageZeroShotDetectionOutput

Bases: BaseModel

Output for image zero shot detection.

Attributes:

Name Type Description
boxes list[list[int]]

List of boxes detected by the model.

scores list[float]

List of scores detected by the model (higher is better).

classes list[str]

List of class names associated with each box and score.

ImageZeroShotDetectionRequest

Bases: BaseRequest, ImageZeroShotDetectionInput

Request for image zero shot detection.

to_input()

Convert the request to the input.

Source code in pixano_inference/pydantic/tasks/image/zero_shot_detection.py
def to_input(self) -> ImageZeroShotDetectionInput:
    """Convert the request to the input."""
    return self.to_base_model(ImageZeroShotDetectionInput)

ImageZeroShotDetectionResponse

Bases: BaseResponse

Response for image zero shot detection.

Attributes:

Name Type Description
data ImageZeroShotDetectionOutput

Output of the generation.