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

Properly serialize ML models #1209

Open
mcm001 opened this issue Feb 1, 2024 · 5 comments
Open

Properly serialize ML models #1209

mcm001 opened this issue Feb 1, 2024 · 5 comments

Comments

@mcm001
Copy link
Contributor

mcm001 commented Feb 1, 2024

Actually use the whole models folder for things. Expose a way to CRUD new model files and change their type in a card in the UI, and allow object detection pipelines to choose between different models.

In the backend, we could store models as binary blobs inside a new sql database, or in the models folder and keep a list of (model path, parameters) in the main config database. Or something new I haven't thought of

@srimanachanta
Copy link
Member

How are models structures? Is there any performance/quality loss if we blob them into the database? Implementing this into the UI should be fairly trivial (don't quote me)

@mcm001
Copy link
Contributor Author

mcm001 commented Feb 2, 2024

They're just binary blobs of (sometimes several MB of) data. No quality loss in a database, just the tradeoff of increased filesystem robustness vs slowness.

@mcm001
Copy link
Contributor Author

mcm001 commented Feb 2, 2024

But yeah the frontend seems to be super straightforward of a project as things go. I'll try sql first and if that's too slow, move to files in a folder?

@mcm001
Copy link
Contributor Author

mcm001 commented Feb 5, 2024

Backend recipe proposal:

The current sql db can store a list of known ML model relative paths and their type/backend. On startup the NNModelManager can add any new ones that appear as UNKNOWN or something as well. Users would be able to see the model name in the UI and set the backend (eg RKNN) and type (eg, YOLOV5)

@samfreund
Copy link
Contributor

samfreund commented Feb 9, 2025

Duplicate of #1748

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