天天看點

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

完成測試。

繼續閱讀