diff --git a/README.md b/README.md index 018e95e3..7ba50a85 100755 --- a/README.md +++ b/README.md @@ -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 diff --git a/data/coco_training_loss.png b/data/coco_training_loss.png index 570ca737..9e4b534e 100644 Binary files a/data/coco_training_loss.png and b/data/coco_training_loss.png differ diff --git a/test.py b/test.py index 9a938971..9c2d9de4 100644 --- a/test.py +++ b/test.py @@ -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 diff --git a/utils/utils.py b/utils/utils.py index b3c09d3e..249a855f 100755 --- a/utils/utils.py +++ b/utils/utils.py @@ -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)