3sys_path = [
'/workspace/sm_action',
'/workspace',
'/workspace/smreid']
5 if path
not in sys.path:
19from smutils.utils_os
import search_file
21if __name__ ==
"__main__":
25 cfg_path =
'/workspace/configs/reid/mgn/config.yaml'
26 checkpoint_path =
'/workspace/checkpoints/reid/mgn/market_mgn_R50-ibn.pth'
27 crop_image_folder =
'/workspace/a_track_result_crop'
33 file_list, file_path = search_file(crop_image_folder,
'.jpg')
36 file_path = file_path[0:min(len(file_path), 1000)]
46 for idx, sim
in sorted_keep_index:
47 print(f
'{file_list[idx]}, {sim}')
get_reid_matrix(q_feats, g_feats=None)
get_reid_feats(model, crop_images)
get_reid_image_index(simmat, select_id=1, threshold=0.8)
index_sort(keep_index, s_sim)