imlab.classifier.Classifier
- class imlab.classifier.Classifier(weight: ~typing.Optional[str] = None, model_type: str = 'MobileNetV2', image_size: int = 300, model: ~typing.Optional[object] = None, preprocess: callable = <function preprocess>, decode: callable = <function decode>, num_class: int = 0)[source]
Bases:
WrapperClassifier.
- __init__(weight: ~typing.Optional[str] = None, model_type: str = 'MobileNetV2', image_size: int = 300, model: ~typing.Optional[object] = None, preprocess: callable = <function preprocess>, decode: callable = <function decode>, num_class: int = 0)[source]
__init__.
- Parameters
weight (str) –
model_type (str) –
image_size (int) –
model (object) –
preprocess (callable) –
decode (callable) –
num_class (int) –
Methods
__init__([weight, model_type, image_size, ...])__init__.
dump(file_handler)dump.
norm_input(image)norm_input.
predict(image[, num])predict.
- norm_input(image: object) ndarray
norm_input. normalize input
- Parameters
image (object) –
- Return type
np.ndarray