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

Feature Request: Allow serialization of custom mean and std values #3827

Open
j99ca opened this issue Aug 9, 2024 · 0 comments
Open

Feature Request: Allow serialization of custom mean and std values #3827

j99ca opened this issue Aug 9, 2024 · 0 comments
Assignees
Labels
FEATURE New feature & functionality

Comments

@j99ca
Copy link

j99ca commented Aug 9, 2024

Currently the models' export functions use hardcoded mean and standard deviation values when generating the IR format model. I am using different values for training on my grayscale dataset and would like to have that passed along to the export function. For example, here is what the export function in MobileNetV3ForMulticlassCls looks like:

    @property
    def _exporter(self) -> OTXModelExporter:
        """Creates OTXModelExporter object that can export the model."""
        return OTXNativeModelExporter(
            task_level_export_parameters=self._export_parameters,
            input_size=(1, 3, 224, 224),
            mean=(123.675, 116.28, 103.53),
            std=(58.395, 57.12, 57.375),
            resize_mode="standard",
            pad_value=0,
            swap_rgb=False,
            via_onnx=False,
            onnx_export_configuration=None,
            output_names=["logits", "feature_vector", "saliency_map"] if self.explain_mode else None,
        )

I imagine this can work similar to the new custom input size feature

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FEATURE New feature & functionality
Projects
None yet
Development

No branches or pull requests

3 participants