Skip to content

Commit

Permalink
Update test_results_prw.py
Browse files Browse the repository at this point in the history
  • Loading branch information
daodaofr authored Mar 31, 2021
1 parent de67a24 commit c20cf32
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions tools/test_results_prw.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,11 @@ def main(det_thresh=0.05, gallery_size=-1, ignore_cam_id=True, input_path=None):
gallery_det, gallery_feat = [], []
for det in all_dets:
gallery_det.append(det[0][:, :5])
feat = normalize(det[0][:, 5:], axis=1)
if det[0].shape[0] > 0:
feat = normalize(det[0][:, 5:], axis=1)
else:
feat = det[0][:, 5:]
# feat = normalize(det[0][:, 5:], axis=1)
gallery_feat.append(feat)

probe_feat = []
Expand All @@ -158,16 +162,16 @@ def main(det_thresh=0.05, gallery_size=-1, ignore_cam_id=True, input_path=None):
feat = feat[nmax]
probe_feat.append(feat)

gallery_det, gallery_feat = [], []
for det in all_dets:
# gallery_det, gallery_feat = [], []
# for det in all_dets:
# det[0] = det[0][det[0][:, 4]>thresh]
gallery_det.append(det[0][:, :5])
# gallery_det.append(det[0][:, :5])
# if det[0].shape[0] > 0:
# feat = normalize(det[0][:, 5:], axis=1)
# else:
# feat = det[0][:, 5:]
feat = normalize(det[0][:, 5:], axis=1)
gallery_feat.append(feat)
# feat = normalize(det[0][:, 5:], axis=1)
# gallery_feat.append(feat)

search_performance_calc(gallery_set, probe_set, gallery_det, gallery_feat, probe_feat, det_thresh, gallery_size, ignore_cam_id)

Expand Down

0 comments on commit c20cf32

Please sign in to comment.