Grounding DINO
Python config
Deploy Grounding DINO for zero-shot object detection:
from pixano_inference.configs import DeploymentConfig, GroundingDINOParams, ModelConfig
models = [
ModelConfig(
name="grounding-dino",
model_class="GroundingDINOModel",
model_params=GroundingDINOParams(path="IDEA-Research/grounding-dino-tiny"),
deployment=DeploymentConfig(num_gpus=1),
)
]
Start the server
Connect the client
from pixano_inference.client import PixanoInferenceClient
client = PixanoInferenceClient.connect(url="http://localhost:7463")
Prepare the request
from pixano_inference.schemas import DetectionRequest
request = DetectionRequest(
model="grounding-dino",
classes=["a cat", "a remote control"],
box_threshold=0.3,
text_threshold=0.2,
image="http://images.cocodataset.org/val2017/000000039769.jpg",
)