📜 ⬆️ ⬇️

Object Recognition with PowerAI Vision



Software developers have been actively working with machine learning libraries for several years, solving problems of computer vision and object detection. But the implementation of such tasks (and each machine learning model must be designed, deployed, properly trained, configured and installed) usually requires deep knowledge and skills. With the new IBM PowerAI Vision product, you can avoid it. This product provides an interface in which you can train, customize and test your own model, without going into the details of the implementation of machine learning.

In this guide, I will explain how to use PowerAI Vision to train the system and create a ready-to-use REST API service that you can use to detect and recognize objects in your applications.

PowerAI Vision - Technology Preview


As of December 2017, PowerAI Vision is available for testing as a Technology Preview software product (available for free download on the developerWorks page), which is installed on Power Systems servers. If you don’t have such a server, you can test this product (completely free of charge!) In the SuperVessel cloud.
Note. This manual describes how to work with PowerAI Vision Technology Preview version 3.0.
')

Task


The purpose of this article is to explain the basics of using machine learning to detect objects, and also to show how such training can be implemented using the PowerAI Vision interface. Here is what can be done with it:


The details of setting up frameworks, the connection and use of GPU graphics accelerators, the deployment and configuration of REST services is carried out automatically within the product. However, some learning settings are available through the administration interface.
The end result is a ready-to-use REST API for object detection.

What is needed for recognition?


Sample Image Collection


You can create your own image collection based on the script you want to implement. These are some of the questions that PowerAI Vision can help answer:


For example, take photos of bottles of Coca-Cola. Our goal is to create an application that can find and count bottles in images or video clips.

Install PowerAI Vision on Power System


If you already have an IBM Power server with an Nvidia GPU installed, you can install PowerAI Vision for testing. Follow the link and select "On Premise" - "Download Now". Download PowerAI Vision and install it.


Note. The examples in this article suggest that you use SuperVessel, a cloud-based service for testing PowerAI products.

How long will it take?


The steps of preparing and deploying a model in the SuperVessel cloud will not take much time (less than an hour), but considering the model training, the whole process can take an hour and a half. This time, of course, depends on the complexity of the data set and other factors.

Create and train a model


We use cloud SuperVessel


Sign up for SuperVessel cloud service (it's free).

Create a DataSet


PowerAI Vision supports two machine learning models:


The model of object detection (PowerAI Vision Object Detection) will allow you to detect and recognize objects in an image, as well as count their number. In this article, we consider the training of this particular model.

Create a new data set to train the model:











Note. If you downloaded a zip file and do not see the thumbnails of the files after the download, then the download failed. Try to use lower case file names without special characters or spaces. You can try downloading the files separately to determine which file caused the problem.

Create tags and tag objects




Council Use the option "Only Show Unlabeled Files" to not see the already marked photos.


Creating DL (Deep Learning) tasks





Deployment and Testing






$ curl --insecure -i -F files=@coke_bottle_23.png https://ny1.ptopenlab.com/AIVision/api/dlapis/9f9d6787-0183-4a1b-be49-751b6ca16724 HTTP/1.1 100 Continue HTTP/1.1 200 OK Server: nginx/1.9.13 Date: Thu, 14 Dec 2017 21:58:26 GMT Content-Type: application/json Content-Length: 508 Connection: keep-alive Access-Control-Allow-Origin: * Access-Control-Allow-Headers: origin, content-type, accept, authorization Access-Control-Allow-Credentials: true Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS, HEAD Access-Control-Allow-Origin: * { "classified" : [ { "confidence" : 0.9986369013786316 , "ymax" : 578 , "label" : "coca-cola" , "xmax" : 755 , "xmin" : 588 , "ymin" : 29} , { "confidence" : 0.9954010248184204 , "ymax" : 592 , "label" : "coca-cola" , "xmax" : 601 , "xmin" : 437 , "ymin" : 10} , { "confidence" : 0.8161203265190125 , "ymax" : 567 , "label" : "coca-cola" , "xmax" : 426 , "xmin" : 259 , "ymin" : 17}] , "imageUrl" : "http://ny1.ptopenlab.com:443/AIVision/temp/5a26dd3b-d8ba-4e01-8b93-5a43f28e97c7.png" , "result" : "success"} 

The cloud free version limits the use of the REST API for 1 hour of operation after deployment. After stopping the service, it can be restarted to resume operation.

Brief summary


You have seen how machine learning can work with image samples and create object detection APIs. Since the result is a fully-fledged REST API that returns results to JSON, it is easy to use in any application.
PowerAI Vision is simple and fast to use, providing GPU capabilities to accelerate learning.

The accuracy of the prediction will depend on the quality and size of the test sample. If the data set used for the experiments is too small, then this may affect the quality of the results obtained ... The quality of training depends on time and data. You can increase your data set and thus improve your results.

PS


You can see PowerAI Vision, try it in action, discuss interesting scenarios for using the platform with IBM experts at the IBM stand at the Opentalks.AI conference.

In addition, employees of the IBM Client Center in Moscow have unique experience with PowerAI Vision, IBM Watson and cognitive technologies. And they will be happy to answer your questions .

additional literature


Original article in English;
Object Detection : Object Detection on Wikipedia;
PowerAI Vision : Deep Learning and PowerAI Development
TensorFlow Object Detection : Supercharge your Computer Vision models with the TensorFlow Object Detection API
AI Article : Can Artificial Intelligence Identify Pictures Better than Humans?
From the developers : IBM PowerAI

Several product videos:
www.youtube.com/watch?v=0F5w6q0ZpBI
www.youtube.com/watch?v=nWft6tYVdrc
www.youtube.com/watch?v=qHZRnswzqUI

Source: https://habr.com/ru/post/348102/


All Articles