Skip to content

Checking the required input sample size for cv::ml::StatModel::predict() for a StatModel loaded from a file #12974

@adishavit

Description

@adishavit

I'm loading an ML trained model from a file.
I noticed that when calling predict() with an input sample of the wrong size, the function does not (necessarily) fail! Apparently there is no internal checking that the input is of the right size that matches the one expected by the loaded model!

I want to verify that when I'm calling predict(), my input sample is of the correct size.
How can I do that?
I cannot seem to find such a method to provide this info.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions