diff --git a/train.py b/train.py index 6e4c78b8..a9a98c4b 100644 --- a/train.py +++ b/train.py @@ -171,7 +171,7 @@ def train(cfg, for epoch in range(start_epoch, epochs): model.train() print(('\n%8s' + '%10s' * 8) % - ('Epoch', 'GIoU/xy', 'wh', 'obj', 'cls', 'total', 'targets', 'img_size', 'gpu_mem')) + ('Epoch', 'gpu_mem', 'GIoU/xy', 'wh', 'obj', 'cls', 'total', 'targets', 'img_size')) # Update scheduler scheduler.step() @@ -236,7 +236,7 @@ def train(cfg, # Print batch results mloss = (mloss * i + loss_items) / (i + 1) # update mean losses mem = torch.cuda.memory_cached() / 1E9 if torch.cuda.is_available() else 0 # (GB) - s = ('%8s' + '%10.3g' * 8) % ('%g/%g' % (epoch, epochs - 1), *mloss, len(targets), img_size, mem) + s = ('%8s' + '%10.3g' * 8) % ('%g/%g' % (epoch, epochs - 1), mem, *mloss, len(targets), img_size) pbar.set_description(s) # print(s) # Calculate mAP (always test final epoch, skip first 5 if opt.nosave) diff --git a/utils/utils.py b/utils/utils.py index 6f492fcf..d8d4809a 100755 --- a/utils/utils.py +++ b/utils/utils.py @@ -685,7 +685,7 @@ def plot_results(start=0, stop=0): # from utils.utils import *; plot_results() fig, ax = plt.subplots(2, 5, figsize=(14, 7)) ax = ax.ravel() - s = ['X + Y', 'Width + Height', 'Confidence', 'Classification', 'Train Loss', 'Precision', 'Recall', 'mAP', 'F1', + s = ['GIoU/XY', 'Width/Height', 'Confidence', 'Classification', 'Train Loss', 'Precision', 'Recall', 'mAP', 'F1', 'Test Loss'] for f in sorted(glob.glob('results*.txt') + glob.glob('../../Downloads/results*.txt')): results = np.loadtxt(f, usecols=[2, 3, 4, 5, 6, 9, 10, 11, 12, 13]).T