michuanhaohao / AlignedReID

Alignedreid++: Dynamically Matching Local Information for Person Re-Identification.
MIT License
401 stars 114 forks source link

poor metrics when training on market1501 #48

Open rrryan2016 opened 3 years ago

rrryan2016 commented 3 years ago

hello, thanks for your great work and kind sharing. When I intend to reproduce your work, and simply train on market1501 at first. The output info seems weird. The metrics are extremely low as

Epoch: [300][80/93] Time 0.283 (0.252) Data 0.002 (0.007) Loss 4.7850 (5.0124) CLoss 4.7733 (5.0106) GLoss 0.0117 (0.0015) LLoss 0.0000 (0.0004) Epoch: [300][90/93] Time 0.238 (0.252) Data 0.001 (0.006) Loss 4.9203 (5.0022) CLoss 4.9203 (5.0006) GLoss 0.0000 (0.0013) LLoss 0.0000 (0.0003) ==> Test Extracted features for query set, obtained 3368-by-2048 matrix Extracted features for gallery set, obtained 15913-by-2048 matrix ==> BatchTime(s)/BatchSize(img): 0.131/32 Only using global branch Computing local distance... Matrix part (17, 80) / (17, 80), +0.06s, total 87.87s Using global and local branches Computing CMC and mAP Results ---------- mAP: 0.2% CMC curve Rank-1 : 0.1% Rank-5 : 0.9% Rank-10 : 1.8% Rank-20 : 3.5%

Computing local distance... Matrix part (17, 17) / (17, 17), +0.06s, total 17.33s Computing local distance... Matrix part (80, 80) / (80, 80), +0.06s, total 393.07s Using global and local branches for reranking us

My env is 3090Ti, python 3.7, cuda 11.0, and the command is

python train_alignedreid.py -d market1501 -a resnet50 --test_distance global_local --reranking --root /home/vgc/users/lwz/data/reID/market_1501_raw/

Any recommendation please? Thanks in advance.

rrryan2016 commented 3 years ago

Much better results when using densenet121 instead of resnet50 as above:

... Epoch: [300][90/93] Time 0.178 (0.203) Data 0.001 (0.004) Loss 0.0422 (0.0826) CLoss 0.0422 (0.0768) GLoss 0.0000 (0.0050) LLoss 0.0000 (0.0007) ==> Test Extracted features for query set, obtained 3368-by-1024 matrix Extracted features for gallery set, obtained 15913-by-1024 matrix ==> BatchTime(s)/BatchSize(img): 0.081/32 Only using global branch Computing local distance... Matrix part (17, 80) / (17, 80), +0.04s, total 53.13s Using global and local branches Computing CMC and mAP Results ---------- mAP: 79.7% CMC curve Rank-1 : 91.0% Rank-5 : 97.0% Rank-10 : 98.2% Rank-20 : 98.9%

Computing local distance... Matrix part (17, 17) / (17, 17), +0.06s, total 11.26s Computing local distance... Matrix part (80, 80) / (80, 80), +0.04s, total 247.94s Using global and local branches for reranking using GPU to compute original distance starting re_ranking Computing CMC and mAP for re_ranking Results ---------- mAP(RK): 90.8% CMC curve(RK) Rank-1 : 93.7% Rank-5 : 96.5% Rank-10 : 97.4% Rank-20 : 98.2%

Best Rank-1 93.7%, achieved at epoch 300 Finished. Total elapsed time (h:m:s): 1:44:50. Training time (h:m:s): 1:35:11.

Hasankanso commented 2 years ago

Much better results when using densenet121 instead of resnet50 as above:

...

Epoch: [300][90/93] Time 0.178 (0.203) Data 0.001 (0.004) Loss 0.0422 (0.0826) CLoss 0.0422 (0.0768) GLoss 0.0000 (0.0050) LLoss 0.0000 (0.0007) ==> Test Extracted features for query set, obtained 3368-by-1024 matrix Extracted features for gallery set, obtained 15913-by-1024 matrix ==> BatchTime(s)/BatchSize(img): 0.081/32 Only using global branch Computing local distance... Matrix part (17, 80) / (17, 80), +0.04s, total 53.13s Using global and local branches Computing CMC and mAP Results ---------- mAP: 79.7% CMC curve Rank-1 : 91.0% Rank-5 : 97.0% Rank-10 : 98.2% Rank-20 : 98.9%

Computing local distance...

Matrix part (17, 17) / (17, 17), +0.06s, total 11.26s Computing local distance... Matrix part (80, 80) / (80, 80), +0.04s, total 247.94s Using global and local branches for reranking using GPU to compute original distance starting re_ranking Computing CMC and mAP for re_ranking Results ---------- mAP(RK): 90.8% CMC curve(RK) Rank-1 : 93.7% Rank-5 : 96.5% Rank-10 : 97.4% Rank-20 : 98.2% Best Rank-1 93.7%, achieved at epoch 300 Finished. Total elapsed time (hⓂ️s): 1:44:50. Training time (hⓂ️s): 1:35:11.

hello rrryan2016, would you share the weights of densenet121? checkpoint_ep300.pth