KaiyangZhou / deep-person-reid

Torchreid: Deep learning person re-identification in PyTorch.
https://kaiyangzhou.github.io/deep-person-reid/
MIT License
4.34k stars 1.15k forks source link

How to apply cross dataset validation on custom torchreid model #445

Open FatimaZulfiqar opened 3 years ago

FatimaZulfiqar commented 3 years ago

Hi. I have a custom person reid model that is currently not available in this torchreid library. I want to perform cross dataset validation on that custom-designed model. The model is originally trained on msmt17 dataset and I have its checkpoint saved. I want to evaluate this model on market1501 or dukemtmc. How can I do that? Can anybody please guide me?

KaiyangZhou commented 3 years ago

https://github.com/KaiyangZhou/deep-person-reid#cross-domain-setting

FatimaZulfiqar commented 3 years ago

Thank you for your response. yes, I did that but the issue is that the person Reid model that I have is not present in this GitHub repository. I have its weights saved in pytorch format. I want to load the model weights and then perform cross dataset validation

KaiyangZhou commented 3 years ago

To use your own model, you can simply put your model in the initialization of the engine (see https://github.com/KaiyangZhou/deep-person-reid#get-started-30-seconds-to-torchreid)

KaiyangZhou commented 3 years ago

If you are referring to model weights, simply load the weights to the specific model before giving it to the engine

see https://github.com/KaiyangZhou/deep-person-reid/blob/master/scripts/main.py#L168