Skip to content

Commit

Permalink
Merge branch 'MattKleinsmith-patch-7'
Browse files Browse the repository at this point in the history
  • Loading branch information
Cartucho committed Mar 4, 2018
2 parents 3d4dba7 + 6bbac05 commit a2c52ba
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions run.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

parser = argparse.ArgumentParser(description='YOLO v2 Bounding Box Tool')
parser.add_argument('--format', default='yolo', type=str, choices=['yolo', 'voc'], help="Bounding box format")
parser.add_argument('--sort', action='store_true', help="If true, shows images in order.")
args = parser.parse_args()

class_index = 0
Expand Down Expand Up @@ -283,6 +284,10 @@ def draw_info_bb_selected(tmp_img):
image_list = glob.glob(img_dir +'*.jpg')
image_list.extend(glob.glob(img_dir + '*.jpeg'))
#print(image_list)
image_list.sort()
if not args.sort:
np.random.seed(123) # Keep random img order consistent
np.random.shuffle(image_list)
last_img_index = len(image_list) - 1

# load class list
Expand Down

0 comments on commit a2c52ba

Please sign in to comment.