Satyaaditya
Satyaaditya

Reputation: 595

Error while running apache tika and vision server

i am trying out capabilities of apache tika and got the following error after setting up and running tika and tensor flow recognition server.

I installed using docker and followed these instructions from the documentation

a. Using docker (Recommended)

  1. git clone https://github.com/USCDataScience/tika-dockers.git && cd tika-dockers
  2. docker build -f InceptionRestDockerfile -t uscdatascience/inception-rest-tika .
  3. docker run -p 8764:8764 -it uscdatascience/inception-rest-tika
  4. Once it is done, test the setup by visiting http://localhost:8764/inception/v4/classify/image?topn=2&min_confidence=0.03&url=https://upload.wikimedia.org/wikipedia/commons/f/f6/Working_Dogs%2C_Handlers_Share_Special_Bond_DVIDS124942.jpg in your web browser.

and got following error


Traceback (most recent call last):

File "/usr/bin/inceptionapi", line 237, in <module>

app = Classifier(__name__)

File "/usr/bin/inceptionapi", line 194, in __init__

self.names = create_readable_names_for_imagenet_labels()

File "/usr/bin/inceptionapi", line 138, in create_readable_names_for_imagenet_labels

assert num_synsets_in_ilsvrc == 1000

AssertionError

It is breaking with the same error for tika vision video too but image captions API is working fine, can someone please help me in solving this issue

Upvotes: 0

Views: 220

Answers (1)

Dave Meikle
Dave Meikle

Reputation: 266

The Assertion error is because it cannot download some of the imagenet data due to the Tensorflow project moving where they reside, and therefore the data isn't there to be loaded at runtime. Both InceptionVideoRestDockerfile and InceptionRestDockerfile are impacted.

I've created a Fork with the required changes and submitted a pull request here to the team at USC. Using the updated URLs allows these Docker images to load the model. This in turn allows them to be used in Apache Tika.

Upvotes: 1

Related Questions