This commit is contained in:
Glenn Jocher 2018-09-02 12:40:29 +02:00
parent 641e354948
commit 58f2d9306b
4 changed files with 4 additions and 11 deletions

View File

@ -3,7 +3,7 @@
# Introduction
This directory contains software developed by Ultralytics LLC, and **is freely available for redistribution under the GPL-3.0 license**. For more information on Ultralytics projects please visit:
http://www.ultralytics.com  
http://www.ultralytics.com
# Description

Binary file not shown.

Before

Width:  |  Height:  |  Size: 242 KiB

After

Width:  |  Height:  |  Size: 277 KiB

View File

@ -42,13 +42,11 @@ elif weights_path.endswith('.pt'): # pytorch format
model.to(device).eval()
# Get PyTorch dataloader
# Get dataloader
# dataset = load_images_with_labels(test_path)
# dataloader = torch.utils.data.DataLoader(dataset, batch_size=opt.batch_size, shuffle=False, num_workers=opt.n_cpu)
dataloader = load_images_and_labels(test_path, batch_size=opt.batch_size, img_size=opt.img_size)
Tensor = torch.cuda.FloatTensor if cuda else torch.FloatTensor
n_gt = 0
correct = 0
@ -87,11 +85,6 @@ for batch_i, (imgs, targets) in enumerate(dataloader):
correct.extend([0 for _ in range(len(detections))])
else:
# Extract target boxes as (x1, y1, x2, y2)
# target_boxes = torch.FloatTensor(annotations[:, 1:].shape)
# target_boxes[:, 0] = (annotations[:, 1] - annotations[:, 3] / 2)
# target_boxes[:, 1] = (annotations[:, 2] - annotations[:, 4] / 2)
# target_boxes[:, 2] = (annotations[:, 1] + annotations[:, 3] / 2)
# target_boxes[:, 3] = (annotations[:, 2] + annotations[:, 4] / 2)
target_boxes = xywh2xyxy(annotations[:,1:5])
target_boxes *= opt.img_size

View File

@ -368,10 +368,10 @@ def plotResults():
plt.figure(figsize=(16, 8))
s = ['X', 'Y', 'Width', 'Height', 'Objectness', 'Classification', 'Total Loss', 'Precision', 'Recall']
for f in ('/Users/glennjocher/Downloads/results.txt',
''):
'/Users/glennjocher/Downloads/resultsBCE2.txt'):
results = np.loadtxt(f, usecols=[2, 3, 4, 5, 6, 7, 8, 9, 10]).T
for i in range(9):
plt.subplot(2, 5, i + 1)
plt.plot(results[i, :], marker='.', label=f)
plt.title(s[i])
plt.legend()
plt.legend(cocococosadfc)