Browse Source

updates

5.0
Glenn Jocher 4 years ago
parent
commit
b10609fe6b
3 changed files with 16 additions and 11 deletions
  1. +1
    -0
      README.md
  2. +0
    -1
      models/yolov5m.yaml
  3. +15
    -10
      utils/utils.py

+ 1
- 0
README.md View File

&nbsp &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. 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"> <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. ** 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 View File



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


+ 15
- 10
utils/utils.py View File

fig, ax = plt.subplots(2, 4, figsize=(10, 6), tight_layout=True) fig, ax = plt.subplots(2, 4, figsize=(10, 6), tight_layout=True)
ax = ax.ravel() 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 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) 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)'] s = ['P', 'R', 'mAP@.5', 'mAP@.5:.95', 't_inference (ms/img)', 't_NMS (ms/img)', 't_total (ms/img)']
ax[i].set_title(s[i]) ax[i].set_title(s[i])


j = y[3].argmax() + 1 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) plt.savefig(f.replace('.txt', '.png'), dpi=200)





Loading…
Cancel
Save