From 1c0b6236e3827cf48d9c71a54a726ae4640afa29 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Tue, 16 Jun 2020 00:11:29 -0700 Subject: [PATCH] update fast mode --- train.py | 2 +- utils/utils.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/train.py b/train.py index 93802c5..584614c 100644 --- a/train.py +++ b/train.py @@ -303,7 +303,7 @@ def train(hyp): model=ema.ema, single_cls=opt.single_cls, dataloader=testloader, - fast=ni < n_burn) + fast=epoch > epochs / 2) # Write with open(results_file, 'a') as f: diff --git a/utils/utils.py b/utils/utils.py index 22c32e6..fbefa26 100755 --- a/utils/utils.py +++ b/utils/utils.py @@ -526,12 +526,11 @@ def non_max_suppression(prediction, conf_thres=0.1, iou_thres=0.6, fast=False, c time_limit = 10.0 # seconds to quit after redundant = True # require redundant detections fast |= conf_thres > 0.001 # fast mode + multi_label = nc > 1 # multiple labels per box (adds 0.5ms/img) if fast: merge = False - multi_label = nc > 1 # multiple labels per box (adds 0.5ms/img) else: merge = True # merge for best mAP (adds 0.5ms/img) - multi_label = nc > 1 # multiple labels per box (adds 0.5ms/img) t = time.time() output = [None] * prediction.shape[0]