Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Embeddings model d #107

Open
sonfire186 opened this issue Jun 3, 2020 · 0 comments
Open

Embeddings model d #107

sonfire186 opened this issue Jun 3, 2020 · 0 comments

Comments

@sonfire186
Copy link

sonfire186 commented Jun 3, 2020

I am embedding with
resnet_v1_50/E_BN2/Identity:0
I count the distance

dot = np.sum(np.multiply(em1, em2), axis=1)
norm = np.linalg.norm(em1, axis=1) * np.linalg.norm(em2, axis=1)
similarity = dot / norm

But get weird numbers
Also, the question is about the input layer, should the image be filed like this? RGB/BGR?

crops = cv2.resize(face, (112, 112), interpolation=cv2.INTER_CUBIC)
crops = np.array(crops)
crops = crops.astype('float64')
crops -= 127.5
crops *= 0.0078125
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant