The instructions below will guide you through the process of deploying the MAX Object Detector: a demonstration of image processing for detecting common objects on IBM Cloud.
Expected time to complete: 5-10 minutes.
You can see a live deployed version of the demonstration here.
This demonstration deploys a container running the Max Object Detector, a web-app which allows users to recognize objects in an image/frame, trained from the Common Objects in Context (COCO) dataset.
The container can deployed multiple aways, e.g., through Red Hat OpenShift or Kubernetes. This demonstrations shows deployment on Code Engine - a fully managed environment for running containers on IBM Cloud.
- Create an IBM Cloud account, at https://cloud.ibm.com/login.
- Download the IBM Cloud Command Line Interface (CLI) as shown here: https://cloud.ibm.com/docs/cli?topic=cli-getting-started
- Install the Code Engine plugin for the IBM Cloud CLI using:
ibmcloud plugin install code-engine
- Login to the Cloud CLI, using:
ibmcloud login -sso
- Create a resource group for the demonstration and target the group:
ibmcloud resource group-create ml-demonstration
ibmcloud target -g ml-demonstration
- Create a code engine project with:
ibmcloud ce project create --name ml-demonstration
- Deploy the application using the containerized image with:
ibmcloud ce application create --name max-object-detector --image quay.io/codait/max-object-detector --port 5000
- Validate that the application has been deployed with:
ibmcloud ce application list
If deployed successfully, there will be an application named max-object-detector
.
- After the application has been deployed, the terminal output will provide you with a link to your application, it will look similar to the link below:
https://max-object-detector.phvkd8csq1y.ca-tor.codeengine.appdomain.cloud/
Add /app at the end of this link as shown below and open this link in your browser.
https://max-object-detector.phvkd8csq1y.ca-tor.codeengine.appdomain.cloud/app
- When the web-app has been opened in a browser, you can upload an image for object detection by clicking the "Choose File" button under the Upload an Image section.
- Under the Filter Detected Object Section, you can set the probability threshold for recognizing objects, for example, if set to 80%, objects will only be recognized if there is a high certaintity from the model that an object is present.
- Once the file has been uploaded and the probability threshold has been set (50% by default), click the Submit button under the Upload an Image section and the result of the object detection will be shown.
This process may take a few minutes, pending on the size of your image.
A sample image you can use for object detection can be found below:
After you're satisfied with the demo, you can destroy provisioned resources by deleting the Code Engine project with:
ibmcloud ce project delete --name ml-demonstration