This commit is contained in:
Glenn Jocher 2018-12-03 14:12:46 +01:00
parent 40b536a426
commit b64620cf75
2 changed files with 5 additions and 4 deletions

View File

@ -8,7 +8,7 @@ from utils.utils import *
parser = argparse.ArgumentParser() parser = argparse.ArgumentParser()
parser.add_argument('-epochs', type=int, default=100, help='number of epochs') parser.add_argument('-epochs', type=int, default=100, help='number of epochs')
parser.add_argument('-batch_size', type=int, default=2, help='size of each image batch') parser.add_argument('-batch_size', type=int, default=16, help='size of each image batch')
parser.add_argument('-data_config_path', type=str, default='cfg/coco.data', help='data config file path') parser.add_argument('-data_config_path', type=str, default='cfg/coco.data', help='data config file path')
parser.add_argument('-cfg', type=str, default='cfg/yolov3.cfg', help='cfg file path') parser.add_argument('-cfg', type=str, default='cfg/yolov3.cfg', help='cfg file path')
parser.add_argument('-multi_scale', default=False, help='random image sizes per batch 320 - 608') parser.add_argument('-multi_scale', default=False, help='random image sizes per batch 320 - 608')

View File

@ -442,12 +442,13 @@ def plot_results():
import matplotlib.pyplot as plt import matplotlib.pyplot as plt
plt.figure(figsize=(16, 8)) plt.figure(figsize=(16, 8))
s = ['X', 'Y', 'Width', 'Height', 'Objectness', 'Classification', 'Total Loss', 'Precision', 'Recall', 'mAP'] s = ['X', 'Y', 'Width', 'Height', 'Objectness', 'Classification', 'Total Loss', 'Precision', 'Recall', 'mAP']
for f in ('results.txt', for f in ('results_64.txt','results_642.txt'
): ):
results = np.loadtxt(f, usecols=[2, 3, 4, 5, 6, 7, 8, 17, 18, 16]).T # column 16 is mAP results = np.loadtxt(f, usecols=[2, 3, 4, 5, 6, 7, 8, 17, 18, 16]).T # column 16 is mAP
n = results.shape[1]
for i in range(10): for i in range(10):
plt.subplot(2, 5, i + 1) plt.subplot(2, 5, i + 1)
plt.plot(results[i, :250], marker='.', label=f) plt.plot(range(1,n), results[i, 1:], marker='.', label=f)
plt.title(s[i]) plt.title(s[i])
if i == 0: if i == 0:
plt.legend() plt.legend()