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
,SemanticSegmentationTranslatorFactory
,SimplePoseTranslatorFactory
,StyleTransferTranslatorFactory
A helper to create a
TranslatorFactory
with the BaseImageTranslator
.-
Nested Class Summary
Nested classes/interfaces inherited from class ai.djl.translate.ExpansionTranslatorFactory
ExpansionTranslatorFactory.TranslatorExpansion<IbaseT,
ObaseT> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the input type for the base translator.Returns the possible expansions of this factory.protected Map<Type,
Function<PreProcessor<Image>, PreProcessor<?>>> 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
-
Constructor Details
-
BaseImageTranslatorFactory
public BaseImageTranslatorFactory()
-
-
Method Details
-
getPreprocessorExpansions
Returns the possible expansions of this factory.- Overrides:
getPreprocessorExpansions
in classExpansionTranslatorFactory<Image,
O> - Returns:
- the possible expansions of this factory
-
getExpansions
protected Map<ai.djl.util.Pair<Type,Type>, getExpansions()ExpansionTranslatorFactory.TranslatorExpansion<Image, O>> Returns the possible expansions of this factory.- Overrides:
getExpansions
in classExpansionTranslatorFactory<Image,
O> - Returns:
- the possible expansions of this factory
-
getBaseInputType
Returns the input type for the base translator.- Specified by:
getBaseInputType
in classExpansionTranslatorFactory<Image,
O> - Returns:
- the input type for the base translator
-