Test fix for #11 (#12)

This commit is contained in:
Piotr Skalski
2023-03-28 03:39:44 +02:00
committed by GitHub
parent 858efccbad
commit c974f60d73
3 changed files with 8 additions and 21 deletions

View File

@@ -108,7 +108,7 @@ def get_grounding_output(model, image, caption, box_threshold, text_threshold, w
# build pred
pred_phrases = []
for logit, box in zip(logits_filt, boxes_filt):
pred_phrase = get_phrases_from_posmap(logit > text_threshold, tokenized, caption)
pred_phrase = get_phrases_from_posmap(logit > text_threshold, tokenized, tokenlizer)
if with_logits:
pred_phrases.append(pred_phrase + f"({str(logit.max().item())[:4]})")
else: