I am new to the machine learning @davidsandberg
I am trying to run the (Validate_on_lfw .py) in windows but i get this error:
Model directory: pretrained_model
Metagraph file: model-20180402-114759.meta
Checkpoint file: model-20180402-114759.ckpt-275
Traceback (most recent call last):
File "C:\Users\user\Desktop\noor2\project2\facenet-master\facenet-master\src\validate_on_lfw.py", line 166, in
main(parse_arguments(sys.argv[1:]))
File "C:\Users\user\Desktop\noor2\project2\facenet-master\facenet-master\src\validate_on_lfw.py", line 75, in main
facenet.load_model("pretrained_model", input_map=input_map)
File "C:\Users\user\Desktop\noor2\project2\facenet-master\facenet-master\src\facenet.py", line 381, in load_model
saver = tf.train.import_meta_graph(os.path.join(model_exp, meta_file), input_map=input_map)
File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\training\saver.py", line 1686, in import_meta_graph
**kwargs)
File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\framework\meta_graph.py", line 504, in import_scoped_meta_graph
producer_op_list=producer_op_list)
File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\framework\importer.py", line 283, in import_graph_def
raise ValueError('No op named %s in defined operations.' % node.op)
ValueError: No op named DecodeBmp in defined operations.
any help ?
hi @nonameever95 @davidsandberg ,
I met a similar situation like yours.
The process ended with an "Image Processing-Related" error.
KeyError is:
KeyError: "The name 'decode_image/cond_jpeg/is_png' refers to an Operation not in the graph."
Evironment is:
Ubuntu 16.04 64bit
tensorflow version: 1.10.0
CUDA 9.0
CUDNN 7.2
Directory tree:
(I use facenet and tensorflow in virtualenv)
โโโ datasets
โย ย โโโ lfw
โย ย โโโ lfw_mtcnnpy_160
โย ย โโโ raw
โโโ facenet
โย ย โโโ contributed
โย ย โโโ data
โย ย โย ย โโโ images
โย ย โโโ src
โย ย โย ย โโโ align
โย ย โย ย โโโ generative
โย ย โย ย โโโ models
โย ย โโโ test
โย ย โโโ tmp
โย ย โโโ util
โโโ models
โย ย โโโ facenet
โย ย โโโ 20180402-114759
โโโ venv
โโโ bin
โโโ include
โย ย โโโ python2.7 -> /usr/include/python2.7
โโโ lib
โย ย โโโ python2.7
โโโ local
โย ย โโโ bin -> /home/oesys2018/tensorflowEnv/venv/bin
โย ย โโโ include -> /home/oesys2018/tensorflowEnv/venv/include
โย ย โโโ lib -> /home/oesys2018/tensorflowEnv/venv/lib
โโโ share
โโโ python-wheels
Hope someone can help.
Thanks.
This problem is solved !
The error was due to the version of tensorflow
So the model was build using a different version than the one I was using
I had tensorflow 1.5
So i install tensorflow 1.3 and it worked !
same.
I install tensorflow1.7 and it worked.
I also have the same problem, how can it be compatible to tensorflow 1.10?
@karlTUM
Just install another version of Tensorflow. According the facenet github web suggesttion, use r1.7
I had tried r1.10 and it went failed.
The same. I instal tensorflow 1.7 , it works!!!! Thanks for everyone's advice.
@QCurry
Just run it with TF 1.12 successfully.
Your issue can be solved by adding a name scope around the entire facenet.create_input_pipeline function.
The bug is because the code uses import_meta_graph to create the graph on top of an existing graph. This usage is error-prone due to potential name conflicts.
I trained a model on my GPU and trying to run validate_lfw there only.
I am still running into issues. There should be no TF version mismatch in my case.
Thank you @ppwwyyxx! Putting the body of facenet.create_input_pipeline in a with tf.name_scope("tempscope"): or with tf.Graph().as_default(): block fixes it (Tensorflow 1.10).

@farimani thank you~
Thank you @ppwwyyxx ! Adding a name scope around the entire facenet.create_input_pipeline function also works on tf1.12
Thank you @ppwwyyxx ! It works on tf 1.12
Yes I can also confirm @ppwwyyxx solution worked on my own installation of tf 1.12
Thanks so much @ppwwyyxx ! The solution works on tf 1.13 of my own (virtual env)
I implemented the solution of @VictorZhang2014 and it work for me, using tensorflow 1.13.1
@VictorZhang2014 .. thanks ... it also work foe me..
I also implemented the solution of @VictorZhang2014 and it worked for me, using tensorflow 1.12.0, python 2.7 on ubuntu 20 version.
Most helpful comment
@farimani thank you~