Update eval/grounded_sam/grounded_sam2_florence2_autolabel_pipeline.py
Browse files
eval/grounded_sam/grounded_sam2_florence2_autolabel_pipeline.py
CHANGED
@@ -64,11 +64,11 @@ class FlorenceSAM:
|
|
64 |
SAM2_CONFIG = "configs/sam2.1/sam2.1_hiera_l.yaml"
|
65 |
|
66 |
self.florence2_model = Florence2ForConditionalGeneration.from_pretrained(
|
67 |
-
FLORENCE2_MODEL_ID,
|
68 |
torch_dtype=self.torch_dtype,
|
69 |
).eval().to(self.device)
|
70 |
self.florence2_processor = Florence2Processor.from_pretrained(
|
71 |
-
FLORENCE2_MODEL_ID,
|
72 |
)
|
73 |
sam2_model = build_sam2(SAM2_CONFIG, SAM2_CHECKPOINT, device=self.device)
|
74 |
self.sam2_predictor = SAM2ImagePredictor(sam2_model)
|
|
|
64 |
SAM2_CONFIG = "configs/sam2.1/sam2.1_hiera_l.yaml"
|
65 |
|
66 |
self.florence2_model = Florence2ForConditionalGeneration.from_pretrained(
|
67 |
+
FLORENCE2_MODEL_ID, trust_remote_code=True,
|
68 |
torch_dtype=self.torch_dtype,
|
69 |
).eval().to(self.device)
|
70 |
self.florence2_processor = Florence2Processor.from_pretrained(
|
71 |
+
FLORENCE2_MODEL_ID, trust_remote_code=True
|
72 |
)
|
73 |
sam2_model = build_sam2(SAM2_CONFIG, SAM2_CHECKPOINT, device=self.device)
|
74 |
self.sam2_predictor = SAM2ImagePredictor(sam2_model)
|