mirror of
https://github.com/ultralytics/yolov5.git
synced 2025-06-03 14:49:29 +08:00
update times to end-to-end latency (inference + NMS)
This commit is contained in:
parent
8f17a96ff0
commit
ad71d2d513
@ -62,7 +62,6 @@ def detect(save_img=False):
|
|||||||
# Inference
|
# Inference
|
||||||
t1 = torch_utils.time_synchronized()
|
t1 = torch_utils.time_synchronized()
|
||||||
pred = model(img, augment=opt.augment)[0]
|
pred = model(img, augment=opt.augment)[0]
|
||||||
t2 = torch_utils.time_synchronized()
|
|
||||||
|
|
||||||
# to float
|
# to float
|
||||||
if half:
|
if half:
|
||||||
@ -71,6 +70,7 @@ def detect(save_img=False):
|
|||||||
# Apply NMS
|
# Apply NMS
|
||||||
pred = non_max_suppression(pred, opt.conf_thres, opt.iou_thres,
|
pred = non_max_suppression(pred, opt.conf_thres, opt.iou_thres,
|
||||||
fast=True, classes=opt.classes, agnostic=opt.agnostic_nms)
|
fast=True, classes=opt.classes, agnostic=opt.agnostic_nms)
|
||||||
|
t2 = torch_utils.time_synchronized()
|
||||||
|
|
||||||
# Apply Classifier
|
# Apply Classifier
|
||||||
if classify:
|
if classify:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user