Package ai.djl.modality.cv.translator
Class Sam2TranslatorFactory
java.lang.Object
ai.djl.modality.cv.translator.Sam2TranslatorFactory
- All Implemented Interfaces:
TranslatorFactory,Serializable
A
TranslatorFactory that creates a Sam2Translator instance.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns supported input/output classes.<I,O> Translator<I, O> Returns a new instance of theTranslatorclass.Methods 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
-
Sam2TranslatorFactory
public Sam2TranslatorFactory()
-
-
Method Details
-
newInstance
public <I,O> Translator<I,O> newInstance(Class<I> input, Class<O> output, Model model, Map<String, ?> arguments) Returns a new instance of theTranslatorclass.- Specified by:
newInstancein interfaceTranslatorFactory- Type Parameters:
I- the input data typeO- the output data type- Parameters:
input- the input classoutput- the output classmodel- theModelthat uses theTranslatorarguments- the configurations for a newTranslatorinstance- Returns:
- a new instance of the
Translatorclass
-
getSupportedTypes
Returns supported input/output classes.- Specified by:
getSupportedTypesin interfaceTranslatorFactory- Returns:
- a set of supported input/output classes
-