init
This commit is contained in:
610
make_pic.py
Normal file
610
make_pic.py
Normal file
@@ -0,0 +1,610 @@
|
||||
import matplotlib
|
||||
import numpy as np
|
||||
from matplotlib import pyplot as plt
|
||||
|
||||
# matplotlib画图中中文显示会有问题,需要这两行设置默认字体.没中文可以去掉
|
||||
plt.rcParams['font.sans-serif']=['SimHei']
|
||||
plt.rcParams['axes.unicode_minus'] = False
|
||||
|
||||
# 设置figure_size尺寸
|
||||
# plt.rcParams['figure.figsize'] = (22.0, 22.0)
|
||||
plt.rcParams['figure.figsize'] = (5.0,5.0)
|
||||
fig = plt.figure()
|
||||
|
||||
# 设定图表颜色
|
||||
fig.set(alpha=0.2)
|
||||
#fig.suptitle('suptitle', fontsize=24, x=0.6,y=0.9, horizontalalignment='left', va='bottom')
|
||||
|
||||
# 输入数据
|
||||
# plt.subplot2grid((4,3),(0,0))
|
||||
# #Average over 11 datasets
|
||||
# y_imagenet_cacfc=[65.2671,68.2012,72.0107,75.2106,77.7047]
|
||||
#
|
||||
# y_imagenet_CoOp=[59.5882,62.3236,66.7664,69.8918,73.4251]
|
||||
#
|
||||
# y_clip_adapter=[62.6745,65.5527,68.6055,71.3964,74.4436]
|
||||
#
|
||||
#
|
||||
# y_tip_adapter=[62.3282,64.6182,66.5327,68.4955,70.3182]
|
||||
#
|
||||
# y_tip_adapter_f=[63.2982,65.93913,68.9836,72.1573,75.1346]
|
||||
# y_clip=[58.9627]
|
||||
# x=[1,2,4,8,16]
|
||||
# x_zero=[0]
|
||||
|
||||
|
||||
#数据及线属性
|
||||
#cacfc
|
||||
# plt.plot(x,y_imagenet_cacfc, color='r', linestyle='-', marker='*', linewidth=1,label='Our')
|
||||
# #CoOp
|
||||
# plt.plot(x,y_imagenet_CoOp, color='#4169E1', linestyle='-', marker='*', linewidth=1,label='CoOp')
|
||||
# #clip_adapter
|
||||
# plt.plot(x,y_clip_adapter, color='g', linestyle='-', marker='*', linewidth=1,label='CLIP-Adapter')
|
||||
#
|
||||
# #tip_adapter
|
||||
# plt.plot(x,y_tip_adapter, color='cyan', linestyle='-', marker='*', linewidth=1,label='Tip-Adapter')
|
||||
#
|
||||
# #clip_adapter_f
|
||||
# plt.plot(x,y_tip_adapter_f, color='orange', linestyle='-', marker='*', linewidth=1,label='Tip-Adapter-F')
|
||||
# #clip
|
||||
# plt.plot(x_zero,y_clip, color='mediumpurple', linestyle='-', marker='*', linewidth=1,label='Zero-shot CLIP')
|
||||
# #clip_adapter
|
||||
#
|
||||
# plt.grid(linestyle="--")
|
||||
# # 修改坐标轴字体及大小
|
||||
# plt.yticks(fontproperties='Times New Roman', size=14)#设置大小及加粗
|
||||
# plt.xticks(fontproperties='Times New Roman', size=14)
|
||||
# #标题设置
|
||||
# plt.title('Average over 11 datasets',fontproperties='Times New Roman', fontsize=15,fontweight='bold')
|
||||
# plt.xlabel('Number of labeled training examples per class',fontproperties='Times New Roman', fontsize=12)
|
||||
# plt.ylabel('Score(%)',fontproperties='Times New Roman')
|
||||
# plt.legend(loc='lower right',prop={'family' : 'Times New Roman', 'size': 13})
|
||||
# # 添加标签
|
||||
# plt.annotate('Zero-shot\n CLIP', xy=(x_zero[0], y_clip[0]), xytext=(x_zero[0]+0.3, y_clip[0]-0.9),
|
||||
# ha='center', fontproperties='Times New Roman', fontsize=10, color='mediumpurple')
|
||||
# plt.savefig("Average.png", dpi=600)
|
||||
# #
|
||||
#
|
||||
# # 输入数据
|
||||
# plt.subplot2grid((4,3),(0,1))
|
||||
#
|
||||
# # #caltech101
|
||||
# y_imagenet_cacfc=[89.4523,90.34482574,91.88641357,92.08924866,93.7931034482758]
|
||||
# y_imagenet_CoOp=[87.53,87.93,89.55,90.21,91.83]
|
||||
# y_clip_adapter=[88.6,89.37,89.98,91.4,92.49]
|
||||
#
|
||||
# y_tip_adapter=[87.18,88.44,89.39,89.83,90.18]
|
||||
# y_tip_adapter_f=[87.9,89.4,90.78,91.1,92.28]
|
||||
# y_clip=[86.29]
|
||||
# x=[1,2,4,8,16]
|
||||
# x_zero=[0]
|
||||
#
|
||||
# # 数据及线属性
|
||||
# # cacfc
|
||||
# plt.plot(x,y_imagenet_cacfc, color='r', linestyle='-', marker='*', linewidth=1,label='Our')
|
||||
# #CoOp
|
||||
# plt.plot(x,y_imagenet_CoOp, color='#4169E1', linestyle='-', marker='*', linewidth=1,label='CoOp')
|
||||
# #clip_adapter
|
||||
# plt.plot(x,y_clip_adapter, color='g', linestyle='-', marker='*', linewidth=1,label='CLIP-Adapter')
|
||||
# #tip_adapter
|
||||
# plt.plot(x,y_tip_adapter, color='cyan', linestyle='-', marker='*', linewidth=1,label='Tip-Adapter')
|
||||
# #ctip_adapter_f
|
||||
# plt.plot(x,y_tip_adapter_f, color='orange', linestyle='-', marker='*', linewidth=1,label='Tip-Adapter-F')
|
||||
# #clip
|
||||
# plt.plot(x_zero,y_clip, color='mediumpurple', linestyle='-', marker='*', linewidth=1,label='Zero-shot CLIP')
|
||||
# #clip_adapter
|
||||
#
|
||||
# plt.grid(linestyle="--")
|
||||
# # 修改坐标轴字体及大小
|
||||
# plt.yticks(fontproperties='Times New Roman', size=14)#设置大小及加粗
|
||||
# plt.xticks(fontproperties='Times New Roman', size=14)
|
||||
# #标题设置
|
||||
# plt.title('Caltech101',fontproperties='Times New Roman', fontsize=15)
|
||||
# plt.xlabel('Number of labeled training examples per class',fontproperties='Times New Roman', fontsize=12)
|
||||
# plt.ylabel('Score(%)',fontproperties='Times New Roman')
|
||||
# # plt.legend(loc='lower right',prop={'family' : 'Times New Roman', 'size': 13})
|
||||
# # 添加标签
|
||||
# plt.annotate('Zero-shot\n CLIP', xy=(x_zero[0], y_clip[0]), xytext=(x_zero[0]+0.3, y_clip[0]-0.9),
|
||||
# ha='center', fontproperties='Times New Roman', fontsize=10, color='mediumpurple')
|
||||
# plt.savefig("Caltech101.png", dpi=600)
|
||||
# #
|
||||
# # # 输入数据
|
||||
# # plt.subplot2grid((4,3),(0,2))
|
||||
# # #
|
||||
# y_imagenet_cacfc=[46.2765957435535,52.1867612202962,61.7612293144208,66.1938533918232,68.7943262230983]
|
||||
#
|
||||
# y_imagenet_CoOp=[44.39,45.15,53.49,59.97,63.58]
|
||||
#
|
||||
# y_clip_adapter=[45.8,51.48,56.86,61,65.96]
|
||||
#
|
||||
# y_tip_adapter=[46.22,49.47,53.96,58.63,60.93]
|
||||
#
|
||||
# y_tip_adapter_f=[48.58,51.64,57.21,61.92,66.23]
|
||||
#
|
||||
# y_clip=[42.32]
|
||||
# x=[1,2,4,8,16]
|
||||
# x_zero=[0]
|
||||
#
|
||||
# #数据及线属性
|
||||
# #cacfc
|
||||
# plt.plot(x,y_imagenet_cacfc, color='r', linestyle='-', marker='*', linewidth=1,label='Our')
|
||||
# #CoOp
|
||||
# plt.plot(x,y_imagenet_CoOp, color='#4169E1', linestyle='-', marker='*', linewidth=1,label='CoOp')
|
||||
# #clip_adapter
|
||||
# plt.plot(x,y_clip_adapter, color='g', linestyle='-', marker='*', linewidth=1,label='CLIP-Adapter')
|
||||
# #Tip_adapter
|
||||
# plt.plot(x,y_tip_adapter, color='cyan', linestyle='-', marker='*', linewidth=1,label='Tip-Adapter')
|
||||
# #Tip_adapter_f
|
||||
# plt.plot(x,y_tip_adapter_f, color='orange', linestyle='-', marker='*', linewidth=1,label='Tip-Adapter-F')
|
||||
# #clip
|
||||
# plt.plot(x_zero,y_clip, color='mediumpurple', linestyle='-', marker='*', linewidth=1,label='Zero-shot CLIP')
|
||||
# #clip_adapter
|
||||
#
|
||||
# plt.grid(linestyle="--")
|
||||
# # 修改坐标轴字体及大小
|
||||
# plt.yticks(fontproperties='Times New Roman', size=14)#设置大小及加粗
|
||||
# plt.xticks(fontproperties='Times New Roman', size=14)
|
||||
# #标题设置
|
||||
# plt.title('DTD',fontproperties='Times New Roman', fontsize=15)
|
||||
# plt.xlabel('Number of labeled training examples per class',fontproperties='Times New Roman', fontsize=12)
|
||||
# plt.ylabel('Score(%)',fontproperties='Times New Roman')
|
||||
# # plt.legend(loc='lower right',prop={'family' : 'Times New Roman', 'size': 13})
|
||||
# # 添加标签
|
||||
# plt.annotate('Zero-shot\n CLIP', xy=(x_zero[0], y_clip[0]), xytext=(x_zero[0]+0.3, y_clip[0]-0.9),
|
||||
# ha='center', fontproperties='Times New Roman', fontsize=10, color='mediumpurple')
|
||||
# plt.savefig("DTD.png", dpi=600)
|
||||
# #
|
||||
# # # 输入数据
|
||||
# # plt.subplot2grid((4,3),(1,0))
|
||||
# # #EuroSAT
|
||||
# y_imagenet_cacfc=[57.4074073998722,66.40987654,77.95061493,83.9012,84.1716049232012]
|
||||
#
|
||||
# y_imagenet_CoOp=[50.63,61.5,70.18,76.73,83.53]
|
||||
#
|
||||
# y_clip_adapter=[61.4,63.9,73.38,77.93,84.43]
|
||||
#
|
||||
# y_tip_adapter=[54.38,61.68,65.32,67.95,70.54]
|
||||
#
|
||||
# y_tip_adapter_f=[51.81,66.32,69.23,77.69,81.96]
|
||||
#
|
||||
# y_clip=[37.56]
|
||||
# x=[1,2,4,8,16]
|
||||
# x_zero=[0]
|
||||
#
|
||||
# #数据及线属性
|
||||
# #cacfc
|
||||
# plt.plot(x,y_imagenet_cacfc, color='r', linestyle='-', marker='*', linewidth=1,label='Our')
|
||||
# #CoOp
|
||||
# plt.plot(x,y_imagenet_CoOp, color='#4169E1', linestyle='-', marker='*', linewidth=1,label='CoOp')
|
||||
# #clip_adapter
|
||||
# plt.plot(x,y_clip_adapter, color='g', linestyle='-', marker='*', linewidth=1,label='CLIP-Adapter')
|
||||
#
|
||||
# #Tip_adapter
|
||||
# plt.plot(x,y_tip_adapter, color='cyan', linestyle='-', marker='*', linewidth=1,label='Tip-Adapter')
|
||||
# #Tip_adapter_f
|
||||
# plt.plot(x,y_tip_adapter_f, color='orange', linestyle='-', marker='*', linewidth=1,label='Tip-Adapter-F')
|
||||
# #clip
|
||||
# plt.plot(x_zero,y_clip, color='mediumpurple', linestyle='-', marker='*', linewidth=1,label='Zero-shot CLIP')
|
||||
# #clip_adapter
|
||||
#
|
||||
# plt.grid(linestyle="--")
|
||||
# # 修改坐标轴字体及大小
|
||||
# plt.yticks(fontproperties='Times New Roman', size=14)#设置大小及加粗
|
||||
# plt.xticks(fontproperties='Times New Roman', size=14)
|
||||
# #标题设置
|
||||
# plt.title('EuroSAT',fontproperties='Times New Roman', fontsize=15)
|
||||
# plt.xlabel('Number of labeled training examples per class',fontproperties='Times New Roman', fontsize=12)
|
||||
# plt.ylabel('Score(%)',fontproperties='Times New Roman')
|
||||
# # plt.legend(loc='lower right',prop={'family' : 'Times New Roman', 'size': 13})
|
||||
# # 添加标签
|
||||
# plt.annotate('Zero-shot\n CLIP', xy=(x_zero[0], y_clip[0]), xytext=(x_zero[0]+0.3, y_clip[0]-0.9),
|
||||
# ha='center', fontproperties='Times New Roman', fontsize=10, color='mediumpurple')
|
||||
# plt.savefig("EuroSAT.png", dpi=600)
|
||||
# #
|
||||
# # # 输入数据
|
||||
# # plt.subplot2grid((4,3),(1,1))
|
||||
# # #FGVCAircraft
|
||||
# y_imagenet_cacfc=[22.5322532653808,24.4824482448244,28.0828075408935,34.2634239196777,41.3441344134413]
|
||||
#
|
||||
# y_imagenet_CoOp=[9.64,18.68,21.87,26.13,31.26]
|
||||
#
|
||||
# y_clip_adapter=[17.49,20.1,22.59,26.25,32.1]
|
||||
#
|
||||
# y_tip_adapter=[19.05,21.2,22.41,25.59,29.76]
|
||||
#
|
||||
# y_tip_adapter_f=[20.06,21.17,24.97,28.13,34.83]
|
||||
#
|
||||
# y_clip=[17.28]
|
||||
# x=[1,2,4,8,16]
|
||||
# x_zero=[0]
|
||||
#
|
||||
# #数据及线属性
|
||||
# #cacfc
|
||||
# plt.plot(x,y_imagenet_cacfc, color='r', linestyle='-', marker='*', linewidth=1,label='Our')
|
||||
# #CoOp
|
||||
# plt.plot(x,y_imagenet_CoOp, color='#4169E1', linestyle='-', marker='*', linewidth=1,label='CoOp')
|
||||
# #clip_adapter
|
||||
# plt.plot(x,y_clip_adapter, color='g', linestyle='-', marker='*', linewidth=1,label='CLIP-Adapter')
|
||||
#
|
||||
# #Tip_adapter
|
||||
# plt.plot(x,y_tip_adapter, color='cyan', linestyle='-', marker='*', linewidth=1,label='Tip-Adapter')
|
||||
#
|
||||
# #Tip_adapter_f
|
||||
# plt.plot(x,y_tip_adapter_f, color='orange', linestyle='-', marker='*', linewidth=1,label='Tip-Adapter-F')
|
||||
# #clip
|
||||
# plt.plot(x_zero,y_clip, color='mediumpurple', linestyle='-', marker='*', linewidth=1,label='Zero-shot CLIP')
|
||||
# #clip_adapter
|
||||
#
|
||||
# plt.grid(linestyle="--")
|
||||
# # 修改坐标轴字体及大小
|
||||
# plt.yticks(fontproperties='Times New Roman', size=14)#设置大小及加粗
|
||||
# plt.xticks(fontproperties='Times New Roman', size=14)
|
||||
# #标题设置
|
||||
# plt.title('FGVCAircraft',fontproperties='Times New Roman', fontsize=15)
|
||||
# plt.xlabel('Number of labeled training examples per class',fontproperties='Times New Roman', fontsize=12)
|
||||
# plt.ylabel('Score(%)',fontproperties='Times New Roman')
|
||||
# # plt.legend(loc='lower right',prop={'family' : 'Times New Roman', 'size': 13})
|
||||
# # 添加标签
|
||||
# plt.annotate('Zero-shot\n CLIP', xy=(x_zero[0], y_clip[0]), xytext=(x_zero[0]+0.3, y_clip[0]-0.9),
|
||||
# ha='center', fontproperties='Times New Roman', fontsize=10, color='mediumpurple')
|
||||
# plt.savefig("FGVCAircraft.png", dpi=600)
|
||||
# #
|
||||
# #
|
||||
# # # 输入数据
|
||||
# # plt.subplot2grid((4,3),(1,2))
|
||||
# # #Flowers102
|
||||
# y_imagenet_cacfc=[80.8769836425781,87.7791366577148,93.26025390625,95.8181076049804,96.9955368041992]
|
||||
#
|
||||
# y_imagenet_CoOp=[68.12,77.51,86.2,91.18,94.51]
|
||||
#
|
||||
# y_clip_adapter=[73.49,81.61,87.17,91.72,93.9]
|
||||
#
|
||||
# y_tip_adapter=[73.12,79.13,83.8,87.98,89.89]
|
||||
#
|
||||
# y_tip_adapter_f=[76.7,79.5,89,92.4,93.9]
|
||||
#
|
||||
# y_clip=[66.14]
|
||||
# x=[1,2,4,8,16]
|
||||
# x_zero=[0]
|
||||
#
|
||||
# 73.49
|
||||
# 81.61
|
||||
# 87.17
|
||||
# 91.72
|
||||
# 93.90
|
||||
#
|
||||
# #数据及线属性
|
||||
# #cacfc
|
||||
# plt.plot(x,y_imagenet_cacfc, color='r', linestyle='-', marker='*', linewidth=1,label='Our')
|
||||
# #CoOp
|
||||
# plt.plot(x,y_imagenet_CoOp, color='#4169E1', linestyle='-', marker='*', linewidth=1,label='CoOp')
|
||||
# #clip_adapter
|
||||
# plt.plot(x,y_clip_adapter, color='g', linestyle='-', marker='*', linewidth=1,label='CLIP-Adapter')
|
||||
#
|
||||
# #Tip_adapter
|
||||
# plt.plot(x,y_tip_adapter, color='cyan', linestyle='-', marker='*', linewidth=1,label='Tip-Adapter')
|
||||
#
|
||||
# #Tip_adapter_f
|
||||
# plt.plot(x,y_tip_adapter_f, color='orange', linestyle='-', marker='*', linewidth=1,label='Tip-Adapter-F')
|
||||
# #clip
|
||||
# plt.plot(x_zero,y_clip, color='mediumpurple', linestyle='-', marker='*', linewidth=1,label='Zero-shot CLIP')
|
||||
# #clip_adapter
|
||||
#
|
||||
# plt.grid(linestyle="--")
|
||||
# # 修改坐标轴字体及大小
|
||||
# plt.yticks(fontproperties='Times New Roman', size=14)#设置大小及加粗
|
||||
# plt.xticks(fontproperties='Times New Roman', size=14)
|
||||
# #标题设置
|
||||
# plt.title('Flowers102',fontproperties='Times New Roman', fontsize=15)
|
||||
# plt.xlabel('Number of labeled training examples per class',fontproperties='Times New Roman', fontsize=12)
|
||||
# plt.ylabel('Score(%)',fontproperties='Times New Roman')
|
||||
# plt.legend(loc='lower right',prop={'family' : 'Times New Roman', 'size': 13})
|
||||
# # 添加标签
|
||||
# plt.annotate('Zero-shot\n CLIP', xy=(x_zero[0], y_clip[0]), xytext=(x_zero[0]+0.3, y_clip[0]-0.9),
|
||||
# ha='center', fontproperties='Times New Roman', fontsize=10, color='mediumpurple')
|
||||
# plt.savefig("Flowers102.png", dpi=600)
|
||||
# #
|
||||
# #
|
||||
# # # 输入数据
|
||||
# # plt.subplot2grid((4,3),(2,0))
|
||||
# # #Food101
|
||||
# y_imagenet_cacfc=[78.171617161716,78.3366336633663,78.4983498349835,78.5544554455445,79.399339931979]
|
||||
#
|
||||
# y_imagenet_CoOp=[74.32,72.49,73.33,71.82,74.67]
|
||||
#
|
||||
# y_clip_adapter=[76.82,77.22,77.92,78.04,78.25]
|
||||
#
|
||||
# y_tip_adapter=[77.42,77.52,77.54,77.76,77.83]
|
||||
#
|
||||
# y_tip_adapter_f=[77.27,77.44,77.2,78.36,79.05]
|
||||
#
|
||||
# y_clip=[77.31]
|
||||
# x=[1,2,4,8,16]
|
||||
# x_zero=[0]
|
||||
#
|
||||
# #数据及线属性
|
||||
# #cacfc
|
||||
# plt.plot(x,y_imagenet_cacfc, color='r', linestyle='-', marker='*', linewidth=1,label='Our')
|
||||
# #CoOp
|
||||
# plt.plot(x,y_imagenet_CoOp, color='#4169E1', linestyle='-', marker='*', linewidth=1,label='CoOp')
|
||||
# #clip_adapter
|
||||
# plt.plot(x,y_clip_adapter, color='g', linestyle='-', marker='*', linewidth=1,label='CLIP-Adapter')
|
||||
#
|
||||
# #Tip_adapter
|
||||
# plt.plot(x,y_tip_adapter, color='cyan', linestyle='-', marker='*', linewidth=1,label='Tip-Adapter')
|
||||
# #Tip_adapter_f
|
||||
# plt.plot(x,y_tip_adapter_f, color='orange', linestyle='-', marker='*', linewidth=1,label='Tip-Adapter-F')
|
||||
# #clip
|
||||
# plt.plot(x_zero,y_clip, color='mediumpurple', linestyle='-', marker='*', linewidth=1,label='Zero-shot CLIP')
|
||||
# #clip_adapter
|
||||
#
|
||||
# plt.grid(linestyle="--")
|
||||
# # 修改坐标轴字体及大小
|
||||
# plt.yticks(fontproperties='Times New Roman', size=14)#设置大小及加粗
|
||||
# plt.xticks(fontproperties='Times New Roman', size=14)
|
||||
# #标题设置
|
||||
# plt.title('Food101',fontproperties='Times New Roman', fontsize=15)
|
||||
# plt.xlabel('Number of labeled training examples per class',fontproperties='Times New Roman', fontsize=12)
|
||||
# plt.ylabel('Score(%)',fontproperties='Times New Roman')
|
||||
# plt.legend(loc='lower right',prop={'family' : 'Times New Roman', 'size': 13})
|
||||
# # 添加标签
|
||||
# plt.annotate('Zero-shot\n CLIP', xy=(x_zero[0], y_clip[0]), xytext=(x_zero[0]+0.3, y_clip[0]-0.9),
|
||||
# ha='center', fontproperties='Times New Roman', fontsize=10, color='mediumpurple')
|
||||
# plt.savefig("Food101.png", dpi=600)
|
||||
# #
|
||||
# #
|
||||
# #
|
||||
# # # 输入数据
|
||||
# # plt.subplot2grid((4,3),(2,1))
|
||||
# # #imagenet
|
||||
# y_imagenet_cacfc=[61.408,61.826,62.91,64.544,66.086]
|
||||
# y_imagenet_CoOp=[57.15,57.81,59.99,61.56,62.95]
|
||||
# y_clip_adapter=[61.2,61.52,61.84,62.68,63.59]
|
||||
#
|
||||
# y_tip_adapter=[60.7,60.96,60.98,61.45,62.03]
|
||||
# y_tip_adapter_f=[61.32,61.69,62.52,64,65.51]
|
||||
# y_clip=[60.33]
|
||||
# x=[1,2,4,8,16]
|
||||
# x_zero=[0]
|
||||
#
|
||||
# #数据及线属性
|
||||
# #cacfc
|
||||
# plt.plot(x,y_imagenet_cacfc, color='r', linestyle='-', marker='*', linewidth=1,label='Our')
|
||||
# #CoOp
|
||||
# plt.plot(x,y_imagenet_CoOp, color='#4169E1', linestyle='-', marker='*', linewidth=1,label='CoOp')
|
||||
# #clip_adapter
|
||||
# plt.plot(x,y_clip_adapter, color='g', linestyle='-', marker='*', linewidth=1,label='CLIP-Adapter')
|
||||
#
|
||||
# #tip_adapter
|
||||
# plt.plot(x,y_tip_adapter, color='cyan', linestyle='-', marker='*', linewidth=1,label='Tip-Adapter')
|
||||
#
|
||||
# #clip_adapter_f
|
||||
# plt.plot(x,y_tip_adapter_f, color='orange', linestyle='-', marker='*', linewidth=1,label='Tip-Adapter-F')
|
||||
# #clip
|
||||
# plt.plot(x_zero,y_clip, color='mediumpurple', linestyle='-', marker='*', linewidth=1,label='Zero-shot CLIP')
|
||||
# #clip_adapter
|
||||
#
|
||||
# plt.grid(linestyle="--")
|
||||
# # 修改坐标轴字体及大小
|
||||
# plt.yticks(fontproperties='Times New Roman', size=14)#设置大小及加粗
|
||||
# plt.xticks(fontproperties='Times New Roman', size=14)
|
||||
# #标题设置
|
||||
# plt.title('ImageNet',fontproperties='Times New Roman', fontsize=15)
|
||||
# plt.xlabel('Number of labeled training examples per class',fontproperties='Times New Roman', fontsize=12)
|
||||
# plt.ylabel('Score(%)',fontproperties='Times New Roman')
|
||||
# plt.legend(loc='lower right',prop={'family' : 'Times New Roman', 'size': 13})
|
||||
# # 添加标签
|
||||
# plt.annotate('Zero-shot\n CLIP', xy=(x_zero[0], y_clip[0]), xytext=(x_zero[0]+0.3, y_clip[0]-0.9),
|
||||
# ha='center', fontproperties='Times New Roman', fontsize=10, color='mediumpurple')
|
||||
# plt.savefig("ImageNet.png", dpi=600)
|
||||
#
|
||||
#
|
||||
#
|
||||
# # 输入数据
|
||||
# # plt.subplot2grid((4,3),(2,2))
|
||||
# #OxfordPets
|
||||
# y_imagenet_cacfc=[85.9089670105895,86.7538838816715,88.4982223510742,88.9615698996601,89.8609975366184]
|
||||
#
|
||||
# y_imagenet_CoOp=[85.89,82.64,86.7,85.32,87.01]
|
||||
#
|
||||
# y_clip_adapter=[85.99,86.73,87.46,87.65,87.84]
|
||||
#
|
||||
# y_tip_adapter=[86.1,87.03,86.45,87.03,88.14]
|
||||
#
|
||||
# y_tip_adapter_f=[86.44,86.44,87,88.11,89.13]
|
||||
#
|
||||
# y_clip=[85.77]
|
||||
# x=[1,2,4,8,16]
|
||||
# x_zero=[0]
|
||||
#
|
||||
#
|
||||
# #数据及线属性
|
||||
# #cacfc
|
||||
# plt.plot(x,y_imagenet_cacfc, color='r', linestyle='-', marker='*', linewidth=1,label='Our')
|
||||
# #CoOp
|
||||
# plt.plot(x,y_imagenet_CoOp, color='#4169E1', linestyle='-', marker='*', linewidth=1,label='CoOp')
|
||||
# #clip_adapter
|
||||
# plt.plot(x,y_clip_adapter, color='g', linestyle='-', marker='*', linewidth=1,label='CLIP-Adapter')
|
||||
# #Tip_adapter
|
||||
# plt.plot(x,y_tip_adapter, color='cyan', linestyle='-', marker='*', linewidth=1,label='Tip-Adapter')
|
||||
# #Tip_adapter_f
|
||||
# plt.plot(x,y_tip_adapter_f, color='orange', linestyle='-', marker='*', linewidth=1,label='Tip-Adapter-F')
|
||||
# #clip
|
||||
# plt.plot(x_zero,y_clip, color='mediumpurple', linestyle='-', marker='*', linewidth=1,label='Zero-shot CLIP')
|
||||
# #clip_adapter
|
||||
#
|
||||
# plt.grid(linestyle="--")
|
||||
# # 修改坐标轴字体及大小
|
||||
# plt.yticks(fontproperties='Times New Roman', size=14)#设置大小及加粗
|
||||
# plt.xticks(fontproperties='Times New Roman', size=14)
|
||||
# #标题设置
|
||||
# plt.title('OxfordPets',fontproperties='Times New Roman', fontsize=15)
|
||||
# plt.xlabel('Number of labeled training examples per class',fontproperties='Times New Roman', fontsize=12)
|
||||
# plt.ylabel('Score(%)',fontproperties='Times New Roman')
|
||||
# plt.legend(loc='lower right',prop={'family' : 'Times New Roman', 'size': 13})
|
||||
# # 添加标签
|
||||
# plt.annotate('Zero-shot\n CLIP', xy=(x_zero[0], y_clip[0]), xytext=(x_zero[0]+0.3, y_clip[0]-0.9),
|
||||
# ha='center', fontproperties='Times New Roman', fontsize=10, color='mediumpurple')
|
||||
# plt.savefig("OxfordPets.png", dpi=600)
|
||||
# #
|
||||
# # # 输入数据
|
||||
# # plt.subplot2grid((4,3),(3,0))
|
||||
# # #StanfordCars
|
||||
# y_imagenet_cacfc=[59.7686854973166,62.1191394252276,66.2977241665076,73.3490859440733,79.5423454964966]
|
||||
#
|
||||
# y_imagenet_CoOp=[55.59,58.28,62.62,68.43,73.3659]
|
||||
#
|
||||
# y_clip_adapter=[55.13,58.74,62.45,67.89,74.01]
|
||||
#
|
||||
# y_tip_adapter=[57.54,57.93,61.45,62.93,66.77]
|
||||
#
|
||||
# y_tip_adapter_f=[58.42,61.06,64.54,69.32,75.08]
|
||||
#
|
||||
# y_clip=[55.61]
|
||||
# x=[1,2,4,8,16]
|
||||
# x_zero=[0]
|
||||
#
|
||||
# 55.13
|
||||
# 58.74
|
||||
# 62.45
|
||||
# 67.89
|
||||
# 74.01
|
||||
# #数据及线属性
|
||||
# #cacfc
|
||||
# plt.plot(x,y_imagenet_cacfc, color='r', linestyle='-', marker='*', linewidth=1,label='Our')
|
||||
# #CoOp
|
||||
# plt.plot(x,y_imagenet_CoOp, color='#4169E1', linestyle='-', marker='*', linewidth=1,label='CoOp')
|
||||
# #clip_adapter
|
||||
# plt.plot(x,y_clip_adapter, color='g', linestyle='-', marker='*', linewidth=1,label='CLIP-Adapter')
|
||||
#
|
||||
# #Tip_adapter
|
||||
# plt.plot(x,y_tip_adapter, color='cyan', linestyle='-', marker='*', linewidth=1,label='Tip-Adapter')
|
||||
# #Tip_adapter_f
|
||||
# plt.plot(x,y_tip_adapter_f, color='orange', linestyle='-', marker='*', linewidth=1,label='Tip-Adapter-F')
|
||||
# #clip
|
||||
# plt.plot(x_zero,y_clip, color='mediumpurple', linestyle='-', marker='*', linewidth=1,label='Zero-shot CLIP')
|
||||
# #clip_adapter
|
||||
#
|
||||
# plt.grid(linestyle="--")
|
||||
# # 修改坐标轴字体及大小
|
||||
# plt.yticks(fontproperties='Times New Roman', size=14)#设置大小及加粗
|
||||
# plt.xticks(fontproperties='Times New Roman', size=14)
|
||||
# #标题设置
|
||||
# plt.title('StanfordCars',fontproperties='Times New Roman', fontsize=15)
|
||||
# plt.xlabel('Number of labeled training examples per class',fontproperties='Times New Roman', fontsize=12)
|
||||
# plt.ylabel('Score(%)',fontproperties='Times New Roman')
|
||||
# plt.legend(loc='lower right',prop={'family' : 'Times New Roman', 'size': 13})
|
||||
# # 添加标签
|
||||
# plt.annotate('Zero-shot\n CLIP', xy=(x_zero[0], y_clip[0]), xytext=(x_zero[0]+0.3, y_clip[0]-0.9),
|
||||
# ha='center', fontproperties='Times New Roman', fontsize=10, color='mediumpurple')
|
||||
# plt.savefig("StanfordCars.png", dpi=600)
|
||||
# #
|
||||
# #
|
||||
# #
|
||||
# # # 输入数据
|
||||
# # plt.subplot2grid((4,3),(3,1))
|
||||
# # #SUN397
|
||||
# y_imagenet_cacfc=[63.4156171284634,65.2443324937027,68.1259445843828,70.1,72.6851385390428]
|
||||
#
|
||||
# y_imagenet_CoOp=[60.29,59.48,63.47,65.52,69.26]
|
||||
#
|
||||
# y_clip_adapter=[61.3,63.29,65.96,67.5,69.55]
|
||||
#
|
||||
# y_tip_adapter=[61.3,62.7,64.1,65.62,66.85]
|
||||
#
|
||||
# y_tip_adapter_f=[62.4,63.22,65.75,68.28,71.27]
|
||||
#
|
||||
# y_clip=[58.52]
|
||||
# x=[1,2,4,8,16]
|
||||
# x_zero=[0]
|
||||
# 61.30
|
||||
# 63.29
|
||||
# 65.96
|
||||
# 67.50
|
||||
# 69.55
|
||||
# #数据及线属性
|
||||
# #cacfc
|
||||
# plt.plot(x,y_imagenet_cacfc, color='r', linestyle='-', marker='*', linewidth=1,label='Our')
|
||||
# #CoOp
|
||||
# plt.plot(x,y_imagenet_CoOp, color='#4169E1', linestyle='-', marker='*', linewidth=1,label='CoOp')
|
||||
# #clip_adapter
|
||||
# plt.plot(x,y_clip_adapter, color='g', linestyle='-', marker='*', linewidth=1,label='CLIP-Adapter')
|
||||
# #Tip_adapter
|
||||
# plt.plot(x,y_tip_adapter, color='cyan', linestyle='-', marker='*', linewidth=1,label='Tip-Adapter')
|
||||
# #Tip_adapter_f
|
||||
# plt.plot(x,y_tip_adapter_f, color='orange', linestyle='-', marker='*', linewidth=1,label='Tip-Adapter-F')
|
||||
# #clip
|
||||
# plt.plot(x_zero,y_clip, color='mediumpurple', linestyle='-', marker='*', linewidth=1,label='Zero-shot CLIP')
|
||||
# #clip_adapter
|
||||
#
|
||||
# plt.grid(linestyle="--")
|
||||
# # 修改坐标轴字体及大小
|
||||
# plt.yticks(fontproperties='Times New Roman', size=14)#设置大小及加粗
|
||||
# plt.xticks(fontproperties='Times New Roman', size=14)
|
||||
# #标题设置
|
||||
# plt.title('SUN397',fontproperties='Times New Roman', fontsize=15)
|
||||
# plt.xlabel('Number of labeled training examples per class',fontproperties='Times New Roman', fontsize=12)
|
||||
# plt.ylabel('Score(%)',fontproperties='Times New Roman')
|
||||
# plt.legend(loc='lower right',prop={'family' : 'Times New Roman', 'size': 13})
|
||||
# # 添加标签
|
||||
# plt.annotate('Zero-shot\n CLIP', xy=(x_zero[0], y_clip[0]), xytext=(x_zero[0]+0.3, y_clip[0]-0.9),
|
||||
# ha='center', fontproperties='Times New Roman', fontsize=10, color='mediumpurple')
|
||||
# plt.savefig("SUN397.png", dpi=600)
|
||||
# #
|
||||
# #
|
||||
# #
|
||||
# #
|
||||
# #
|
||||
# #
|
||||
# # # 输入数据
|
||||
# # plt.subplot2grid((4,3),(3,2))
|
||||
# # #UCF101
|
||||
y_imagenet_cacfc=[67.4596880782447,71.2661895751953,74.4911445982708,77.768966428256,82.0777160978304]
|
||||
|
||||
y_imagenet_CoOp=[61.92,64.09,67.03,71.94,75.71]
|
||||
|
||||
y_clip_adapter=[62.2,67.12,69.05,73.3,76.76]
|
||||
|
||||
y_tip_adapter=[62.6,64.74,66.46,68.68,70.58]
|
||||
|
||||
y_tip_adapter_f=[65.38,67.45,71.17,74.42,77.24]
|
||||
|
||||
y_clip=[61.46]
|
||||
x=[1,2,4,8,16]
|
||||
x_zero=[0]
|
||||
62.20
|
||||
67.12
|
||||
69.05
|
||||
73.30
|
||||
76.76
|
||||
#数据及线属性
|
||||
#cacfc
|
||||
plt.plot(x,y_imagenet_cacfc, color='r', linestyle='-', marker='*', linewidth=1,label='Our')
|
||||
#CoOp
|
||||
plt.plot(x,y_imagenet_CoOp, color='#4169E1', linestyle='-', marker='*', linewidth=1,label='CoOp')
|
||||
#clip_adapter
|
||||
plt.plot(x,y_clip_adapter, color='g', linestyle='-', marker='*', linewidth=1,label='CLIP-Adapter')
|
||||
#Tip_adapter
|
||||
plt.plot(x,y_tip_adapter, color='cyan', linestyle='-', marker='*', linewidth=1,label='Tip-Adapter')
|
||||
#Tip_adapter_f
|
||||
plt.plot(x,y_tip_adapter_f, color='orange', linestyle='-', marker='*', linewidth=1,label='Tip-Adapter-F')
|
||||
#clip
|
||||
plt.plot(x_zero,y_clip, color='mediumpurple', linestyle='-', marker='*', linewidth=1,label='Zero-shot CLIP')
|
||||
#clip_adapter
|
||||
|
||||
plt.grid(linestyle="--")
|
||||
# 修改坐标轴字体及大小
|
||||
plt.yticks(fontproperties='Times New Roman', size=14)#设置大小及加粗
|
||||
plt.xticks(fontproperties='Times New Roman', size=14)
|
||||
#标题设置
|
||||
plt.title('UCF101',fontproperties='Times New Roman', fontsize=15)
|
||||
plt.xlabel('Number of labeled training examples per class',fontproperties='Times New Roman', fontsize=12)
|
||||
plt.ylabel('Score(%)',fontproperties='Times New Roman')
|
||||
# plt.legend(loc='lower right',prop={'family' : 'Times New Roman', 'size': 13})
|
||||
# 添加标签
|
||||
plt.annotate('Zero-shot\n CLIP', xy=(x_zero[0], y_clip[0]), xytext=(x_zero[0]+0.3, y_clip[0]-0.9),
|
||||
ha='center', fontproperties='Times New Roman', fontsize=10, color='mediumpurple')
|
||||
plt.savefig("UCF101.png", dpi=600)
|
||||
# #
|
||||
# # plt.savefig("result.png", dpi=600)
|
||||
# # plt.show()
|
||||
Reference in New Issue
Block a user