Skip to content

[WIP] Add NCNN MicroPython C API Bindings #6247

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

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

inspireMeNow
Copy link
Contributor

This pull request adds MicroPython bindings for the NCNN C API, enabling developers to run NCNN neural network inference directly within MicroPython environments.

Changes:

  • Introduced a new micropython/c_api directory containing the binding source files.

  • Wrapped core NCNN functionalities (e.g., model loading, extractor creation) with MicroPython C extension functions.

  • Defined MicroPython objects and their methods to make the NCNN API easy to use like regular Python code.

  • Added instructions for compiling the bindings on supported platforms.

  • Included example scripts demonstrating how to load a model and run inference in MicroPython.

@tencent-adm
Copy link
Member

CLA assistant check
Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Copy link

The binary size change of libncnn.so (bytes)

architecture base size pr size difference
x86_64 15648008 15648008 0 😘
armhf 6649020 6649020 0 😘
aarch64 9987736 9987736 0 😘

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