Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Tika and Computer Vision

Contents

...

  1. Step 1. Install the dependencies
  2. Step 2. Create a Tika-Config XML to enable Tensorflow parser.
  3. Step 3: Demo

...

  1. Step 1. Setup REST Server
  2. Step 2. Create a Tika-Config XML to enable Tensorflow parser.
  3. Step 3. Demo
  4. Changing the default topN, API port or URL

...

Table of Contents

This page describes how to make use of Object (Visual) Recognition capability of Apache Tika. TIKA-1993 introduced a new parser to perform object recognition on images. Visit TIKA-1993 issue on Jira or pull request on Github to read the related conversation. The model was updated from Inception V3 to Inception V4 with TIKA-2306 (Pull request on Github). Continue reading to get Tika up and running for object recognition.

...

Description of parameters :


Param NameTypeMeaningRangeExample
topNintNumber of object names to outputa non-zero positive integer1 to receive top 1 object name
minConfidencedoubleMinimum confidence required to output the name of detected objects[0.0 to 1.0] inclusive0.9 for outputting object names iff at least 90% confident
classstringClass that implements object recognition functionalityconstant stringorg.apache.tika.parser.recognition.tf.TensorflowImageRecParser



Step 3: Demo

To use the vision capability via Tensorflow, just supply the above configuration to Tika.

...

Description of parameters :


Param NameTypeMeaningRangeExample
topNintNumber of object names to outputa non-zero positive integer1 to receive top 1 object name
minConfidencedoubleMinimum confidence required to output the name of detected objects[0.0 to 1.0] inclusive0.9 for outputting object names iff at least 90% confident
classstringName of class that Implements Object recognition Contractconstant stringorg.apache.tika.parser.recognition.tf.TensorflowRESTRecogniser
healthUriuriHTTP URL to check availability of API serviceany HTTP URL that gets 200 status code when availablehttp://localhost:8764/inception/v4/ping
apiUriuriHTTP URL to POST image dataany HTTP URL that returns data in the JSON format as shown in the sample API outputhttp://localhost:8764/inception/v4/classify/image?topk=10



Step 3. Demo

This demo is same as the Commandline Invocation approach, but this is faster and efficient

...