Face_Recognition icon indicating copy to clipboard operation
Face_Recognition copied to clipboard

Issue in running the code

Open rajm893 opened this issue 6 years ago • 4 comments

I have tried running the code and got the following error ('images' contain no shape)

python create_face_embeddings.py --lfw_batch_size 100 --model /home/raj/face_recognition-new/lib/model/20180408-102900/20180408-102900.pb --image_size 160 /home/raj/anaconda3/lib/python3.6/site-packages/h5py/__init__.py:34: FutureWarning: Conversion of the second argument of issubdtype from floattonp.floatingis deprecated. In future, it will be treated asnp.float64 == np.dtype(float).type. from ._conv import register_converters as _register_converters 2018-06-26 11:04:32.254034: I tensorflow/core/platform/cpu_feature_guard.cc:137] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2 Model filename: /home/raj/face_recognition-new/lib/model/20180408-102900/20180408-102900.pb Traceback (most recent call last): File "create_face_embeddings.py", line 115, in <module> main(parse_arguments(sys.argv[1:])) File "create_face_embeddings.py", line 79, in main images_placeholder = tf.image.resize_images(images_placeholder,(160,160)) File "/home/raj/anaconda3/lib/python3.6/site-packages/tensorflow/python/ops/image_ops_impl.py", line 741, in resize_images raise ValueError('\'images\' contains no shape.') ValueError: 'images' contains no shape. I given below directory for image input. Raj = ['/home/raj/face_recognition-new/lib/dataset/Raj/' + f for f in os.listdir('/home/raj/face_recognition-new/lib/dataset/Raj')] and stored in paths as below paths = Sham+Raj Can anyone help me solving this issue

rajm893 avatar Jun 26 '18 05:06 rajm893

Give the path of the model folder relative to the file create_face_embeddings.py also it is enough to enter the name of the folder containing the model files. In my case it was just,

python create_face_embeddings.py --lfw_batch_size 100 --model cpkt/ --image_size 160

sujigrena avatar Jul 20 '18 16:07 sujigrena

Hi all

I have the same problem alueError: 'images' contains no shape.!!

NeamahAlskeini avatar Aug 16 '18 23:08 NeamahAlskeini

I pass this issue by comment line 61 in script create_face_embeddings.py: images_placeholder = tf.image.resize_images(images_placeholder,(160,160))

trantuanvu1602 avatar Mar 11 '19 08:03 trantuanvu1602

have same issue v alueError: 'images' contains no shape.!!

yashpatel7025 avatar Jan 13 '20 18:01 yashpatel7025