Stores one parsed model configuration and runtime class-selection state.
More...
#include <ModelConfig.h>
|
|
const std::vector< float > & | getMean () const noexcept |
| | Get the per-channel mean vector from config.
|
| |
|
const std::vector< float > & | getStd () const noexcept |
| | Get the per-channel standard deviation vector from config.
|
| |
|
const std::string & | getModelPath () const noexcept |
| | Get the resolved absolute path to the ONNX model file.
|
| |
|
uint | getInputAlignment () const noexcept |
| | Get input alignment requirement (multiple-of value for H/W).
|
| |
|
bool | getApplyMeanStd () const noexcept |
| | Check whether mean/std normalization is enabled.
|
| |
|
bool | getNormalizeTo01 () const noexcept |
| | Check whether [0,255] -> [0,1] normalization is enabled.
|
| |
|
const std::vector< ClassInfo > & | getClasses () const noexcept |
| | Get all configured classes.
|
| |
| const ClassInfo * | getClassById (ClassId id) const noexcept |
| | Get class info by ID.
|
| |
| bool | setClassSelected (ClassId id, bool selected) noexcept |
| | Set the selected state of a class.
|
| |
| void | setApplyMeanStd (bool apply) noexcept |
| | Set whether to apply mean/std normalization.
|
| |
| void | setNormalizeTo01 (bool normalize) noexcept |
| | Set whether to normalize input to [0,1].
|
| |
| void | setInputAlignment (uint alignment) noexcept |
| | Set the input alignment value.
|
| |
Stores one parsed model configuration and runtime class-selection state.
A configuration is loaded from a JSON file via loadFromFile(), validated, and then used by ModelManager and UI components.
The expected JSON format is documented in ModelConfig.md.
- Author
- Dominik Wüst (domin.nosp@m.ik.w.nosp@m.uest@.nosp@m.iosb.nosp@m..frau.nosp@m.nhof.nosp@m.er.de)
- Date
- March 2026
◆ getClassById()
Get class info by ID.
- Parameters
-
- Returns
- Pointer to ClassInfo if found, nullptr otherwise
◆ loadFromFile()
Load a model configuration from a JSON file Performs validation:
- Checks for duplicate class IDs
- Verifies model file exists (or defaults to config path with .onnx extension)
- Parameters
-
| jsonPath | Path to the JSON configuration file |
- Returns
- ModelConfig if successful, Error otherwise
- See also
- ModelConfig.md.
◆ setApplyMeanStd()
| void MCFG::ModelConfig::setApplyMeanStd |
( |
bool |
apply | ) |
|
|
noexcept |
Set whether to apply mean/std normalization.
- Parameters
-
| apply | true to enable mean/std application, false to disable |
◆ setClassSelected()
| bool MCFG::ModelConfig::setClassSelected |
( |
ClassId |
id, |
|
|
bool |
selected |
|
) |
| |
|
noexcept |
Set the selected state of a class.
- Parameters
-
| id | Class ID to update |
| selected | Whether the class should be selected |
- Returns
- true if class was found and updated, false otherwise
◆ setInputAlignment()
| void MCFG::ModelConfig::setInputAlignment |
( |
uint |
alignment | ) |
|
|
noexcept |
Set the input alignment value.
- Parameters
-
| alignment | Alignment value for input dimensions |
◆ setNormalizeTo01()
| void MCFG::ModelConfig::setNormalizeTo01 |
( |
bool |
normalize | ) |
|
|
noexcept |
Set whether to normalize input to [0,1].
- Parameters
-
| normalize | true to enable normalization, false to disable |
The documentation for this class was generated from the following files:
- iVS3D/src/iVS3D-modelConfig/include/ModelConfig.h
- iVS3D/src/iVS3D-modelConfig/src/ModelConfig.cpp