Archived | Analyze industrial equipment for defects

Archived content

Archive date: 2019-05-21

This content is no longer being updated or maintained. The content is provided “as is.” Given the rapid evolution of technology, some content, steps, or illustrations may have changed.


Performing industrial equipment inspection can be time consuming, in some cases taking hours or weeks, especially when equipment is widely distributed for industries like oil and gas, transportation (roads and railways), construction, and agriculture.

This code pattern demonstrates how you can be automate this inspection by using images of the equipment to show the personnel which equipment requires attention, so that it can be fixed to meet normal equipment standards. The Watson™ Visual Recognition service can identify specific defects or whether the image meets normal conditions. The analysis of the image is triggered by IBM Cloud Functions as an image is added to a Cloudant® database.


In this code pattern, you use machine learning classification techniques to check industrial equipment for various damages using visual image inspection. Using Watson Visual Recognition, you’ll analyze the image against a trained classifier to inspect oil and gas pipelines with six identifiers: Normal, Burst, Corrosion, Damaged Coating, Joint Failure and Leak. For each image, you’ll receive a percent match for each of the identifiers based on how closely the image matches one of the damaged identifiers or the Normal identifier. This data can then be used to create a dashboard to show which pipelines require immediate attention or no attention. The image data is stored in a Cloudant database.

This code pattern demonstrates how IBM Cloud Functions can trigger a microservice as an image is added to the Cloudant database. The microservice performs the visual recognition analysis and updates the Cloudant database with the analyzed data.

In this code pattern, you learn how to:

  • Train Watson Visual Recognition to classify images
  • Configure a Cloudant database to store and retrieve image data
  • Set up IBM Cloud Functions to trigger visual recognition analysis and store the result in a Cloudant database
  • Start a web app to view a dashboard of the visual recognition analysis, and deploy it to IBM Cloud services



  1. The user uploads the image through the web UI.
  2. The image data is sent to the Cloudant database.
  3. As the image is inserted into the database, the Cloud Functions triggers the microservice.
  4. The microservice analyzes the image by using the trained Watson Visual Recognition service.
  5. The analyzed data is sent back to the Cloudant database.
  6. The dashboard on the web UI displays the visual recognition analysis and images that require attention.


Ready to put this code pattern to use? Complete details on how to get started running and using this application are in the README file.