Giter Site home page Giter Site logo

Comments (6)

shouxieai avatar shouxieai commented on August 12, 2024

a = np.random.rand(1, 8)
b = np.random.rand(1, 8)
cosine_distance = (a @ b.T) / (np.linalg.norm(a) * np.linalg.norm(b))

from tensorrt_pro.

goldwater668 avatar goldwater668 commented on August 12, 2024

我按照你上述的公式:
train_feature=arcface.commit(train_crop,train_face.landmark).get()
test_feature=arcface.commit(test_crop,test_face.landmark).get()
dist = np.dot(train_feature,test_feature.transpose()) / (np.linalg.norm(train_feature) * np.linalg.norm(test_feature))
得出结果却是:
./face/recognize/2ys1.jpg
dist: [[1.0000001]]
dist: [[1.0000001]]
./face/recognize/2ys3.jpg
dist: [[1.0000001]]
dist: [[1.0000001]]
dist: [[1.0000001]]
dist: [[1.0000001]]
dist: [[1.0000001]]
dist: [[1.0000001]]
dist: [[1.0000002]]
dist: [[1.0000001]]
dist: [[1.0000001]]
./face/recognize/2ys5.jpg
dist: [[1.0000001]]
dist: [[1.0000001]]
dist: [[1.0000001]]
./face/recognize/2ys2.jpg
dist: [[1.0000001]]

from tensorrt_pro.

shouxieai avatar shouxieai commented on August 12, 2024

提交了arcface案例,请参考:https://github.com/shouxieai/tensorRT_Pro/blob/main/python/test_arcface.py

from tensorrt_pro.

goldwater668 avatar goldwater668 commented on August 12, 2024

@shouxieai AttributeError: 'trtpy.libtrtpyc.FaceBox' object has no attribute 'width'

from tensorrt_pro.

shouxieai avatar shouxieai commented on August 12, 2024

重新编译后解决

from tensorrt_pro.

goldwater668 avatar goldwater668 commented on August 12, 2024

@shouxieai arcface在进行特征提取的时候,为什么需要输入人脸关键点呢?retinaface中有一个函数crop_face_and_landmark裁剪的人脸很大,我想自己裁剪人脸,然后输入到arcface中进行特征提取,应该怎么做呢,之所以这样做,是因为发现提取有些同一个
人脸特征相似度相差很大

from tensorrt_pro.

Related Issues (20)

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.