Skip to content
This repository was archived by the owner on Jul 22, 2024. It is now read-only.

IBM/use-deep-learning-in-ibm-cloud-functions

Repository files navigation

Create a serverless app that annotates images (text, video, audio, ...)

In this tutorial you will create a serverless application using IBM Cloud Functions that monitors the content of a Cloud Object Storage bucket for changes using triggers. Whenever an image is uploaded to the bucket a Cloud Object Storage trigger fires and invokes an action that analyzes the image content using a deep learning microservice from the Model Asset Exchange.

serverless scenario

Out of the box the application detects objects in an image but you can easily modify the application to generate image captions or perform other kinds of analysis on images or other media types, such as text, audio, or video. The Cloud Functions source code is included for Python and Node.js.

Cloud Functions activity log

Steps

If you are not familiar with IBM Cloud Functions or Cloud Object Storage, follow the detailed deployment instructions in the "Leverage deep learning in IBM Cloud Functions" tutorial.

Quickstart

If you are already familiar with IBM Cloud Functions and Cloud Object Storage you can use the shell and batch scripts in this repository to create and delete the serverless application. To use the scripts you must have a current version of the IBM Cloud CLI installed and the Cloud Functions plug-in installed.

  1. Create a Cloud Object Storage service instance in the IBM Cloud.
  2. Create service credentials for this service instance that the serverless app will use to access the bucket.
  3. Create a regional bucket (in us-south, us-east, or eu-gb) in this instance.
  4. Open a terminal window.
  5. Customize create_serverless_app.sh/bat by replacing the <TODO-...> placeholders.
  6. Run create_serverless_app.sh/bat to create the application.
  7. Open the Cloud Functions dashboard in a web browser.
  8. Upload a JPG/PNG image to the regional bucket and monitor the Cloud Functions activity log. Cloud Functions activity log
  9. Upload a text file to the bucket. No action should be triggered.
  10. Delete a previously uploaded JPG/PNG image. The corresponding JSON annotations file should be automatically removed.

To uninstall the application run delete_serverless_app.sh/bat .

License

Apache 2.0

About

In support of "Leverage deep learning in Apache OpenWhisk / IBM Cloud Functions" tutorial

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •