update task error figure

This commit is contained in:
Lorenzo 2021-05-25 15:21:00 +02:00
parent 3167612a32
commit e9f12c5def

View File

@ -125,7 +125,7 @@ def show_spread(dic_stats, clusters, net, dir_fig, show=False, save=False):
def show_task_error(dir_fig, show, save): def show_task_error(dir_fig, show, save):
"""Task error figure""" """Task error figure"""
plt.figure(3, figsize=FIGSIZE) plt.figure(3, figsize=FIGSIZE)
xx = np.linspace(0.1, 50, 100) xx = np.linspace(0.1, 40, 100)
mu_men = 178 mu_men = 178
mu_women = 165 mu_women = 165
mu_child_m = 164 mu_child_m = 164
@ -145,8 +145,9 @@ def show_task_error(dir_fig, show, save):
plt.plot(xx, yy_gender, '--', color='lightgreen', linewidth=2.8, label='Generic adult (task error)') plt.plot(xx, yy_gender, '--', color='lightgreen', linewidth=2.8, label='Generic adult (task error)')
plt.plot(xx, yy_female, '-.', linewidth=1.7, color='darkorange', label='Adult female') plt.plot(xx, yy_female, '-.', linewidth=1.7, color='darkorange', label='Adult female')
plt.plot(xx, yy_male, '-.', linewidth=1.7, color='b', label='Adult male') plt.plot(xx, yy_male, '-.', linewidth=1.7, color='b', label='Adult male')
plt.plot(xx, yy_stereo, linewidth=1.7, color='k', label='Pixel error') # plt.plot(xx, yy_stereo, linewidth=2.5, color='k', label='Pixel error')
plt.xlim(np.min(xx), np.max(xx)) plt.xlim(np.min(xx), np.max(xx))
plt.ylim(0, 5)
plt.xlabel("Ground-truth distance from the camera $d_{gt}$ [m]") plt.xlabel("Ground-truth distance from the camera $d_{gt}$ [m]")
plt.ylabel("Localization error $\hat{e}$ due to human height variation [m]") # pylint: disable=W1401 plt.ylabel("Localization error $\hat{e}$ due to human height variation [m]") # pylint: disable=W1401
plt.legend(loc=(0.01, 0.55)) # Location from 0 to 1 from lower left plt.legend(loc=(0.01, 0.55)) # Location from 0 to 1 from lower left