Precision-Recall Curve Feature Addition (#1107)
* initial commit * Update general.py Indent update * Update general.py refactor duplicate code * 200 dpi
This commit is contained in:
1 parent
9eae82e3a3
commit
5fac5ad165
3 files changed
+33
-31
No files matched your search
@@ -1,5 +1,4 @@
|
||||
import argparse
|
||||
import glob
|
||||
import logging
|
||||
import math
|
||||
import os
|
||||
@@ -309,15 +308,14 @@ def train(hyp, opt, device, tb_writer=None):
|
||||
ema.update_attr(model, include=['yaml', 'nc', 'hyp', 'gr', 'names', 'stride'])
|
||||
final_epoch = epoch + 1 == epochs
|
||||
if not opt.notest or final_epoch: # Calculate mAP
|
||||
if final_epoch: # replot predictions
|
||||
[os.remove(x) for x in glob.glob(str(log_dir / 'test_batch*_pred.jpg')) if os.path.exists(x)]
|
||||
results, maps, times = test.test(opt.data,
|
||||
batch_size=total_batch_size,
|
||||
imgsz=imgsz_test,
|
||||
model=ema.ema,
|
||||
single_cls=opt.single_cls,
|
||||
dataloader=testloader,
|
||||
save_dir=log_dir)
|
||||
save_dir=log_dir,
|
||||
plots=epoch == 0 or final_epoch) # plot first and last
|
||||
|
||||
# Write
|
||||
with open(results_file, 'a') as f:
|
||||
|
||||
Reference in new issue
Block a user