windows7 python3.5.2下安装使用FaceNet进行人脸检测测试

参考链接:

https://blog.csdn.net/xiangxianghehe/article/details/72809600

https://blog.csdn.net/chenhaifeng2016/article/details/73217756

安装下列包: scipy, scikit-learn, opencv-python, h5py, matplotlib, Pillow, requests, psutil

pip3 install XXX


Traceback (most recent call last):
  File "F:\Python35\lib\site-packages\tensorflow\python\framework\importer.py",
line 644, in import_graph_def
    op._add_input(source_tensor, dtype=input_type)
  File "F:\Python35\lib\site-packages\tensorflow\python\framework\ops.py", line
1865, in _add_input
    (tensor.dtype.name, dtype.name))
TypeError: Cannot convert a tensor of type int32 to an input of type int64


During handling of the above exception, another exception occurred:


Traceback (most recent call last):
  File "src\validate_on_lfw.py", line 164, in <module>
    main(parse_arguments(sys.argv[1:]))
  File "src\validate_on_lfw.py", line 73, in main
    facenet.load_model(args.model, input_map=input_map)
  File "E:\kid\robot\deepLearning\facenet\facenet\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 "F:\Python35\lib\site-packages\tensorflow\python\training\saver.py", line
 1838, in import_meta_graph
    **kwargs)
  File "F:\Python35\lib\site-packages\tensorflow\python\framework\meta_graph.py"
, line 660, in import_scoped_meta_graph
    producer_op_list=producer_op_list)
  File "F:\Python35\lib\site-packages\tensorflow\python\util\deprecation.py", li
ne 316, in new_func
    return func(*args, **kwargs)
  File "F:\Python35\lib\site-packages\tensorflow\python\framework\importer.py",
line 648, in import_graph_def
    node, 'Input tensor %r %s' % (input_name, te)))
ValueError: graph_def is invalid at node 'Reshape': Input tensor 'label_batch:0'

 Cannot convert a tensor of type int32 to an input of type int64.

模型太旧不兼容了,幸亏校友相助下载了新模型才解决。后来想上载到csdn供其他人下载,但是却提示已经有资源了。


F:\Python35\lib\site-packages\h5py\__init__.py:36: FutureWarning: Conversion of
the second argument of issubdtype from `float` to `np.floating` is deprecated. I
n future, it will be treated as `np.float64 == np.dtype(float).type`.
  from ._conv import register_converters as _register_converters
2018-05-01 01:16:17.773214: I C:\tf_jenkins\workspace\rel-win\M\windows\PY\35\te
nsorflow\core\platform\cpu_feature_guard.cc:137] Your CPU supports instructions
that this TensorFlow binary was not compiled to use: AVX AVX2
Model directory: src\models\20180402-114759
Metagraph file: model-20180402-114759.meta
Checkpoint file: model-20180402-114759.ckpt-275
Runnning forward pass on LFW images
............
Accuracy: 0.98500+-0.00658
Validation rate: 0.90100+-0.02395 @ FAR=0.00067
Area Under Curve (AUC): 0.998
Equal Error Rate (EER): 0.016
2018-05-01 03:39:48.239704: W C:\tf_jenkins\workspace\rel-win\M\windows\PY\35\te
nsorflow\core\kernels\queue_base.cc:277] _2_input_producer: Skipping cancelled e
nqueue attempt with queue not closed
2018-05-01 03:39:48.415714: W C:\tf_jenkins\workspace\rel-win\M\windows\PY\35\te
nsorflow\core\kernels\queue_base.cc:285] _1_FIFOQueueV2: Skipping cancelled dequ
eue attempt with queue not closed
2018-05-01 03:39:48.418715: W C:\tf_jenkins\workspace\rel-win\M\windows\PY\35\te
nsorflow\core\kernels\queue_base.cc:285] _1_FIFOQueueV2: Skipping cancelled dequ
eue attempt with queue not closed
2018-05-01 03:39:48.452716: W C:\tf_jenkins\workspace\rel-win\M\windows\PY\35\te
nsorflow\core\kernels\queue_base.cc:285] _1_FIFOQueueV2: Skipping cancelled dequ
eue attempt with queue not closed
2018-05-01 03:39:48.453717: W C:\tf_jenkins\workspace\rel-win\M\windows\PY\35\te
nsorflow\core\kernels\queue_base.cc:285] _1_FIFOQueueV2: Skipping cancelled dequ
eue attempt with queue not closed
2018-05-01 03:39:48.453717: W C:\tf_jenkins\workspace\rel-win\M\windows\PY\35\te
nsorflow\core\kernels\queue_base.cc:285] _1_FIFOQueueV2: Skipping cancelled dequ
eue attempt with queue not closed
2018-05-01 03:39:48.455717: W C:\tf_jenkins\workspace\rel-win\M\windows\PY\35\te
nsorflow\core\kernels\queue_base.cc:285] _1_FIFOQueueV2: Skipping cancelled dequ
eue attempt with queue not closed
2018-05-01 03:39:48.455717: W C:\tf_jenkins\workspace\rel-win\M\windows\PY\35\te
nsorflow\core\kernels\queue_base.cc:285] _1_FIFOQueueV2: Skipping cancelled dequ
eue attempt with queue not closed
2018-05-01 03:39:48.456717: W C:\tf_jenkins\workspace\rel-win\M\windows\PY\35\te
nsorflow\core\kernels\queue_base.cc:285] _1_FIFOQueueV2: Skipping cancelled dequ

eue attempt with queue not closed

完成测试。

猜你喜欢

转载自blog.csdn.net/llrraa2010/article/details/80159881
今日推荐