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, getPreprocessorExpansionsMethods inherited from class ai.djl.translate.ExpansionTranslatorFactory
getPostprocessorExpansions, getSupportedTypes, newInstance, withTranslatorMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:
buildBaseTranslatorin classExpansionTranslatorFactory<Image,Classifications> - Parameters:
model- theModelthat uses theTranslatorarguments- the configurations for a newTranslatorinstance- Returns:
- a base translator that can be expanded to form the factory options
-
getBaseOutputType
Returns the output type for the base translator.- Specified by:
getBaseOutputTypein classExpansionTranslatorFactory<Image,Classifications> - Returns:
- the output type for the base translator
-