Open andysingal opened 1 year ago
I thinks it's because you didn't initialized the model Class. This should be working:
from groundingdino.util.inference import Model
GROUNDING_DINO_CONFIG_PATH = "../groundingdino/config/GroundingDINO_SwinT_OGC.py"
GROUNDING_DINO_CHECKPOINT_PATH = "../weights/groundingdino_swint_ogc.pth"
grounding_dino_model = Model(model_config_path=GROUNDING_DINO_CONFIG_PATH, model_checkpoint_path=GROUNDING_DINO_CHECKPOINT_PATH)
detections, phrases = grounding_dino_model.predict_with_caption(
image=image_np,
caption=CAPTION,
box_threshold=BOX_THRESHOLD,
text_threshold=TEXT_THRESHOLD
)
while working on GroundingDINO with SAM here is the notebook: https://colab.research.google.com/drive/1uObAs_PI6caKHhwZRN3mQSzkc3zxrkeR?usp=sharing
giving error:
Looking forward to hearing from you. Thanks