代码拉取完成,页面将自动刷新
import numpy as np
import os
distmat_paths = [
'logs-aic21/test/result/resnext101a_384/eucl_track/dist_mat.npy'
# './logs/stage2/resnext101a_384/v1/dist_mat.npy',
# './logs/stage2/resnext101a_384/v2/dist_mat.npy',
# './logs/stage2/101a_384/v1/dist_mat.npy',
# './logs/stage2/101a_384/v2/dist_mat.npy',
# './logs/stage2/101a_384_recrop/v1/dist_mat.npy',
# './logs/stage2/101a_384_recrop/v2/dist_mat.npy',
# './logs/stage2/101a_384_spgan/v1/dist_mat.npy',
# './logs/stage2/101a_384_spgan/v2/dist_mat.npy',
# './logs/stage2/densenet169a_384/v1/dist_mat.npy',
# './logs/stage2/densenet169a_384/v2/dist_mat.npy',
# './logs/stage2/s101_384/v1/dist_mat.npy',
# './logs/stage2/s101_384/v2/dist_mat.npy',
# './logs/stage2/se_resnet101a_384/v1/dist_mat.npy',
# './logs/stage2/se_resnet101a_384/v2/dist_mat.npy',
# './logs/stage2/transreid_256/v1/dist_mat.npy',
# './logs/stage2/transreid_256/v2/dist_mat.npy',
]
distmat = np.zeros((1103,31238))
# distmat = np.zeros((1678,11579))
for i in distmat_paths:
distmat += np.load(i)
sort_distmat_index = np.argsort(distmat, axis=1)
print(sort_distmat_index)
print('The shape of distmat is: {}'.format(distmat.shape))
save_path = 'logs-aic21/test/result/resnext101a_384/eucl_track/track2.txt'
with open(save_path,'w') as f:
for item in sort_distmat_index:
for i in range(99):
f.write(str(item[i] + 1) + ' ')
f.write(str(item[99] + 1) + '\n')
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。