You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
text = ["A photo of a cat", "A photo of a dog"]
tokenized_text = yolo_model.backbone.text_model.tokenizer(text, padding=True, return_tensors="pt")
text_features = yolo_model.backbone.text_model(**tokenized_text)
from mmdet.apis import init_detector
config_file = "/content/drive/MyDrive/yoloword/yolo_world_l_dual_vlpan_l2norm_2e-3_100e_4x8gpus_obj365v1_goldg_train_lvis_minival.py"
checkpoint_file = "/content/drive/MyDrive/yoloword/yolo_world_l_clip_base_dual_vlpan_2e-3adamw_32xb16_100e_o365_goldg_train_pretrained-0e566235.pth"
yolo_model = init_detector(config_file, checkpoint_file, device='cuda:0')
text = ["A photo of a cat", "A photo of a dog"]
tokenized_text = yolo_model.backbone.text_model.tokenizer(text, padding=True, return_tensors="pt")
text_features = yolo_model.backbone.text_model(**tokenized_text)
print(text_features)
/content/drive/MyDrive/yoloword/third_party/mmyolo/configs/yolov8/yolov8_l_syncbn_fast_8xb16-500e_coco.py in
13 print(last_stage_out_channels)
14
---> 15 pre_transform = base.pre_transform
16 mosaic_affine_transform = base.mosaic_affine_transform
17 last_transform = base.last_transform
AttributeError: 'str' object has no attribute 'pre_transform'
The text was updated successfully, but these errors were encountered: