Skip to content

Commit

Permalink
删除opts
Browse files Browse the repository at this point in the history
  • Loading branch information
dreamer121121 committed Jan 8, 2019
1 parent 69d455a commit d365bde
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions server/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ def Perter(request):
print("----start-----")
#######################################################################
# Evaluate
parser = argparse.ArgumentParser(description='Demo')
parser.add_argument('--query_index', default=777, type=int, help='test_image_index')
parser.add_argument('--test_dir', default='../Market/pytorc', type=str, help='./test_data')
opts = parser.parse_args()
# parser = argparse.ArgumentParser(description='Demo')
# parser.add_argument('--query_index', default=777, type=int, help='test_image_index')
# parser.add_argument('--test_dir', default='../Market/pytorc', type=str, help='./test_data')
# opts = parser.parse_args()

data_dir = opts.test_dir
data_dir = '../Market/pytorch'
image_datasets = {x: datasets.ImageFolder(os.path.join(data_dir, x)) for x in ['gallery', 'query']}

#####################################################################
Expand Down Expand Up @@ -80,7 +80,7 @@ def sort_img(qf, ql, qc, gf, gl, gc):
index = index[mask]
return index

i = opts.query_index
i = int(777)
index = sort_img(query_feature[i], query_label[i], query_cam[i], gallery_feature, gallery_label, gallery_cam)

########################################################################
Expand Down

0 comments on commit d365bde

Please sign in to comment.