Coder Social home page Coder Social logo

anguyen8 / deepface-emd Goto Github PK

View Code? Open in Web Editor NEW
53.0 4.0 7.0 449.65 MB

Code for CVPR 2022 https://arxiv.org/abs/2112.04016 DeepFace-EMD Re-ranking Using Patch-wise Earth Movers Distance Improves Out-Of-Distribution Face Identification

Python 99.54% Shell 0.46%
computer-vision face-identification earth-movers-distance deep-learning

deepface-emd's People

Contributors

anguyen8 avatar haithanhp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

deepface-emd's Issues

Convert pytorch model to onnx model?

Hi @anguyen8,
Thank your project.
I tried to convert resnet18_110.pth to onnx model, but the error:
"Unsupported: ONNX export of operator adaptive_avg_pool2d, output size that are not factor of input size. Please feel free to request support or submit a pull request on PyTorch GitHub."
Can you help me to solve this problem? Thank you.

Code of LMK

I appreciate your insightful work, could you please release the code of LMK method?

train script?

Good job. I read the paper and code carefully, but I didn't find the training script. Can you provide some training script examples? thank you.

DeepFace-EMD for ViT

Hello!

Have you tried to use EMD with image features produced by visual transformer?
Looks like the last transformer layer of typical ViT outputs embeddings for each image patch, which is similar to the conv-features you use in the paper.

Is there any disadvantages to use such transformer features in your DeepFace-EMD method?
The only difference I see is that patch embeddings in ViT interact with each other throughout the whole image because of the attention mechanism, while conv-features are more local.

Thank you!

Question about Spatial Correlation Implementation

In the implementation for Spatial Correlation (emd_similarity function in emd.py), u and v are computed based on the distance instead of the similarity. Is it correct?

        elif method == 'sc':
            u = torch.sum(dis, 2)
            u = u / (u.sum(dim=1, keepdims=True) + 1e-7)
            v = torch.sum(dis, 1)
            v = v / (v.sum(dim=1, keepdims=True) + 1e-7)

Have you test it on resnet50 or larger networks?

Hello, Thanks for the great works!
I read the paper! I am wondering whether you have tested in arcface with resnet50 or larger networks? Would it still outperform other model without rank2? Thank you!

alignment for 128x128?

Meaningful work, when I want to use 128 * 128 to align people's faces, but I don't find ref_pts For 128x128? I haven't found the converted code, can you provide it?
thanks!

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.