瀏覽代碼

updates

5.0
Glenn Jocher 4 年之前
父節點
當前提交
b10609fe6b
共有 3 個文件被更改,包括 16 次插入11 次删除
  1. +1
    -0
      README.md
  2. +0
    -1
      models/yolov5m.yaml
  3. +15
    -10
      utils/utils.py

+ 1
- 0
README.md 查看文件

@@ -3,6 +3,7 @@
&nbsp

This repository represents Ultralytics open-source research into future object detection methods, and incorporates our lessons learned and best practices evolved over training thousands of models on custom client datasets with our previous YOLO repository https://github.com/ultralytics/yolov3. **All code and models are under active development, and are subject to modification or deletion without notice.** Use at your own risk.

<img src="https://user-images.githubusercontent.com/26833433/83359175-63b6c680-a32d-11ea-970a-9f602e022468.png" width="1000">
** GPU Latency measures end-to-end latency per image averaged over 5000 COCO val2017 images using a V100 GPU and includes image preprocessing, inference, postprocessing and NMS.


+ 0
- 1
models/yolov5m.yaml 查看文件

@@ -43,4 +43,3 @@ head:

[[], 1, Detect, [nc, anchors]], # Detect(P3, P4, P5)
]


+ 15
- 10
utils/utils.py 查看文件

@@ -983,7 +983,11 @@ def plot_study_txt(f='study.txt', x=None): # from utils.utils import *; plot_st
fig, ax = plt.subplots(2, 4, figsize=(10, 6), tight_layout=True)
ax = ax.ravel()

for f in glob.glob('study*.txt'):
fig2, ax2 = plt.subplots(1, 1, figsize=(8, 4), tight_layout=True)
ax2.plot(1E3 / np.array([209, 140, 97, 58, 35, 18][:-1]), [33.5, 39.1, 42.5, 45.9, 49., 50.5][:-1],
'.-', linewidth=2, markersize=8, alpha=0.3, label='EfficientDet')

for f in sorted(glob.glob('study*.txt')):
y = np.loadtxt(f, dtype=np.float32, usecols=[0, 1, 2, 3, 7, 8, 9], ndmin=2).T
x = np.arange(y.shape[1]) if x is None else np.array(x)
s = ['P', 'R', 'mAP@.5', 'mAP@.5:.95', 't_inference (ms/img)', 't_NMS (ms/img)', 't_total (ms/img)']
@@ -992,15 +996,16 @@ def plot_study_txt(f='study.txt', x=None): # from utils.utils import *; plot_st
ax[i].set_title(s[i])

j = y[3].argmax() + 1
ax[7].plot(y[6, :j], y[3, :j] * 1E2, '.-', linewidth=2, markersize=8, label=Path(f).stem)

ax[7].plot(1E3 / np.array([209, 140, 97, 58, 35, 18]), [33.5, 39.1, 42.5, 45.9, 49., 50.5],
'.-', linewidth=2, markersize=8, label='EfficientDet')
ax[7].set_xlim(0)
ax[7].set_xlabel('Latency (ms)')
ax[7].set_ylabel('COCO AP val')
ax[7].legend()

ax2.plot(y[6, :j], y[3, :j] * 1E2, '.-', linewidth=2, markersize=8,
label=Path(f).stem.replace('study_coco_', '').replace('yolo', 'YOLO'))

ax2.set_xlim(0)
ax2.set_ylim(23, 50)
ax2.set_xlabel('GPU Latency (ms)')
ax2.set_ylabel('COCO AP val')
ax2.legend(loc='lower right')
ax2.grid()
plt.savefig('study_mAP_latency.png', dpi=300)
plt.savefig(f.replace('.txt', '.png'), dpi=200)



Loading…
取消
儲存