layumi / Person_reID_baseline_pytorch

:bouncing_ball_person: Pytorch ReID: A tiny, friendly, strong pytorch implement of person re-id / vehicle re-id baseline. Tutorial 👉https://github.com/layumi/Person_reID_baseline_pytorch/tree/master/tutorial
https://www.zdzheng.xyz
MIT License
4.1k stars 1.01k forks source link

test result error:Rank@1:0.000000 Rank@5:0.000000 Rank@10:0.000000 mAP:0.000000 #288

Open NanWang294 opened 3 years ago

NanWang294 commented 3 years ago

Describe the bug I have train your program with : python train.py --gpu_ids 0 --name ft_ResNet50 --train_all --batchsize 8 --data_dir C:/Users/ASUS/Desktop/Person_reID_baseline_pytorch-master/Market/pytorch and Training complete in 94m 7s but when i test the program with: python test.py --gpu_ids 0 --name ft_ResNet50 --test_dir C:/Users/ASUS/Desktop/Person_reID_baseline_pytorch-master/Market/pytorch --batchsize 32 --which_epoch 59

it turns out that :3368 ft_ResNet50 torch.Size([3368, 512]) Rank@1:0.000000 Rank@5:0.000000 Rank@10:0.000000 mAP:0.000000

could you help me with this error

layumi commented 2 years ago

Hi @NanWang294 sorry for the late response. It looks like your model can successfully extract feature.

Could you check the numpy version and update numpy? If this not works, could you run the code on Ubuntu if possible?

gubei528 commented 2 years ago

I also encountered this problem, but in my self-made data set, I don't know if it is a data set problem or an environmental problem

layumi commented 2 years ago

@gubei528 Could you provide more details? The training seems not good? -> check whether the data folder arrangement is right. The training seems good ? -> check whether successfully read the camera name and other meta data.

gubei528 commented 2 years ago

My data set is taken from 20 videos. These 20 videos are all single targets, but the targets look different. When naming the pictures, isn't the camera name set to be the same? Training should be fine and I can run demo.py successfully. # 图片1

layumi commented 2 years ago

Hi @gubei528 You may try to set different camera name for every image first.

If you want to find cross-camera tracking, you need to mute the image taken from the same camera.

gubei528 commented 2 years ago

Thank you very much for answering. According to your answer, and this #325 , I set up the name of 6 cameras. Now RANK and MAP are not 0.