updates
This commit is contained in:
parent
25580dfb84
commit
05b1e437a0
18
test.py
18
test.py
|
@ -244,13 +244,17 @@ if __name__ == '__main__':
|
||||||
r = test(opt.cfg, opt.data, opt.weights, opt.batch_size, opt.img_size, opt.conf_thres, v, opt.save_json)[0]
|
r = test(opt.cfg, opt.data, opt.weights, opt.batch_size, opt.img_size, opt.conf_thres, v, opt.save_json)[0]
|
||||||
y.append(r + (time.time() - t,))
|
y.append(r + (time.time() - t,))
|
||||||
y = np.stack(y, 0)
|
y = np.stack(y, 0)
|
||||||
|
np.savetxt('study.txt', y, fmt='%10.4g')
|
||||||
|
|
||||||
# Plot
|
# Plot
|
||||||
fig, ax = plt.subplots(1, 1, figsize=(10, 5))
|
fig, ax = plt.subplots(2, 1, figsize=(6, 6))
|
||||||
ax.plot(x, y[:, 2], marker='.', label='mAP@0.5')
|
ax[0].plot(x, y[:, 2], marker='.', label='mAP@0.5')
|
||||||
ax.plot(x, y[:, 3], marker='.', label='mAP@0.5:0.95')
|
ax[0].plot(x, y[:, 3], marker='.', label='mAP@0.5:0.95')
|
||||||
ax.legend()
|
ax[0].legend()
|
||||||
ax.set_xlabel('nms_thr')
|
ax[0].set_xlabel('nms_thr')
|
||||||
ax.set_ylabel('mAP')
|
ax[0].set_ylabel('mAP')
|
||||||
|
ax[1].plot(x, y[:, -1], marker='.', label='time')
|
||||||
|
ax[1].set_xlabel('nms_thr')
|
||||||
|
ax[1].set_ylabel('time (s)')
|
||||||
fig.tight_layout()
|
fig.tight_layout()
|
||||||
plt.savefig('parameters.jpg', dpi=200)
|
plt.savefig('study.jpg', dpi=200)
|
||||||
|
|
Loading…
Reference in New Issue