MTCNN-Tensorflow
MTCNN-Tensorflow copied to clipboard
one_image_test.py Error:AssertionError: the params dictionary is not valid
我不想进行训练模型,我想直接在我自己的图片上进行人脸检测的测试,所以直接运行了 python one_image_test.py 命令,然后提示:
Traceback (most recent call last):
File "one_image_test.py", line 28, in <module>
PNet = FcnDetector(P_Net, model_path[0])
File "../Detection/fcn_detector.py", line 35, in __init__
assert readstate, "the params dictionary is not valid"
AssertionError: the params dictionary is not valid
本人比较菜,作者能否详解写一下测试和训练的具体步骤,要不看起来云里雾里的
模型的路劲不对啊,代码里面下载的默认路劲出错的。我的修改可以参考`prefix = ['../data/MTCNN_model/PNet_landmark/PNet', '../data/MTCNN_model/RNet_landmark/RNet', '../data/MTCNN_model/ONet_landmark/ONet'] epoch = [18, 14, 16] batch_size = [2048, 64, 16] model_path = ['%s-%s' % (x, y) for x, y in zip(prefix, epoch)]
load pnet model
if slide_window: PNet = Detector(P_Net, 12, batch_size[0], model_path[0]) else: # print model_path[0] PNet = FcnDetector(P_Net, model_path[0]) detectors[0] = PNet `
模型的路劲不对啊,代码里面下载的默认路劲出错的。我的修改可以参考`prefix = ['../data/MTCNN_model/PNet_landmark/PNet', '../data/MTCNN_model/RNet_landmark/RNet', '../data/MTCNN_model/ONet_landmark/ONet'] epoch = [18, 14, 16] batch_size = [2048, 64, 16] model_path = ['%s-%s' % (x, y) for x, y in zip(prefix, epoch)]
load pnet model
if slide_window: PNet = Detector(P_Net, 12, batch_size[0], model_path[0]) else:
print model_path[0]
PNet = FcnDetector(P_Net, model_path[0]) detectors[0] = PNet `
大佬,想问一下,怎么加载预训练的模型,本人小白QAQ