Closed huanghoujing closed 7 years ago
After checking the paper In Defense of the Triplet Loss for Person Re-Identification, I found a typo in your script examples/triplet_loss.py
and fixed it, and then things went very well.
In the adjust_lr
function, I changed line
lr = args.lr if epoch <= 100 else args.lr * (0.001 ** ((epoch - 100) / 50))
into
lr = args.lr if epoch <= 100 else args.lr * (0.001 ** ((epoch - 100) / 50.))
(I changed 50
to 50.
) which allows the learning rate to decay gradually after 100 epochs.
Finally, I got the following promising results as in your github doc:
Mean AP: 67.5%
CMC Scores allshots cuhk03 market1501
top-1 42.8% 70.0% 84.5%
top-5 59.2% 91.1% 94.1%
top-10 67.2% 95.0% 96.5%
This issue is solved, thank you again for your wonderful library.
@huanghoujing Thank you very much for the finding! It seems that python3 treats /
as floating numbers division, while python2 does not. I will fix this soon.
OK, now I got it :)
Hi, Tong Xiao, very grateful for your complete and self-contained ReID library. I have a small question to consult you about. I failed to reproduce the performance using triplet loss on Market1501.
I think my script is effectively the same as provided in your github.io page:
The performance it achieved is quite worse than reported on your github.io page:
Do you have anything not updated on the github.io page? Waiting for your kind response and thank you very much.
Anyone else who has run this code and notices this issue is also highly appreciated to share your results.