Class TensorflowRESTRecogniser

  • All Implemented Interfaces:
    org.apache.tika.config.Initializable, ObjectRecogniser
    Direct Known Subclasses:
    TensorflowRESTVideoRecogniser

    public class TensorflowRESTRecogniser
    extends 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
    • Field Detail

      • apiBaseUri

        @Field
        protected URI apiBaseUri
      • topN

        @Field
        protected int topN
      • minConfidence

        @Field
        protected double minConfidence
      • apiUri

        protected URI apiUri
      • healthUri

        protected URI healthUri
      • available

        protected boolean available
    • Constructor Detail

      • TensorflowRESTRecogniser

        public TensorflowRESTRecogniser()
    • Method Detail

      • getApiUri

        protected URI getApiUri​(org.apache.tika.metadata.Metadata metadata)
      • getSupportedMimes

        public Set<org.apache.tika.mime.MediaType> getSupportedMimes()
        Description copied from interface: ObjectRecogniser
        The mimes supported by this recogniser
        Specified by:
        getSupportedMimes in interface ObjectRecogniser
        Returns:
        set of mediatypes
      • isAvailable

        public boolean isAvailable()
        Description copied from interface: ObjectRecogniser
        Is this service available
        Specified by:
        isAvailable in interface ObjectRecogniser
        Returns:
        true when the service is available, false otherwise
      • initialize

        public void initialize​(Map<String,​org.apache.tika.config.Param> params)
                        throws org.apache.tika.exception.TikaConfigException
        Description copied from interface: ObjectRecogniser
        This is the hook for configuring the recogniser
        Specified by:
        initialize in interface org.apache.tika.config.Initializable
        Specified by:
        initialize in interface ObjectRecogniser
        Parameters:
        params - configuration instance in the form of context
        Throws:
        org.apache.tika.exception.TikaConfigException - when there is an issue with configuration
      • checkInitialization

        public void checkInitialization​(org.apache.tika.config.InitializableProblemHandler handler)
                                 throws org.apache.tika.exception.TikaConfigException
        Specified by:
        checkInitialization in interface org.apache.tika.config.Initializable
        Throws:
        org.apache.tika.exception.TikaConfigException