ClassificationModel
This class represents high-level API for classification models.
ClassificationModel allows to set params for preprocessing input image. ClassificationModel creates net from file with trained weights and config, sets preprocessing input, runs forward pass and return top-1 prediction.
Member of Dnn
-
Create classification model from network represented in one of the supported formats. An order of @p model and @p config arguments does not matter.
Declaration
Objective-C
- (nonnull instancetype)initWithModel:(nonnull NSString *)model config:(nonnull NSString *)config;Swift
init(model: String, config: String)Parameters
modelBinary file contains trained weights.
configText file contains network configuration.
-
Create classification model from network represented in one of the supported formats. An order of @p model and @p config arguments does not matter.
Declaration
Objective-C
- (nonnull instancetype)initWithModel:(nonnull NSString *)model;Swift
init(model: String)Parameters
modelBinary file contains trained weights.
View on GitHub
ClassificationModel Class Reference