Skip to content

Commit

Permalink
glob sorted
Browse files Browse the repository at this point in the history
  • Loading branch information
uts9 committed Sep 18, 2022
1 parent 2f489b1 commit e937bde
Show file tree
Hide file tree
Showing 7 changed files with 4,092 additions and 12,187 deletions.
7 changes: 5 additions & 2 deletions datasets/market.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,12 @@ def __init__(self, root, image_size, transform=None, loader=default_loader, trai
old_im_list = glob.glob(os.path.join(self.root, 'train_all', '*/*.png'))
self.class_dir = glob.glob(os.path.join(self.root, 'train_all', '*'))
else:
old_im_list = glob.glob(os.path.join(self.root, 'query', '*/*.png'))
#old_im_list = glob.glob(os.path.join(self.root, 'query', '*/*.png'))
old_im_list = sorted(glob.glob(os.path.join(self.root, 'query', '*/*.png')))
self.class_dir = glob.glob(os.path.join(self.root, 'query', '*'))


#for index, i in enumerate(old_im_list):
# print(index, i)
# threshold
for index, name in enumerate(old_im_list):
precentage = float(name[-8:-4])
Expand Down
Loading

0 comments on commit e937bde

Please sign in to comment.