WoodWing / elvis-image-recognition

Elvis integration with AI based image recognition services from AWS, Google and Clarifai
MIT License
11 stars 10 forks source link

Deprecated

This project is no longer maintained.

Table of contents

1. Introduction

The Elvis image recognition integration is a bridge between Elvis DAM and Artificial Intelligence (AI) image recognition services from Google, Amazon, Clarifai and Emrays. It uses these services to detect tags, landmarks and do facial analysis. The gathered information is stored as searchable metadata in Elvis. Tags can also be automatically translated to other languages. The integration supports two tagging modes: on demand tagging of images that already exist in Elvis and auto tagging of images immediately after they are imported.

This readme describes how to setup the integration. Please read this blog article if you want to know more about Elvis and AI.

2. Package details

The integration consist of several components. The main component is the image recognition server app. This nodejs based server app handles all communication between Elvis and the AI service(s). It retrieves image previews from Elvis and sends them to the AI services for recognition. It also includes a Google Translate module to translate tags to other languages and there's a REST API that allows developers to interact with the image recognition server.

The second component is an Elvis web client plug-in. The Auto Tag Images plugin allows users to tag existing images in Elvis. It can either tag a selection of images or all files in the selected folder.

The integrated AI services are not identical in the functionality they provide, this is what this integration supports per AI provider:

Clarifai

Google Vision

AWS Rekognition

Emrays

3. Installation prerequisites

4. Installation steps

This readme describes the high level installation steps. Detailed configuration information is embedded in the various configuration files.

4.1 Configure Elvis metadata fields

Depending on your configuration and used services, you may need to add custom metadata fields to your Elvis installation. These custom metadata fields need to be configured in the <Elvis Config>/custom-assetinfo.xml file. Sample configuration files are provided in the elvis-config folder.

4.2 Optional: configure the Elvis Webhook

An Elvis webhook needs to be configured if you want to detect images directly when they are imported in Elvis. You can skip this step if you only want to use the Auto Tag Images plugin or REST API. Images imported in /Users/ are excluded by the image recognition server.

Detailed information on setting up and using webhooks can be found on Help Center.

4.3 Install the image recognition server

The server can either be installed on the Elvis Server or on a separate machine.

4.4 Optional: install the Auto Tag Images plug-in

This section describes how to install the Auto Tag Images plug-in. Please follow the steps relevant to the Elvis version you have installed.

4.4.1 Elvis 6.7+

4.4.2 Elvis 5.26 - Elvis 6.6

Security note: Using this plug-in with Elvis 5.26 - Elvis 6.6 is less secure as it requires the image recognition server API te be publicly exposed to end users. If you want to secure the API, upgrade to Elvis 6.7 or higher and follow the 6.7+ instructions.

4.5 Optional: install the Web Links plug-in

4.6 Optional: install the Search Similar plug-in

4.7 Optional: install the Image Search plug-in

5. Detect images during import

6. Detect existing Elvis images

7. Detect images using the Image Recognition REST API

The REST API allows developers to interact with the image recognition server.

7.1 Security

This API has no build in authentication mechanism. There are however several ways to protect it:

7.2 POST /api/recognize

Starts the image recognition for a given query, immediately returns a process id that can be used to track progress or cancel the operation.

In this example we detect all images in the /Demo Zone folder.

Request

$ curl -H "Content-Type: application/json" -X POST -d '{"q":"ancestorPaths:\"/Demo Zone\""}' http://localhost:9090/api/recognize

Response (202 ACCEPTED)

{
  "processId": "5e5949d8-3c58-4074-84a4-a63fa10286f8"
}

7.3 GET /api/recognize/:id:

Retrieve progress information for a given recognition process.

Request

$ curl -X GET http://localhost:9090/api/recognize/5e5949d8-3c58-4074-84a4-a63fa10286f8

Response (200 OK)

{
  "cancelled": false,
  "failedCount": 0,
  "successCount": 335,
  "totalCount": 3246,
  "id": "5e5949d8-3c58-4074-84a4-a63fa10286f8",
  "request": {
    "q": "(ancestorPaths:\"/Demo Zone\") AND assetDomain:image"
  }
}

7.4 DELETE /api/recognize/:id:

Cancel a recognition process.

Request

$ curl -X DELETE http://localhost:9090/api/recognize/5e5949d8-3c58-4074-84a4-a63fa10286f8

Response (200 OK)

Process with id "5e5949d8-3c58-4074-84a4-a63fa10286f8" is being cancelled.

7.5 GET /ping

Simple ping to validate that if the server is still online.

Request

$ curl -X GET http://localhost:9090/ping

Response (200 OK)

{
  "uptime": 2451.638
}

8. Architecture overview

Images can either be detected directly during import or on demand using the Auto Tag Images web client plug-in. The schemas in this chapter describe the process flow.

8.1 Directly recognize images during import

recognize images during import

8.2 Recognize existing images in Elvis with the Auto Tag Images plug-in

auto tag images

9. Privacy and data usage

As explained in the architecture overview, the image recognition server sends preview images to the configured AI vendors. These vendors all have their own privacy policies when it comes to data usage and storage. Some of them use your data to improve machine learning services and for analytics. For details, please consult the privacy policy of your AI vendor(s):

10. Version history

v2.4.0

v2.3.0

v2.2.0

v2.1.0

v2.0.0

v1.1.0

v1.0.0