update fast mode
This commit is contained in:
parent
db2c3acd3a
commit
1c0b6236e3
2
train.py
2
train.py
|
|
@ -303,7 +303,7 @@ def train(hyp):
|
||||||
model=ema.ema,
|
model=ema.ema,
|
||||||
single_cls=opt.single_cls,
|
single_cls=opt.single_cls,
|
||||||
dataloader=testloader,
|
dataloader=testloader,
|
||||||
fast=ni < n_burn)
|
fast=epoch > epochs / 2)
|
||||||
|
|
||||||
# Write
|
# Write
|
||||||
with open(results_file, 'a') as f:
|
with open(results_file, 'a') as f:
|
||||||
|
|
|
||||||
|
|
@ -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
|
time_limit = 10.0 # seconds to quit after
|
||||||
redundant = True # require redundant detections
|
redundant = True # require redundant detections
|
||||||
fast |= conf_thres > 0.001 # fast mode
|
fast |= conf_thres > 0.001 # fast mode
|
||||||
|
multi_label = nc > 1 # multiple labels per box (adds 0.5ms/img)
|
||||||
if fast:
|
if fast:
|
||||||
merge = False
|
merge = False
|
||||||
multi_label = nc > 1 # multiple labels per box (adds 0.5ms/img)
|
|
||||||
else:
|
else:
|
||||||
merge = True # merge for best mAP (adds 0.5ms/img)
|
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()
|
t = time.time()
|
||||||
output = [None] * prediction.shape[0]
|
output = [None] * prediction.shape[0]
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue