Cysu / open-reid

Open source person re-identification library in python
https://cysu.github.io/open-reid/
MIT License
1.34k stars 349 forks source link

Triplet Mining #36

Closed aytackanaci closed 6 years ago

aytackanaci commented 6 years ago

Hi, I couldn't find in the code where you select PK images for mini-batch. Which variation of triplet loss is implemented here?

thanks, Aytac

zydou commented 6 years ago

At here: https://github.com/Cysu/open-reid/blob/5db4f6b4245b8b24073f19c161a3b869121a1d2c/reid/utils/data/sampler.py#L11-L35

aytackanaci commented 6 years ago

Great, thanks.

Cysu commented 6 years ago

@zydou, thank you very much for the code pointer!

@aytackanaci, we just randomly 1. choose an identity, 2. choose instances for him/her, 3. repeated until fill up the minibatch.