pixano_inference.impls.transformers.grounding_dino
Grounding DINO zero-shot detection model.
GroundingDINOModel(config)
Bases: DetectionModel
Native Ray Serve model for Grounding DINO zero-shot detection.
model_params contract:
path(str, required): HuggingFace model ID or local checkpoint path.processor_config(dict, optional): Kwargs forAutoProcessor.from_pretrained.config(dict, optional): Kwargs forAutoModelForZeroShotObjectDetection.from_pretrained.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config
|
ModelDeploymentConfig
|
Model deployment configuration. |
required |
Source code in pixano_inference/impls/transformers/grounding_dino.py
metadata
property
Model metadata.
load_model()
Load the Grounding DINO model and processor.
Source code in pixano_inference/impls/transformers/grounding_dino.py
predict(input)
Run zero-shot detection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
input
|
DetectionInput
|
Detection input with image, classes, and thresholds. |
required |
Returns:
| Type | Description |
|---|---|
DetectionOutput
|
Detection output with boxes, scores, and classes. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If |
Source code in pixano_inference/impls/transformers/grounding_dino.py
unload()
Free resources.