Class TensorflowRESTRecogniser
- java.lang.Object
 - 
- org.apache.tika.parser.recognition.tf.TensorflowRESTRecogniser
 
 
- 
- All Implemented Interfaces:
 Initializable,ObjectRecogniser
- Direct Known Subclasses:
 TensorflowRESTVideoRecogniser
public class TensorflowRESTRecogniser extends java.lang.Object implements ObjectRecogniser
Tensor Flow image recogniser which has high performance. This implementation uses Tensorflow via REST API.NOTE : https://wiki.apache.org/tika/TikaAndVision
- Since:
 - Apache Tika 1.14
 
 
- 
- 
Constructor Summary
Constructors Constructor Description TensorflowRESTRecogniser() 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcheckInitialization(InitializableProblemHandler handler)java.util.Set<MediaType>getSupportedMimes()The mimes supported by this recogniservoidinitialize(java.util.Map<java.lang.String,Param> params)This is the hook for configuring the recogniserbooleanisAvailable()Is this service availablejava.util.List<RecognisedObject>recognise(java.io.InputStream stream, org.xml.sax.ContentHandler handler, Metadata metadata, ParseContext context)Recognise the objects in the stream 
 - 
 
- 
- 
Method Detail
- 
getSupportedMimes
public java.util.Set<MediaType> getSupportedMimes()
Description copied from interface:ObjectRecogniserThe mimes supported by this recogniser- Specified by:
 getSupportedMimesin interfaceObjectRecogniser- Returns:
 - set of mediatypes
 
 
- 
isAvailable
public boolean isAvailable()
Description copied from interface:ObjectRecogniserIs this service available- Specified by:
 isAvailablein interfaceObjectRecogniser- Returns:
 truewhen the service is available,falseotherwise
 
- 
initialize
public void initialize(java.util.Map<java.lang.String,Param> params) throws TikaConfigException
Description copied from interface:ObjectRecogniserThis is the hook for configuring the recogniser- Specified by:
 initializein interfaceInitializable- Specified by:
 initializein interfaceObjectRecogniser- Parameters:
 params- configuration instance in the form of context- Throws:
 TikaConfigException- when there is an issue with configuration
 
- 
checkInitialization
public void checkInitialization(InitializableProblemHandler handler) throws TikaConfigException
- Specified by:
 checkInitializationin interfaceInitializable- Parameters:
 handler- if there is a problem and no custom initializableProblemHandler has been configured via Initializable parameters, this is called to respond.- Throws:
 TikaConfigException
 
- 
recognise
public java.util.List<RecognisedObject> recognise(java.io.InputStream stream, org.xml.sax.ContentHandler handler, Metadata metadata, ParseContext context) throws java.io.IOException, org.xml.sax.SAXException, TikaException
Description copied from interface:ObjectRecogniserRecognise the objects in the stream- Specified by:
 recognisein interfaceObjectRecogniser- Parameters:
 stream- content streamhandler- tika's content handlermetadata- metadata instancecontext- parser context- Returns:
 - List of 
RecognisedObjects - Throws:
 java.io.IOException- when an I/O error occursorg.xml.sax.SAXException- when an issue with XML occursTikaException- any generic error
 
 - 
 
 -