Spaces:
Sleeping
Sleeping
More printing for debugging purposes
Browse files
models/GroundingDINO/groundingdino.py
CHANGED
@@ -409,6 +409,7 @@ class GroundingDINO(nn.Module):
|
|
409 |
samples.device
|
410 |
)
|
411 |
|
|
|
412 |
one_hot_token = tokenized
|
413 |
|
414 |
(
|
@@ -444,6 +445,7 @@ class GroundingDINO(nn.Module):
|
|
444 |
|
445 |
bert_output = self.bert(**tokenized_for_encoder) # bs, 195, 768
|
446 |
|
|
|
447 |
encoded_text = self.feat_map(
|
448 |
bert_output["last_hidden_state"]
|
449 |
) # bs, 195, d_model
|
@@ -492,6 +494,8 @@ class GroundingDINO(nn.Module):
|
|
492 |
else:
|
493 |
exemplar_tokens = None
|
494 |
|
|
|
|
|
495 |
else:
|
496 |
features, poss = self.backbone(samples)
|
497 |
(h, w) = (
|
@@ -597,6 +601,8 @@ class GroundingDINO(nn.Module):
|
|
597 |
srcs, masks, input_query_bbox, poss, input_query_label, attn_mask, text_dict
|
598 |
)
|
599 |
|
|
|
|
|
600 |
# deformable-detr-like anchor update
|
601 |
outputs_coord_list = []
|
602 |
for dec_lid, (layer_ref_sig, layer_bbox_embed, layer_hs) in enumerate(
|
|
|
409 |
samples.device
|
410 |
)
|
411 |
|
412 |
+
print("tokenized text")
|
413 |
one_hot_token = tokenized
|
414 |
|
415 |
(
|
|
|
445 |
|
446 |
bert_output = self.bert(**tokenized_for_encoder) # bs, 195, 768
|
447 |
|
448 |
+
print("got bert output")
|
449 |
encoded_text = self.feat_map(
|
450 |
bert_output["last_hidden_state"]
|
451 |
) # bs, 195, d_model
|
|
|
494 |
else:
|
495 |
exemplar_tokens = None
|
496 |
|
497 |
+
print("got visual exemplar tokens")
|
498 |
+
|
499 |
else:
|
500 |
features, poss = self.backbone(samples)
|
501 |
(h, w) = (
|
|
|
601 |
srcs, masks, input_query_bbox, poss, input_query_label, attn_mask, text_dict
|
602 |
)
|
603 |
|
604 |
+
print("passed info through transformer")
|
605 |
+
|
606 |
# deformable-detr-like anchor update
|
607 |
outputs_coord_list = []
|
608 |
for dec_lid, (layer_ref_sig, layer_bbox_embed, layer_hs) in enumerate(
|