Revert "feat: update GroundingDINO from SwinT (tiny) to SwinB (base)"

This reverts commit 7f3fd8f318.
This commit is contained in:
Manuel Schmid
2024-06-16 23:22:21 +02:00
parent 7f3fd8f318
commit 24d66f6f77
2 changed files with 3 additions and 46 deletions
+3 -3
View File
@@ -14,7 +14,7 @@ from groundingdino.util.inference import load_model, preprocess_caption, get_phr
class GroundingDinoModel(Model):
def __init__(self):
self.config_file = 'extras/GroundingDINO/config/GroundingDINO_SwinB_cfg.py'
self.config_file = 'extras/GroundingDINO/config/GroundingDINO_SwinT_OGC.py'
self.model = None
self.load_device = torch.device('cpu')
self.offload_device = torch.device('cpu')
@@ -28,8 +28,8 @@ class GroundingDinoModel(Model):
) -> Tuple[sv.Detections, torch.Tensor, torch.Tensor, List[str]]:
if self.model is None:
filename = load_file_from_url(
url="https://github.com/IDEA-Research/GroundingDINO/releases/download/v0.1.0-alpha2/groundingdino_swinb_cogcoor.pth",
file_name='groundingdino_swinb_cogcoor.pth',
url="https://github.com/IDEA-Research/GroundingDINO/releases/download/v0.1.0-alpha/groundingdino_swint_ogc.pth",
file_name='groundingdino_swint_ogc.pth',
model_dir=path_inpaint)
model = load_model(model_config_path=self.config_file, model_checkpoint_path=filename)