Giter Site home page Giter Site logo

Comments (13)

YuanXinCherry avatar YuanXinCherry commented on June 1, 2024 1

You're welcome.
To simulate the open-set re-ID setting, we randomly select 100 images from other datasets as new queries.
100_ResNet-50.mat is obtained like this.
100_ResNet-50.mat has the same format as 3368_ResNet-50.mat:
mat:{'distmat':distmat,'gallery_label':gallery_label,'gallery_cam':gallery_cam,'query_label':query_label,'query_cam':query_cam}
For your testing convenience, I also have shared 100_ResNet-50.mat data.
https://ws28.cn/f/434qc11ssrs

from person-reid-evaluation.

YuanXinCherry avatar YuanXinCherry commented on June 1, 2024

First of all, thank you for your great interest in our work.
3368_ResNet-50.mat is the distance matrix extracted on Market -1501 with the following data format:
mat:{'distmat':distmat,'gallery_label':gallery_label,'gallery_cam':gallery_cam,'query_label':query_label,'query_cam':query_cam} # Save to Mat for testing
You can use other methods to extract the data in this format according to your needs.
Sorry for the inconvenience, our evaluation code may not be well-written, but we have been working on optimizing the code to make it easier for users to use for evaluation.

from person-reid-evaluation.

YuanXinCherry avatar YuanXinCherry commented on June 1, 2024

For your testing convenience, I have shared 3368_ResNet-50.mat data.
https://ws28.cn/f/431f9cku3gs

from person-reid-evaluation.

kobewangSky avatar kobewangSky commented on June 1, 2024

Hi Mr. Cherry,
Thanks for your help!
I will test that
and I have another question
100_ResNet-50.mat for open-set,
how can I generate that~?

from person-reid-evaluation.

kobewangSky avatar kobewangSky commented on June 1, 2024

Hi Mr. Cherry,
Thanks for your help
and I use a distance matrix math to get "distmat"
code is in here~

def euclidean_squared_distance(input1, input2):
"""Computes euclidean squared distance.
Args:
input1 (torch.Tensor): 2-D feature matrix.
input2 (torch.Tensor): 2-D feature matrix.
Returns:
torch.Tensor: distance matrix.
"""
m, n = input1.size(0), input2.size(0)
mat1 = torch.pow(input1, 2).sum(dim=1, keepdim=True).expand(m, n)
mat2 = torch.pow(input2, 2).sum(dim=1, keepdim=True).expand(n, m).t()
distmat = mat1 + mat2
distmat.addmm_(1, -2, input1, input2.t())
return distmat

code

I use old evaluation get 0.88 mAp,
but use your evaluation just get 0.080 mAp,
Is my euclidean_squared_distance is wrong~?
May you provide your way to do that~?

from person-reid-evaluation.

YuanXinCherry avatar YuanXinCherry commented on June 1, 2024

You don't need to calculate the distance. This "distmat" is the European distance that has been calculated and normalized and can be brought directly to the test.

from person-reid-evaluation.

YuanXinCherry avatar YuanXinCherry commented on June 1, 2024

If you test it in your own way, the final distance should be normalized.

from person-reid-evaluation.

YuanXinCherry avatar YuanXinCherry commented on June 1, 2024

Attention:To facilitate the division of thresholds, distances must be normalized to the range of [0, 1].

from person-reid-evaluation.

kobewangSky avatar kobewangSky commented on June 1, 2024

oh~ sorry~
I forget to say, use your .mat data all is good,

but now I want to use your evaluation to work on my dataset and my re-id model, I want to evaluation my mode,
So I get my data's feature and want to calculate the distance ~~

from person-reid-evaluation.

YuanXinCherry avatar YuanXinCherry commented on June 1, 2024

I'm sorry for the confusion in your work.

Note that you get the features directly from your method, then calculate the distances using the original method, and finally, it is important to remember that there is an important step that must normalize the distances you calculate to the [0,1] range.

After that, you can test your method directly!

from person-reid-evaluation.

kobewangSky avatar kobewangSky commented on June 1, 2024

oh!!!!
that means I get my distmat, just need to go through distmat = distmat / distmat.max()
ok~~! I will try that~!
Thanks for your help again~!

from person-reid-evaluation.

YuanXinCherry avatar YuanXinCherry commented on June 1, 2024

You're welcome, we're using Min-Max Normalization. such as distance = (distance - distance.min()) / (distance.max() - distance.min())

from person-reid-evaluation.

YuanXinCherry avatar YuanXinCherry commented on June 1, 2024

If you encounter any follow-up questions, feel free to ask them.
Thank you for your support of our work!

from person-reid-evaluation.

Related Issues (1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.