-
Notifications
You must be signed in to change notification settings - Fork 237
Classic models preprocessing #3895
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds preprocessing CLI parameters for classic models, enabling users to configure mean, scale, color format, and precision transformations directly through command-line arguments or configuration files. This simplifies model deployment by eliminating the need for custom preprocessing nodes in DAG pipelines.
Changes:
- Added new CLI parameters:
--mean,--scale,--color_format, and--precisionwith validation requiring--layoutto be set - Implemented parsing and application of preprocessing configurations in the model loading pipeline
- Updated the ONNX model demo to use built-in preprocessing instead of DAG-based custom nodes
Reviewed changes
Copilot reviewed 22 out of 22 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| src/test/ovmsconfig_test.cpp | Added test cases for new preprocessing parameters validation |
| src/test/modelconfig_test.cpp | Added unit tests for parsing mean, scale, color format, and precision parameters |
| src/test/c_api_tests.cpp | Updated tests to verify new preprocessing fields and commented out failing test |
| src/status.hpp | Added new status codes for preprocessing parameter validation errors |
| src/modelmanager.cpp | Integrated preprocessing parameter parsing into model configuration flow |
| src/modelinstance.hpp | Updated method signature to reflect layout configuration changes |
| src/modelinstance.cpp | Refactored preprocessing application logic to handle new parameters |
| src/modelconfig.hpp | Added data members and method declarations for preprocessing parameters |
| src/modelconfig.cpp | Implemented parsing logic for mean, scale, color format, and precision |
| src/config.hpp | Added getter methods for preprocessing parameters |
| src/config.cpp | Implemented getter methods returning preprocessing configuration values |
| src/color_format_configuration.hpp | New file defining color format configuration class |
| src/color_format_configuration.cpp | Implemented color format parsing and validation |
| src/cli_parser.cpp | Added CLI options for preprocessing parameters with layout dependency validation |
| src/capi_frontend/server_settings.hpp | Added preprocessing fields to model settings structure |
| src/BUILD | Added color format configuration library dependency |
| spelling-whitelist.txt | Updated line numbers for spelling whitelist entries |
| docs/parameters.md | Documented new preprocessing parameters |
| demos/using_onnx_model/python/onnx_model_demo.py | Fixed input names to use correct model input |
| demos/using_onnx_model/python/config.json | Removed DAG configuration file (now using built-in preprocessing) |
| demos/using_onnx_model/python/README.md | Updated documentation to reflect built-in preprocessing approach |
| demos/using_onnx_model/python/Makefile | Removed Makefile (no longer needed without custom nodes) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
🛠 Summary
CVS-171387
Adding preprocessing CLI parameters for choosing mean. scale and color format.
🧪 Checklist
``