From b77257479b9a8a23367f28e1bfd64dcbd67bfe0c Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Sat, 10 Sep 2022 22:21:24 +0300 Subject: [PATCH] labels.jpg names fix Partially resolves https://github.com/ultralytics/yolov5/issues/9360 Signed-off-by: Glenn Jocher --- utils/plots.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/plots.py b/utils/plots.py index 0f322b6b5844..0530d0abdf48 100644 --- a/utils/plots.py +++ b/utils/plots.py @@ -364,7 +364,7 @@ def plot_labels(labels, names=(), save_dir=Path('')): ax[0].set_ylabel('instances') if 0 < len(names) < 30: ax[0].set_xticks(range(len(names))) - ax[0].set_xticklabels(names, rotation=90, fontsize=10) + ax[0].set_xticklabels(list(names.values()), rotation=90, fontsize=10) else: ax[0].set_xlabel('classes') sn.histplot(x, x='x', y='y', ax=ax[2], bins=50, pmax=0.9)