File size: 1,201 Bytes
7e3773e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import matplotlib.pyplot as plt

data_size = ["30K", "60K", "120K", "240K", "480K"]
avg_segmentation_MIoU = [38.99, 43.88, 44.20, 44.1, 43.99]
coco_distill_avg_segmentation_MIoU = [None, None, 44.1, None, None]

colors = ['#2077b4', '#d62728']
markers = ['o', 'D']
linestyle = '--'

plt.figure(figsize=(4, 3))   # 压缩高度

plt.plot(
    data_size, avg_segmentation_MIoU,
    label="Avg mIoU (CC3M)",
    linestyle=linestyle,
    marker=markers[0],
    color=colors[0],
    linewidth=4,
    markersize=8,
    zorder=3,
)

for idx, y in enumerate(coco_distill_avg_segmentation_MIoU):
    if y is not None:
        plt.scatter(
            data_size[idx], y,
            label="Avg mIoU (COCO)" if idx == 2 else "",
            marker=markers[1],
            s=120,
            facecolors='none',
            edgecolors=colors[1],
            linewidths=2.5,
            zorder=5,
        )

plt.ylim(38, 45)  # 压缩y轴区间
plt.grid(True, linestyle='--', alpha=0.6)
plt.tick_params(axis='x', labelsize=14)  # x轴刻度大
plt.tick_params(axis='y', labelsize=12)  # y轴刻度不变
plt.tight_layout()
plt.legend(fontsize=16, loc='lower right')
plt.savefig('data_size.pdf', dpi=300)
plt.close()