xinyu1205 commited on
Commit
d7dce5e
1 Parent(s): 47dec7d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -18,7 +18,7 @@ normalize = transforms.Normalize(mean=[0.485, 0.456, 0.406],
18
  transform = transforms.Compose([transforms.Resize((image_size, image_size)),transforms.ToTensor(),normalize])
19
 
20
  #######Tag2Text Model
21
- pretrained = '/home/notebook/data/group/huangxinyu/pretrain_model/tag2text/tag2text_swin_14m.pth'
22
 
23
  model_tag2text = tag2text_caption(pretrained=pretrained, image_size=image_size, vit='swin_b' )
24
 
@@ -26,8 +26,8 @@ model_tag2text.eval()
26
  model_tag2text = model_tag2text.to(device)
27
 
28
 
29
- #######Swin Version
30
- pretrained = '/home/notebook/code/personal/S9049611/tag2text-v2/output/pretrain_tag2text_large_v2_14m_large_v14/new_coco_ori_finetune_384_v5_epoch03/checkpoint_01.pth'
31
 
32
  model_ram = ram(pretrained=pretrained, image_size=image_size, vit='swin_l' )
33
 
 
18
  transform = transforms.Compose([transforms.Resize((image_size, image_size)),transforms.ToTensor(),normalize])
19
 
20
  #######Tag2Text Model
21
+ pretrained = 'tag2text_swin_14m.pth'
22
 
23
  model_tag2text = tag2text_caption(pretrained=pretrained, image_size=image_size, vit='swin_b' )
24
 
 
26
  model_tag2text = model_tag2text.to(device)
27
 
28
 
29
+ #######RAM Model
30
+ pretrained = 'ram_swin_large_14m.pth'
31
 
32
  model_ram = ram(pretrained=pretrained, image_size=image_size, vit='swin_l' )
33