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

Converting Fine-tuned Weights for Mobile Deployment #129

Open
KaranBhuva22 opened this issue Jul 16, 2024 · 2 comments
Open

Converting Fine-tuned Weights for Mobile Deployment #129

KaranBhuva22 opened this issue Jul 16, 2024 · 2 comments

Comments

@KaranBhuva22
Copy link

Hello,

Thank you for developing the open-source silent anti-spoofing project! I'm currently working on integrating it into my application and have successfully fine-tuned your base models (versions 2.7_80x80_MiniFASNetV2.pth and 4_0_0_80x80_MiniFASNetV1SE.pth) by modifying the code.

To deploy these models on Android and iOS devices, I need them in a binary format. While you offer pre-built binaries for the base models, I'd like to convert my fine-tuned weights for optimal performance. Unfortunately, converting them myself with Caffe seems impractical as the framework hasn't received updates since 2020. I have tried to convert pth -> caffe -> ncnn but this solution works for the first model (2.7_80x80_MiniFASNetV2.pth), it's not compatible with the second model (4_0_0_80x80_MiniFASNetV1SE.pth). This is because the second model uses an SE module, which is not supported by the Pytorch2Caffe library.

I would greatly appreciate your assistance in converting our fine-tuned weights into a binary format suitable for mobile deployment. Since the conversion code isn't publicly available, any guidance or support would be extremely helpful.

@zhuyingSeu , @minivision-ailab

@cao-nv
Copy link

cao-nv commented Oct 14, 2024

I think Pytorch -> PNNX (new NCNN format to handle Pytorch model better) -> NCNN. You can get both ONNX, PNNX, and NCNN in one go.

@KaranBhuva22
Copy link
Author

@cao-nv thanks I will look into it.

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

2 participants