| import matplotlib.pyplot as plt |
| import seaborn as sns |
| import pandas as pd |
|
|
| |
| resolution = [336.00, 448.00, 560.00, 672.00, 784.00, 896.00, 1024.00] |
|
|
| |
| roi_thing = { |
| "Resolution": resolution, |
| "CLIPself": [65.90, 69.50, 70.90, 71.70, 72.00, 72.60, 72.30], |
| "RegionCLIP": [66.40, 70.00, 71.20, 72.10, 72.10, 72.00, 71.90], |
| "DeCLIP": [68.90, 72.10, 74.30, 75.20, 75.50, 75.70, 75.40] |
| } |
|
|
| |
| mask_thing = { |
| "Resolution": resolution, |
| "CLIPself": [60.10, 66.00, 69.50, 71.40, 72.70, 74.00, 74.60], |
| "RegionCLIP": [60.60, 66.90, 69.70, 72.50, 73.50, 73.90, 74.70], |
| "DeCLIP": [62.9, 69.0, 72.10, 75.2, 76.3, 77.5, 77.20] |
| } |
|
|
| |
| mask_stuff = { |
| "Resolution": resolution, |
| "CLIPself": [40.80, 43.10, 44.60, 45.40, 45.90, 46.50, 46.90], |
| "RegionCLIP": [28.20, 30.10, 30.30, 31.10, 32.50, 35.00, 34.80], |
| "DeCLIP": [47.4, 50.6, 52.2, 54.0, 54.4, 55.9, 56.0] |
| } |
|
|
| |
| df_roi_thing = pd.DataFrame(roi_thing) |
| df_mask_thing = pd.DataFrame(mask_thing) |
| df_mask_stuff = pd.DataFrame(mask_stuff) |
|
|
| |
| sns.set_style("whitegrid") |
|
|
| |
| color_palette = ['#1f77b4', '#ff7f0e', '#2ca02c'] |
| line_styles = ['--', '--', '--'] |
| markers = ['o', 's', '^'] |
|
|
| |
| plt.rcParams.update({ |
| 'font.size': 10, |
| 'axes.labelsize': 10, |
| 'lines.linewidth': 2.5, |
| 'legend.fontsize': 12, |
| 'xtick.labelsize': 10, |
| 'ytick.labelsize': 10, |
| 'grid.color': 'gray', |
| 'grid.alpha': 0.3, |
| }) |
|
|
| |
| plt.figure(figsize=(4, 3)) |
| plt.plot(df_roi_thing['Resolution'], df_roi_thing['DeCLIP'], linestyle=line_styles[2], marker=markers[2], color=color_palette[2], label='DeCLIP') |
| plt.plot(df_roi_thing['Resolution'], df_roi_thing['CLIPself'], linestyle=line_styles[0], marker=markers[0], color=color_palette[0], label='CLIPself') |
| plt.plot(df_roi_thing['Resolution'], df_roi_thing['RegionCLIP'], linestyle=line_styles[1], marker=markers[1], color=color_palette[1], label='RegionCLIP') |
| plt.xlabel('Resolution') |
| plt.ylabel(' RoI Align (Thing) mAcc') |
| plt.xticks(resolution) |
| plt.grid(True, linestyle='--', color='gray', alpha=0.3) |
| |
| plt.legend(loc='best',fontsize=12,framealpha=0.5) |
| plt.tight_layout() |
| plt.savefig('roi_thing.pdf', dpi=300) |
| plt.close() |
|
|
| |
| plt.figure(figsize=(4, 3)) |
| plt.plot(df_mask_thing['Resolution'], df_mask_thing['DeCLIP'], linestyle=line_styles[2], marker=markers[2], color=color_palette[2], label='DeCLIP') |
| plt.plot(df_mask_thing['Resolution'], df_mask_thing['CLIPself'], linestyle=line_styles[0], marker=markers[0], color=color_palette[0], label='CLIPself') |
| plt.plot(df_mask_thing['Resolution'], df_mask_thing['RegionCLIP'], linestyle=line_styles[1], marker=markers[1], color=color_palette[1], label='RegionCLIP') |
| plt.xlabel('Resolution') |
| plt.ylabel(' Mask Pooling (Thing) mAcc') |
| plt.xticks(resolution) |
| plt.grid(True, linestyle='--', color='gray', alpha=0.3) |
| |
| plt.legend(loc='best',fontsize=12,framealpha=0.5) |
| plt.tight_layout() |
| plt.savefig('mask_thing.pdf', dpi=300) |
| plt.close() |
|
|
| |
| plt.figure(figsize=(4, 3)) |
| plt.plot(df_mask_stuff['Resolution'], df_mask_stuff['DeCLIP'], linestyle=line_styles[2], marker=markers[2], color=color_palette[2], label='DeCLIP') |
| plt.plot(df_mask_stuff['Resolution'], df_mask_stuff['CLIPself'], linestyle=line_styles[0], marker=markers[0], color=color_palette[0], label='CLIPself') |
| plt.plot(df_mask_stuff['Resolution'], df_mask_stuff['RegionCLIP'], linestyle=line_styles[1], marker=markers[1], color=color_palette[1], label='RegionCLIP') |
| plt.xlabel('Resolution') |
| plt.ylabel('Mask Pooling (Stuff) mAcc') |
| plt.xticks(resolution) |
| plt.grid(True, linestyle='--', color='gray', alpha=0.3) |
| |
| plt.legend(loc='best', fontsize=12,framealpha=0.5) |
| plt.tight_layout() |
| plt.savefig('mask_stuff.pdf', dpi=300) |
| plt.close() |