| import matplotlib.pyplot as plt |
| import seaborn as sns |
|
|
| |
| data_size = ["30K", "60K", "120K", "240K", "480K"] |
| avg_segmentation_MIoU = [37.05, 41.7, 42.0, 41.9, 41.8] |
| |
| coco_distill_avg_segmentation_MIoU = [None, None, 41.9, None, None] |
|
|
| |
| sns.set_style("whitegrid") |
|
|
| |
| color_palette = ['#1f77b4', '#ff7f0e', '#2ca02c'] |
| line_styles = ['--', '-.', ':'] |
| markers = ['o', 's', 'D'] |
|
|
| |
| plt.rcParams.update({ |
| 'font.size': 10, |
| 'axes.labelsize': 10, |
| 'lines.linewidth': 2.0, |
| 'legend.fontsize': 8, |
| 'xtick.labelsize': 8, |
| 'ytick.labelsize': 8, |
| 'grid.color': 'gray', |
| 'grid.alpha': 0.3, |
| }) |
|
|
| |
| plt.figure(figsize=(4, 2)) |
| plt.plot(data_size, avg_segmentation_MIoU, linestyle=line_styles[0], marker=markers[0], color=color_palette[0], label='Avg mIoU (CC3M Distillation)') |
|
|
| |
| plt.scatter( |
| data_size, |
| coco_distill_avg_segmentation_MIoU, |
| edgecolor='red', |
| facecolor='none', |
| marker=markers[2], |
| s=50, |
| linewidths=2, |
| label='Avg mIoU (COCO Distillation)', |
| zorder=5 |
| ) |
|
|
| |
| plt.xlabel('Data Size (sample from CC3M)', labelpad=0) |
| plt.ylabel('Performance (ViT-B)', labelpad=0) |
| plt.grid(True, linestyle='--', color='gray', alpha=0.3) |
| plt.legend(loc='best', fontsize=10) |
| plt.tight_layout() |
| plt.savefig('data_size_metrics.pdf', dpi=300) |
| plt.close() |