| import matplotlib.pyplot as plt |
| import numpy as np |
|
|
| |
| layers = ["3", "6", "9", "12"] |
| segmentation_MIoU = [39.58625, 43.8675, 43.6925, 44.1] |
| detection_ap = [31.4, 35.6, 39.5, 43.3] |
|
|
| |
| curve_configs = [ |
| { |
| "label": "Avg. mIoU", |
| "color": "#2077b4", |
| "marker": "o", |
| "linestyle": "--", |
| "linewidth": 3, |
| "markersize": 9, |
| "zorder": 3, |
| }, |
| { |
| "label": "mAP (Novel)", |
| "color": "#ff7f0e", |
| "marker": "s", |
| "linestyle": "--", |
| "linewidth": 3, |
| "markersize": 9, |
| "zorder": 2, |
| }, |
| ] |
|
|
| plt.figure(figsize=(4, 3)) |
|
|
| |
| plt.plot( |
| layers, segmentation_MIoU, |
| label=curve_configs[0]["label"], |
| linestyle=curve_configs[0]["linestyle"], |
| marker=curve_configs[0]["marker"], |
| color=curve_configs[0]["color"], |
| linewidth=curve_configs[0]["linewidth"], |
| markersize=curve_configs[0]["markersize"], |
| zorder=curve_configs[0]["zorder"], |
| ) |
| plt.plot( |
| layers, detection_ap, |
| label=curve_configs[1]["label"], |
| linestyle=curve_configs[1]["linestyle"], |
| marker=curve_configs[1]["marker"], |
| color=curve_configs[1]["color"], |
| linewidth=curve_configs[1]["linewidth"], |
| markersize=curve_configs[1]["markersize"], |
| zorder=curve_configs[1]["zorder"], |
| ) |
|
|
| |
| |
| plt.grid(True, linestyle='--', alpha=0.6) |
| |
| plt.tick_params(axis='x', labelsize=14) |
| plt.tick_params(axis='y', labelsize=12) |
| plt.tight_layout() |
|
|
| plt.legend(fontsize=14, loc='best') |
| plt.savefig("layers_effect.pdf", dpi=300) |
| plt.close() |