Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

one_image_test.py Error:AssertionError: the params dictionary is not valid #284

Open
ChauncyFr opened this issue Jun 18, 2019 · 2 comments

Comments

@ChauncyFr
Copy link

我不想进行训练模型,我想直接在我自己的图片上进行人脸检测的测试,所以直接运行了 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

本人比较菜,作者能否详解写一下测试和训练的具体步骤,要不看起来云里雾里的

@beibuwandeluori
Copy link

模型的路劲不对啊,代码里面下载的默认路劲出错的。我的修改可以参考`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
`

@DamDam123
Copy link

模型的路劲不对啊,代码里面下载的默认路劲出错的。我的修改可以参考`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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants