vimar-gu/MSINet

您好,在训练vehicleid数据集的时候出现了以下错误

Closed this issue · 2 comments

File "train.py", line 107, in
main(args)
File "train.py", line 53, in main
do_train(args, model, criterion, train_loader, test_loader,
File "/home/sj4057/mzs/MSINet-main/reid/engine/trainer.py", line 59, in do_train
cmc, mAP, _, _, _, _, _ = evaluator.compute()
File "/home/sj4057/mzs/MSINet-main/reid/utils/metrics.py", line 134, in compute
cmc, mAP = eval_func(distmat, q_pids, g_pids, q_camids, g_camids)
File "/home/sj4057/mzs/MSINet-main/reid/utils/metrics.py", line 80, in eval_func
assert num_valid_q > 0, "Error: all query identities do not appear in gallery"
AssertionError: Error: all query identities do not appear in gallery

您好,因为 vehicleid 数据集只有 1 个 camera id,因此需要将 metric.py 60 行后面那个 [keep] 注释掉

我之后针对这个问题改进一下代码吧

谢谢您,解决了这个问题了