Package ai.djl.modality.cv.translator
Class ImageClassificationTranslatorFactory
java.lang.Object
ai.djl.translate.ExpansionTranslatorFactory<Image,O>
ai.djl.modality.cv.translator.BaseImageTranslatorFactory<Classifications>
ai.djl.modality.cv.translator.ImageClassificationTranslatorFactory
- All Implemented Interfaces:
TranslatorFactory
,Serializable
public class ImageClassificationTranslatorFactory
extends BaseImageTranslatorFactory<Classifications>
implements Serializable
A
TranslatorFactory
that creates an ImageClassificationTranslator
.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class ai.djl.translate.ExpansionTranslatorFactory
ExpansionTranslatorFactory.TranslatorExpansion<IbaseT,
ObaseT> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Translator<Image,
Classifications> buildBaseTranslator
(Model model, Map<String, ?> arguments) Builds the base translator that can be expanded.Returns the output type for the base translator.Methods inherited from class ai.djl.modality.cv.translator.BaseImageTranslatorFactory
getBaseInputType, getExpansions, getPreprocessorExpansions
Methods inherited from class ai.djl.translate.ExpansionTranslatorFactory
getPostprocessorExpansions, getSupportedTypes, newInstance, withTranslator
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface ai.djl.translate.TranslatorFactory
isSupported
-
Constructor Details
-
ImageClassificationTranslatorFactory
public ImageClassificationTranslatorFactory()
-
-
Method Details
-
buildBaseTranslator
protected Translator<Image,Classifications> buildBaseTranslator(Model model, Map<String, ?> arguments) Builds the base translator that can be expanded.- Specified by:
buildBaseTranslator
in classExpansionTranslatorFactory<Image,
Classifications> - Parameters:
model
- theModel
that uses theTranslator
arguments
- the configurations for a newTranslator
instance- Returns:
- a base translator that can be expanded to form the factory options
-
getBaseOutputType
Returns the output type for the base translator.- Specified by:
getBaseOutputType
in classExpansionTranslatorFactory<Image,
Classifications> - Returns:
- the output type for the base translator
-