Package ai.djl.modality.cv.translator
Class BaseImageTranslatorFactory<O>
- java.lang.Object
-
- ai.djl.translate.ExpansionTranslatorFactory<Image,O>
-
- ai.djl.modality.cv.translator.BaseImageTranslatorFactory<O>
-
- Type Parameters:
O- the output type for theTranslatorFactory.
- All Implemented Interfaces:
TranslatorFactory
- Direct Known Subclasses:
ImageClassificationTranslatorFactory,ImageFeatureExtractorFactory,ObjectDetectionTranslatorFactory
public abstract class BaseImageTranslatorFactory<O> extends ExpansionTranslatorFactory<Image,O>
A helper to create aTranslatorFactorywith theBaseImageTranslator.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class ai.djl.translate.ExpansionTranslatorFactory
ExpansionTranslatorFactory.TranslatorExpansion<IbaseT,ObaseT>
-
-
Constructor Summary
Constructors Constructor Description BaseImageTranslatorFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Class<Image>getBaseInputType()Returns the input type for the base translator.protected java.util.Map<ai.djl.util.Pair<java.lang.reflect.Type,java.lang.reflect.Type>,ExpansionTranslatorFactory.TranslatorExpansion<Image,O>>getExpansions()Returns the possible expansions of this factory.protected java.util.Map<java.lang.reflect.Type,java.util.function.Function<PreProcessor<Image>,PreProcessor<?>>>getPreprocessorExpansions()Returns the possible expansions of this factory.-
Methods inherited from class ai.djl.translate.ExpansionTranslatorFactory
buildBaseTranslator, getBaseOutputType, 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
-
getPreprocessorExpansions
protected java.util.Map<java.lang.reflect.Type,java.util.function.Function<PreProcessor<Image>,PreProcessor<?>>> getPreprocessorExpansions()
Returns the possible expansions of this factory.- Overrides:
getPreprocessorExpansionsin classExpansionTranslatorFactory<Image,O>- Returns:
- the possible expansions of this factory
-
getExpansions
protected java.util.Map<ai.djl.util.Pair<java.lang.reflect.Type,java.lang.reflect.Type>,ExpansionTranslatorFactory.TranslatorExpansion<Image,O>> getExpansions()
Returns the possible expansions of this factory.- Overrides:
getExpansionsin classExpansionTranslatorFactory<Image,O>- Returns:
- the possible expansions of this factory
-
getBaseInputType
public java.lang.Class<Image> getBaseInputType()
Returns the input type for the base translator.- Specified by:
getBaseInputTypein classExpansionTranslatorFactory<Image,O>- Returns:
- the input type for the base translator
-
-