Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An Issues for triplet-loss in open-reid #24

Closed
hh23333 opened this issue Sep 19, 2017 · 4 comments
Closed

An Issues for triplet-loss in open-reid #24

hh23333 opened this issue Sep 19, 2017 · 4 comments

Comments

@hh23333
Copy link

hh23333 commented Sep 19, 2017

hi,first thanks for this toolkit for re-id. There is a problem when I run the triplet-loss for market-1501,
python examples/resnet.py -d market1501 -b 64 -j 2 --loss triplet --logs-dir logs/resnet-triplet-test2 --num-instances 4 --optimizer adam
I only get 2.6% top1 accuracy. I find, finally the difference of hard-negative and hard-positive Almost goes to zero, that's not what we want. Did I have some operational errors? Or the code need to be modified?

@hh23333 hh23333 closed this as completed Sep 19, 2017
@hh23333 hh23333 changed the title An An Issues for triplet-loss in open-reid Sep 19, 2017
@hh23333 hh23333 reopened this Sep 19, 2017
@zydou
Copy link
Contributor

zydou commented Sep 19, 2017

@hh23333 It seems that you are using the old version open-reid. Please update to the latest version and run again.

@Cysu
Copy link
Owner

Cysu commented Sep 19, 2017

@zydou Thank you very much for the answer!

@hh23333 Yes, please update the code and follow the commands listed in the benchmark. I suspect the default learning rate in the older version of code was too large.

@hh23333
Copy link
Author

hh23333 commented Sep 20, 2017

@zydou Thank you very much for your help. The problem has been solved when I upgrade the latest version Open-reid and pytorch.
@Cysu Yes, it has been solved when I upgrade, and lr=0.01 is too large. In addition, I have modified lr to 0.0003 when run the old version, it also has this problem. When i upgrade the pytorch to version 0.2.0, and modifid the old code:
dist_an.append(dist[i][1-mask[i]].min()) to dist_an.append(dist[i][mask[i] == 0].min()) like latest version does, the problem solved.
thanks a lot for your code again.

@Cysu
Copy link
Owner

Cysu commented Sep 20, 2017

@hh23333 Great to hear that! Happy experimenting with open-reid.

@Cysu Cysu closed this as completed Sep 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants