1.问题
IndexError: invalid index to scalar variable
2.解决
修改/fast-reid-master/fastreid/evaluation/rank.py
line182:
def evaluate_rank(distmat,q_pids,g_pids,q_camids,g_camids,max_rank=50,use_metric_cuhk03=False,use_cython=True
):
改为:
def evaluate_rank(distmat,q_pids,g_pids,q_camids,g_camids,max_rank=50,use_metric_cuhk03=False,use_cython=False
):
更靠谱的修改fast-reid-master/fastreid/utils/visualizer.py line72附近:
if len(query_indices) != 1:ax.set_title('{}/{:.2f}/cam{}'.format(query_name, self.all_ap[q_idx], cam_id)