Update plots.py (#5127)
Browse files- utils/plots.py +2 -2
utils/plots.py
CHANGED
@@ -264,7 +264,7 @@ def plot_val_study(file='', dir='', x=None): # from utils.plots import *; plot_
|
|
264 |
ax = plt.subplots(2, 4, figsize=(10, 6), tight_layout=True)[1].ravel()
|
265 |
|
266 |
fig2, ax2 = plt.subplots(1, 1, figsize=(8, 4), tight_layout=True)
|
267 |
-
# for f in [
|
268 |
for f in sorted(save_dir.glob('study*.txt')):
|
269 |
y = np.loadtxt(f, dtype=np.float32, usecols=[0, 1, 2, 3, 7, 8, 9], ndmin=2).T
|
270 |
x = np.arange(y.shape[1]) if x is None else np.array(x)
|
@@ -284,7 +284,7 @@ def plot_val_study(file='', dir='', x=None): # from utils.plots import *; plot_
|
|
284 |
ax2.grid(alpha=0.2)
|
285 |
ax2.set_yticks(np.arange(20, 60, 5))
|
286 |
ax2.set_xlim(0, 57)
|
287 |
-
ax2.set_ylim(
|
288 |
ax2.set_xlabel('GPU Speed (ms/img)')
|
289 |
ax2.set_ylabel('COCO AP val')
|
290 |
ax2.legend(loc='lower right')
|
|
|
264 |
ax = plt.subplots(2, 4, figsize=(10, 6), tight_layout=True)[1].ravel()
|
265 |
|
266 |
fig2, ax2 = plt.subplots(1, 1, figsize=(8, 4), tight_layout=True)
|
267 |
+
# for f in [save_dir / f'study_coco_{x}.txt' for x in ['yolov5n6', 'yolov5s6', 'yolov5m6', 'yolov5l6', 'yolov5x6']]:
|
268 |
for f in sorted(save_dir.glob('study*.txt')):
|
269 |
y = np.loadtxt(f, dtype=np.float32, usecols=[0, 1, 2, 3, 7, 8, 9], ndmin=2).T
|
270 |
x = np.arange(y.shape[1]) if x is None else np.array(x)
|
|
|
284 |
ax2.grid(alpha=0.2)
|
285 |
ax2.set_yticks(np.arange(20, 60, 5))
|
286 |
ax2.set_xlim(0, 57)
|
287 |
+
ax2.set_ylim(25, 55)
|
288 |
ax2.set_xlabel('GPU Speed (ms/img)')
|
289 |
ax2.set_ylabel('COCO AP val')
|
290 |
ax2.legend(loc='lower right')
|