Skip to content

Commit

Permalink
a few debugs
Browse files Browse the repository at this point in the history
  • Loading branch information
HaydenFaulkner committed Sep 21, 2019
1 parent bb9bc40 commit ed3579a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions detect_yolo3.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def get_dataset(dataset_name):
def get_dataloader(dataset, batch_size):
width, height = FLAGS.data_shape, FLAGS.data_shape
batchify_fn = Tuple(Stack(), Pad(pad_val=-1), Stack())
loader = gluon.data.DataLoader(dataset.transform(YOLO3VideoInferenceTransform(width, height, 3)),
loader = gluon.data.DataLoader(dataset.transform(YOLO3VideoInferenceTransform(width, height)),
batch_size, False, last_batch='keep', num_workers=FLAGS.num_workers,
batchify_fn=batchify_fn)
return loader
Expand Down Expand Up @@ -253,7 +253,7 @@ def load_predictions(save_dir, dataset, max_do=-1):


def visualise_predictions(save_dir, dataset, trained_on_dataset, boxes,
max_do=-1, display_gt=False, detection_thresh=0.5):
max_do=-1, display_gt=False, detection_threshold=0.5):
colors = dict()
for i in range(200):
colors[i] = (int(256 * random.random()), int(256 * random.random()), int(256 * random.random()))
Expand All @@ -276,7 +276,7 @@ def visualise_predictions(save_dir, dataset, trained_on_dataset, boxes,
bboxes=[list(g) for g in y[:, :4]],
scores=[1]*len(y),
labels=[g for g in y[:, 4]],
thresh=detection_thresh,
thresh=detection_threshold,
colors=colors_gt,
class_names=dataset.classes,
absolute_coordinates=True)
Expand All @@ -286,7 +286,7 @@ def visualise_predictions(save_dir, dataset, trained_on_dataset, boxes,
bboxes=[b[2:] for b in boxes[img_path]],
scores=[b[1] for b in boxes[img_path]],
labels=[b[0] for b in boxes[img_path]],
thresh=detection_thresh,
thresh=detection_threshold,
colors=colors,
class_names=trained_on_dataset.classes,
absolute_coordinates=False)
Expand Down

0 comments on commit ed3579a

Please sign in to comment.