Skip to main content


AEM and Google Cloud Vision – Impressions to Implementation

Chad Johnson’s recent observations on Google’s Cloud Vision API led us to start thinking of ways the image recognition software could be utilized within Adobe Experience Manager (AEM).  Automatic asset tagging immediately sprang to mind.  This solution reduces the burden on the end user in manually identifying and tagging the assets with relevant metadata.  Google’s Cloud Vision API is pretty amazing.  It may not completely remove the end user’s involvement in the tagging process, but certainly eases the task.  The end result is rich taxonomy structures for improved search capabilities on the DAM Assets.
AEM Implementation
Google provides an easy to use REST API for label identification (detecting individual objects on an image), landmarks detection, sentiment analysis, logo detection and amazing optical character recognition (OCR).  These services can be used within any application with access to images.
Screen Shot 2016-04-28 at 5.39.02 PM
Screen Shot 2016-04-28 at 6.00.28 PM
Into the details …
Google requires registration with the Vision Services and establishing an authentication scheme for authentication and/or authorization.  The simplest authentication scheme is an “API Key”.   This scheme provides a JSON file which can be referenced in the code for authentication.
We have created an AEM service to invoke Google’s API.  This service can be referenced by any component, service, or workflow process.  We extended the OOTB workflow “Update DAM Asset” to include the additional process of calling this service for every asset added to the DAM.
Our process determines the type of annotation coming back from Google (label, landmark, sentiment, or logo) and creates a tag in the corresponding taxonomy (see screenshots above).  The process also includes an OCR Vision call, which when made extracts the text identified on the image and populates the metafield “dc:description” on the DAM asset.
AEM “Smart Tags”
Adobe has also announced a native auto asset tagging feature called “Smart Tags” in its AEM 6.2 beta version which was received very well at the Adobe Summit—The Digital Marketing Conference 2016.  Though it is not available for public yet, it would be very interesting to compare it with Google Cloud Vision API’s once available. The Google Vision / AEM integration will work in any version of AEM, not just 6.2.
We are very excited to see what machine learning and AI are contributing to asset repositories in terms of classification. As we keep testing, we are amazed at the great results and disappointed with few misses (It seems to always fail to recognize the Nike logo). As Chad pointed out, the results are not always accurate and for a beta release of Cloud API, we are very impressed. We would now like to see how they compare with Adobe “Smart Tagging” native feature.

Thoughts on “AEM and Google Cloud Vision – Impressions to Implementation”

  1. Very nice.
    Does the Google Cloud Vision API restricts the amount of calls made through a key?
    Any batch mode supported?
    Also why extend the existing DAM Workflow instead of creating a custom workflow with custom launcher.
    But overall very nice!

  2. Shannon Sumner

    Hi Nono,
    As far as I know, Google;s Cloud Vision API does not restrict the amount of calls made through a key. Anything over a thousand inquiries a month will cost a bit. Pricing can be found here:
    It does look like a batch mode is supported up to 4MB ( The larger the image, the more Google will be able to accurately label the image. Since images usually run pretty big – batch processing is not realistic.
    We extended the existing DAM workflow instead of creating a custom workflow for expediency sake. The process has evolved since this blog post. We now use an event listener to observe when a node of type “nt:file” is added to the DAM. We then check the size of this asset. If the size is under 4MB – we send the file to Google’s Cloud Vision API. If it is over 4MB, we send a rendition of the asset.

  3. Thanks Shannon for your reply.
    I looked at the pricing and that seems quite reasonable. Let’s see what the pricing model for Adobe Smart Tags will be.
    Any chance that you can share your implementation?

  4. Hi Shannon,
    Thanks for posting this great blog and code package.
    I have used the code which you have shared and I created one trial account in google cloud vision.
    I have changed the credential in JSON file but i am getting the below error:
    Error: PKIX path building failed: unable to find valid certification path to requested target
    Any kind of help will be appreciable 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Shannon Sumner, Senior Technical Consultant

More from this Author

Follow Us