Comments (13)
Currently there is no utility like that. It wouldn't be too much work to modify for example "validate_on_lfw" to take two jpeg images instead, but that would assume that the images has already been face-aligned. A nicer solution would be to integrate face alignment, for example from openface, but that would be some more work. But definitly worth doing!
from facenet.
Thanks
On Tue, May 17, 2016 at 6:26 AM, David Sandberg [email protected]
wrote:
Currently there is no utility like that. It wouldn't be too much work to
modify for example "validate_on_lfw" to take two jpeg images instead, but
that would assume that the images has already been face-aligned. A nicer
solution would be to integrate face alignment, for example from openface,
but that would be some more work. But definitly worth doing!—
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#16 (comment)
from facenet.
I modify validate_on_lfw.py for comparing 2 aligned face images and have
one question about dim of features for each person. Based on the code
below if images contains one face image,
feed_dict = { images_placeholder: images, phase_train_placeholder: False }
emb1 = sess.run([embeddings], feed_dict=feed_dict)
I expect emb1 should be one dim array with size 128. But emb1.shape shows
9x128.
Does facenet need 9x128 values/person face for recognition?
Openface uses 128 values/person face.
Thanks,
FC
On Tue, May 17, 2016 at 8:51 AM, kaishi Jeng [email protected] wrote:
Thanks
On Tue, May 17, 2016 at 6:26 AM, David Sandberg [email protected]
wrote:Currently there is no utility like that. It wouldn't be too much work to
modify for example "validate_on_lfw" to take two jpeg images instead, but
that would assume that the images has already been face-aligned. A nicer
solution would be to integrate face alignment, for example from openface,
but that would be some more work. But definitly worth doing!—
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#16 (comment)
from facenet.
I guess you have changed the batch_size to 2? If that is the case you should be able to get a tensor with the two embeddings of size 2x128 (if i remember correctly). And then you can just compute the l2 distance between the embeddings.
from facenet.
I change batch_size to 1 so that I can compute emb for each image.
WIth this change, I expect dim of return from sess.run should be 1x128,
but it is 9x128 which is weird
FC
On Fri, May 20, 2016 at 1:59 AM, David Sandberg [email protected]
wrote:
I guess you have changed the batch_size to 2? If that is the case you
should be able to get a tensor with the two embeddings of size 2x128 (if i
remember correctly). And then you can just compute the l2 distance between
the embeddings.—
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#16 (comment)
from facenet.
If I set batch_size =2, then dim of return from sess.run becomes 18x128.
Why is it not 2x128?
FC
On Fri, May 20, 2016 at 2:06 AM, kaishi Jeng [email protected] wrote:
I change batch_size to 1 so that I can compute emb for each image.
WIth this change, I expect dim of return from sess.run should be 1x128,
but it is 9x128 which is weirdFC
On Fri, May 20, 2016 at 1:59 AM, David Sandberg [email protected]
wrote:I guess you have changed the batch_size to 2? If that is the case you
should be able to get a tensor with the two embeddings of size 2x128 (if i
remember correctly). And then you can just compute the l2 distance between
the embeddings.—
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#16 (comment)
from facenet.
Hi again,
I tried to set batch_size = 1 and look at the dimensions of some tensors, and they are as expected:
images_placeholder: Tensor: Tensor("input:0", shape=(1, 96, 96, 3), dtype=float32)
embeddings: Tensor: Tensor("embeddings:0", shape=(1, 128), dtype=float32)
Have you checked the same tensors?
from facenet.
My aligned face image size is 144. If I redo face alignment to size 96, the
embeddings shape is (1,128) for one image.
Not sure why face image 144 will make embeddedings shape (9, 128)
On Fri, May 20, 2016 at 1:25 PM, David Sandberg [email protected]
wrote:
Hi again,
I tried to set batch_size = 1 and look at the dimensions of some tensors,
and they are as expected:
images_placeholder: Tensor: Tensor("input:0", shape=(1, 96, 96, 3),
dtype=float32)
embeddings: Tensor: Tensor("embeddings:0", shape=(1, 128), dtype=float32)
Have you checked the same tensors?—
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#16 (comment)
from facenet.
Ok, that makes more sense. The function that generates the inference graph only works for input images of size 96. The key is the line
resh1 = tf.reshape(pool6, [-1, 896])
With 96 pixel images the pool6 shape is (1, 1, 1, 896)
but with 144 pixel images it is(1, 3, 3, 896).
It would probably be better to throw an exception when this happens.
from facenet.
Thanks for compare.py utility.
Is your pretrained model, model-20160306.ckpt-500000, not comparable with the latest code? I got the following error when running compare.py:
Traceback (most recent call last):
File "./compare.py", line 80, in
main()
File "./compare.py", line 58, in main
saver.restore(sess, ckpt.model_checkpoint_path)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/saver.py", line 1104, in restore
{self.saver_def.filename_tensor_name: save_path})
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 332, in run
run_metadata_ptr)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 572, in _run
feed_dict_string, options, run_metadata)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 652, in _do_run
target_list, options, run_metadata)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 672, in _do_call
raise type(e)(node_def, op, message)
tensorflow.python.framework.errors.NotFoundError: Tensor name "incept5b/in4_conv1x1_55/weights/ExponentialMovingAverage" not found in checkpoint files ./models/facenet/20160514-234418/model.ckpt-1000
[[Node: save/restore_slice_331 = RestoreSlice[dt=DT_FLOAT, preferred_shard=-1, _device="/job:localhost/replica:0/task:0/cpu:0"](_recv_save/Const_0, save/restore_slice_331/tensor_name, save/restore_slice_331/shape_and_slice)]]
Caused by op u'save/restore_slice_331', defined at:
File "./compare.py", line 80, in
main()
File "./compare.py", line 52, in main
saver = tf.train.Saver(ema.variables_to_restore())
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/saver.py", line 845, in init
restore_sequentially=restore_sequentially)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/saver.py", line 515, in build
filename_tensor, vars_to_save, restore_sequentially, reshape)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/saver.py", line 271, in _AddRestoreOps
values = self.restore_op(filename_tensor, vs, preferred_shard)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/saver.py", line 186, in restore_op
preferred_shard=preferred_shard)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/io_ops.py", line 201, in _restore_slice
preferred_shard, name=name)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/gen_io_ops.py", line 325, in _restore_slice
preferred_shard=preferred_shard, name=name)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/op_def_library.py", line 693, in apply_op
op_def=op_def)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 2186, in create_op
original_op=self._default_original_op, op_def=op_def)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 1170, in init
self._traceback = _extract_stack()
from facenet.
No, there's a new model that is equivalent that you could download from
https://drive.google.com/file/d/0B5MzpY9kBtDVVFRyU2JCVmZXUEk/view?usp=sharing
from facenet.
It works OK with new model
Thanks
On Sun, May 22, 2016 at 1:15 PM, David Sandberg [email protected]
wrote:
No, there's a new model that is equivalent that you could download from
https://drive.google.com/file/d/0B5MzpY9kBtDVVFRyU2JCVmZXUEk/view?usp=sharing
—
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#16 (comment)
from facenet.
@kaishijeng Have you do it successfully?
from facenet.
Related Issues (20)
- command not found error (while trying align the LFW dataset)
- ValueError: Node 'gradients/InceptionResnetV1/Bottleneck/BatchNorm/cond/FusedBatchNorm_1_grad/FusedBatchNormGrad' has an _output_shapes attribute inconsistent with the GraphDef for output #3: Dimension 0 in both shapes must be equal, but are 0 and 512. Shapes are [0] and [512]. HOT 4
- TypeError: true_fn and false_fn arguments to tf.cond must have the same number, type, and overall structure of return values
- does facenet support docker HOT 1
- About tensorflow -v2.8.0, I have a error. HOT 1
- Validation loss
- ve
- How to make inference on a single image? HOT 1
- Bounding box is inaccurate HOT 2
- Error in Loading checkpoint file for facenet512
- Unable to open file (file signature not found) HOT 1
- CASIA Webface Dataset Link Needs Updating
- Incorrect bounding box
- Issue with Tensor Names in DeepSORT Integration with FaceNET Model
- Unable to use .pb in tensorflow's java api
- Unable to convert onnx model to TRT model
- ValueError: Node 'gradients/InceptionResnetV1/Bottleneck/BatchNorm/cond/FusedBatchNorm_1_grad/FusedBatchNormGrad' has an _output_shapes attribute inconsistent with the GraphDef for output #3: Dimension 0 in both shapes must be equal, but are 0 and 512. Shapes are [0] and [512]. HOT 1
- Request for Weight Files in faceswap-GAN Project
- How to add visualization to train_tripletloss.py
- Find
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from facenet.