IBM/powerai-vision-object-detection

Name: powerai-vision-object-detection

Owner: International Business Machines

Description: Use deep learning to create a model and a REST endpoint to allow your app to detect, locate and count your product on store shelves

Created: 2017-12-09 01:53:30.0

Updated: 2018-05-22 22:15:57.0

Pushed: 2018-05-22 22:15:55.0

Homepage: https://developer.ibm.com/code/patterns/locate-and-count-items-with-object-detection/

Size: 41666

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Object detection with PowerAI Vision

In this Code Pattern, we will use PowerAI Vision Object Detection to detect and label objects, within an image, based on customized training.

This example can easily be customized with your own datasets.

An example dataset has been provided with images of Coca-Cola bottles. Once we train and deploy a model, we'll have a REST endpoint that allows us locate and count Coke bottles in an image.

Deep learning training will be used to create a model for Object Detection. With PowerAI Vision, deep learning training is as easy as a few clicks of a mouse. Once the task has completed, the model can be deployed with another click.

PowerAI Vision presents REST APIs for inference operations. Object detection with your custom model can be used from any REST client and can also be tested in the PowerAI Vision UI.

When the reader has completed this Code Pattern, they will understand how to:

architecture

Flow
  1. User uploads images to create a PowerAI Vision dataset
  2. User labels objects in the image dataset prior to training
  3. The model is trained, deployed and tested in PowerAI Vision
  4. User can detect objects in images using a REST client
Included components
Featured technologies

Watch the Video

Prerequisites

This Code Pattern was built with the PowerAI Vision Technology Preview v3.0.

NOTE: The steps and examples in this README assume you are using SuperVessel. For example, some URLs use ny1.ptopenlab.com.

Steps

  1. Clone the repo
  2. Login to PowerAI Vision
  3. Create a dataset
  4. Create tags and label objects
  5. Create a DL task
  6. Deploy and test
  7. Run the app
1. Clone the repo

Clone the powerai-vision-object-detection locally. In a terminal, run:

clone https://github.com/IBM/powerai-vision-object-detection
2. Login to PowerAI Vision

If you are using SuperVessel, login here: https://ny1.ptopenlab.com/AIVision/index.html

3. Create a dataset

PowerAI Vision Object Detection discovers and labels objects within an image, enabling users and developers to count instances of objects within an image based on customized training.

To create a new dataset for object detection training:

4. Create tags and label objects
5. Create a DL task
6. Deploy and test
7. Run the app

An example web app demonstrates how to upload a picture, use the trained and deployed model, and display the detected objects by drawing bounding boxes and labels on the image. The functionality is similar to the above testing, but the code is provided for you to customize.

Use the Deploy to IBM Cloud button OR Run locally.

Deploy to IBM Cloud

Deploy to IBM Cloud

  1. Press the above Deploy to IBM Cloud button and then click on Deploy.

  2. In Toolchains, click on Delivery Pipeline to watch while the app is deployed. Once deployed, the app can be viewed by clicking 'View app'.

  3. Use the IBM Cloud dashboard to manage the app. The app is named powerai-vision-object-detection with a unique suffix.

  4. Add your PowerAI Vision API endpoint:

  5. Click on the app in the IBM Cloud dashboard.

  6. Select Runtime in the sidebar.

  7. Hit Environment variables in the middle button bar.

  8. Hit the Add button.

  9. Add the name POWERAI_VISION_WEB_API_URL and set the value to the web API that you deployed (above).

  10. Hit the Save button. The app will restart automatically.

  11. Click on Visit App URL to use the app.

Run locally

Use your cloned repo to build and run the web app.

NOTE: These steps are only needed when running locally instead of using the Deploy to IBM Cloud button.

Use the web app

Links

Learn more

License

Apache 2.0


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.