Giter Club home page Giter Club logo

face-recognition-cpp-tensorrt's Issues

Sometimes Similarity scores are above 1

Hi,
After compute similarity, some scores are above 1. This part of code get person and score.

std::tuple<std::vector<std::string>, std::vector<float>> ArcFaceIR50::getOutputs(float *output_sims) {
    /*
        Get person corresponding to maximum similarity score based on cosine similarity matrix.
    */
    std::vector<std::string> names;
    std::vector<float> sims;
    for (int i = 0; i < croppedFaces.size(); ++i) {
        int argmax = std::distance(output_sims + i * classCount, std::max_element(output_sims + i * classCount, output_sims + (i + 1) * classCount));
        float sim = *(output_sims + i * classCount + argmax);
        std::string name = classNames[argmax];
        names.push_back(name);
        sims.push_back(sim);
    }
    return std::make_tuple(names, sims);
}

I put a cout, printing sim and name. name is the user ID in database and sim is a float, but get numbers liks 122.717. Is it possible to get these values ? Why ?
Another question is, How do you get the sim value ? May you explain me. Why compute memory position in that way?

Thanks,

Hi, Can you provide these files?

This a excellent project, the "config.json" have some parameters:

"input_embeddingsFile": "../data/test.json",
"input_numImagesFile": "../data/test_count.txt"

Can you provide these files? Thanks

Face Alignment

Hi

I wanted to ask if there's any reason that you don't align the detected faces before delivering them to the Feature Extractor?

ERROR

[INFO] Init cuBLASLt cosine similarity calculator...
terminate called after throwing an instance of 'nlohmann::detail::type_error'
what(): [json.exception.type_error.305] cannot use operator[] with a numeric argument with object
Aborted (core dumped)
运行环境:Jetson Xavier NX,cuda10.2,cudnn8.0.0

Landmarks

Hello , thanks for share code , it is working good ... i have a question , how we could get landmarks ?

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.