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

Add script that would convert to a pytorch module #650

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

JACKHAHA363
Copy link

This works on me for pytorch 0.4 and python 3.6. I think it could be helpful for researcher to play with it. This is just a first step, and ideally, the conversion from pytorch module to the corresponding .dat would also be useful for deployment,

return cnn

if __name__ == '__main__':
pnet_path = '/home/yuchen/QuindiTech/OpenFace/lib/local/LandmarkDetector/model/mtcnn_detector/PNet.dat'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you use a relative path here instead?

pnet = decode_cnn(f)
print(pnet)
imgs = torch.rand(1, 3, 128, 128)
result = pnet(imgs)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you confirmed that this results in the same output as the Matlab or C++ versions?

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

Successfully merging this pull request may close these issues.

2 participants