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
public class ImageClassificationTranslatorFactory extends BaseImageTranslatorFactory<Classifications>
ATranslatorFactory
that creates anImageClassificationTranslator
.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class ai.djl.translate.ExpansionTranslatorFactory
ExpansionTranslatorFactory.TranslatorExpansion<IbaseT,ObaseT>
-
-
Constructor Summary
Constructors Constructor Description ImageClassificationTranslatorFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Translator<Image,Classifications>
buildBaseTranslator(Model model, java.util.Map<java.lang.String,?> arguments)
Builds the base translator that can be expanded.java.lang.Class<Classifications>
getBaseOutputType()
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
-
-
-
-
Method Detail
-
buildBaseTranslator
protected Translator<Image,Classifications> buildBaseTranslator(Model model, java.util.Map<java.lang.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
public java.lang.Class<Classifications> getBaseOutputType()
Returns the output type for the base translator.- Specified by:
getBaseOutputType
in classExpansionTranslatorFactory<Image,Classifications>
- Returns:
- the output type for the base translator
-
-