-
Notifications
You must be signed in to change notification settings - Fork 64
Open
Description
If I want to locate ‘obj_name’ in a Scannet scene, can the following code work?
text = [clip.tokenize(f'a {obj_name} in a scene').cuda(), clip.tokenize(f'a other in a scene').cuda()]
text_features = clip_pretrained.encode_text(text)
predictions = model(sinput)
predictions = predictions[inds_reverse, :]
pred = predictions.half() @ text_features.t()
logits_pred = torch.max(pred, 1)[1].cpu() # if it's 0 then is the point to be located
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels