Skip to content

Conversation

@przepeck
Copy link
Collaborator

@przepeck przepeck commented Jan 8, 2026

🛠 Summary

CVS-171387
Adding preprocessing CLI parameters for choosing mean. scale and color format.

🧪 Checklist

  • Unit tests added.
  • The documentation updated.
  • Change follows security best practices.
    ``

@przepeck przepeck changed the title Classic models preprocessing [WIP] Classic models preprocessing Jan 15, 2026
Copilot AI review requested due to automatic review settings January 20, 2026 10:47
Copy link
Contributor

Copilot AI left a 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 --precision with validation requiring --layout to 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.

@przepeck przepeck changed the title [WIP] Classic models preprocessing Classic models preprocessing Jan 20, 2026
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