weifeng chen commited on
Commit
dfd5e6c
1 Parent(s): 56b40e2

name update

Browse files
Files changed (1) hide show
  1. README.md +6 -6
README.md CHANGED
@@ -32,9 +32,9 @@ import torch
32
  from transformers import BertForSequenceClassification, BertConfig, BertTokenizer
33
  import numpy as np
34
 
35
- # 加载TaiYi 中文 text encoder
36
- text_tokenizer = BertTokenizer.from_pretrained("IDEA-CCNL/TaiYi-CLIP-Roberta-102M-Chinese")
37
- text_encoder = BertForSequenceClassification.from_pretrained("IDEA-CCNL/TaiYi-CLIP-Roberta-102M-Chinese").eval()
38
  text = text_tokenizer(["一只猫", "一只狗",'两只猫', '两只老虎','一只老虎'], return_tensors='pt', padding=True)['input_ids']
39
 
40
  # 加载CLIP的image encoder
@@ -61,14 +61,14 @@ with torch.no_grad():
61
  ### Zero-Shot Classification
62
  | model | dataset | Top1 | Top5 |
63
  | ---- | ---- | ---- | ---- |
64
- | TaiYi-CLIP-ViT-B-32-Roberta-Chinese | ImageNet1k-CN | 41.00% | 69.19% |
65
 
66
  ### Zero-Shot Text-to-Image Retrieval
67
 
68
  | model | dataset | Top1 | Top5 | Top10 |
69
  | ---- | ---- | ---- | ---- | ---- |
70
- | TaiYi-CLIP-ViT-B-32-Roberta-Chinese | COCO-CN | 25.47 % | 51.70% | 63.07% |
71
- | TaiYi-CLIP-ViT-B-32-Roberta-Chinese | wukong50k | 48.67 % | 81.77% | 90.09% |
72
 
73
 
74
  # Citation
 
32
  from transformers import BertForSequenceClassification, BertConfig, BertTokenizer
33
  import numpy as np
34
 
35
+ # 加载Taiyi 中文 text encoder
36
+ text_tokenizer = BertTokenizer.from_pretrained("IDEA-CCNL/Taiyi-CLIP-Roberta-102M-Chinese")
37
+ text_encoder = BertForSequenceClassification.from_pretrained("IDEA-CCNL/Taiyi-CLIP-Roberta-102M-Chinese").eval()
38
  text = text_tokenizer(["一只猫", "一只狗",'两只猫', '两只老虎','一只老虎'], return_tensors='pt', padding=True)['input_ids']
39
 
40
  # 加载CLIP的image encoder
 
61
  ### Zero-Shot Classification
62
  | model | dataset | Top1 | Top5 |
63
  | ---- | ---- | ---- | ---- |
64
+ | Taiyi-CLIP-ViT-B-32-Roberta-Chinese | ImageNet1k-CN | 41.00% | 69.19% |
65
 
66
  ### Zero-Shot Text-to-Image Retrieval
67
 
68
  | model | dataset | Top1 | Top5 | Top10 |
69
  | ---- | ---- | ---- | ---- | ---- |
70
+ | Taiyi-CLIP-ViT-B-32-Roberta-Chinese | COCO-CN | 25.47 % | 51.70% | 63.07% |
71
+ | Taiyi-CLIP-ViT-B-32-Roberta-Chinese | wukong50k | 48.67 % | 81.77% | 90.09% |
72
 
73
 
74
  # Citation