Blog

FIS-SST

AI – how it helps with business

Michał Koźlik

Introduction

In some business processes there are requirements which need to be fulfilled to make it work properly. For example a warranty – when a client needs a repair or replacement, he needs to fulfill several conditions to place a warranty request.

When a warranty request is sent, it often happens to be rejected due to being  incorrectly described or because of missing documents and photos. Such a rejection by the service and a need for correction take a lot of time. Time that could be saved by a smart system that would early spot out such erroneous requests and warn the user.

We at FIS-SST had the idea to develop a module that could warn a warranty sender when his request (the set of attached documents and photos) is incomplete. For that case we used AI.

What actually is Artificial Intelligence (AI) and Machine Learning (ML)?

Artificial Intelligence, also known as machine intelligence, is a branch of computer science and engineering that aims to achieve a simulation of human intelligence processes by endowing software with the ability to analyze its environment using either predetermined rules and search algorithms or pattern recognition machine learning models, and then make decisions based on these analyses. The term can be used with machines that approximate human intelligence through learning, adaptation, and problem solving.

While Machine Learning is the ability of software to learn patterns from data using algorithms and to react to new data instances and develop behaviors.

Environment

The most straightforward choice turned out to be the Python language. We used free Google development environment called Colab (https://colab.research.google.com/). It allows you to write and run Python code directly in your browser so no configuration is required, it can be easily shared and you have free access to GPUs. (There are also other alternatives available as for example Kaggle: https://www.kaggle.com/).

As a storage platform for data we used Google drive (https://drive.google.com/), which was a natural consequence of choosing the Google’s Colab, since they can cooperate easily.

Libraries

1.       PyTorch
2.       NumPy

Neural Net Architecture

Image classification/recognizing is performed in Machine Learning by a type of neural networks called Convolutional Neural Networks. As the specific architecture for our case we chose the ResNet34 model which is provided by the PyTorch library.

You can read about the ResNet34 here:

https://www.kaggle.com/pytorch/resnet34

https://medium.com/analytics-vidhya/understanding-resnet-architecture-869915cc2a98

and about other architectures/alternatives here:

https://towardsdatascience.com/top-10-cnn-architectures-every-machine-learning-engineer-should-know-68e2b0e07201

To have an idea how the ResNet34 network looks like you can have a look at the diagram below:

By the way, if you have your own model as a file (e.g. .pt, .onnx), you can generate a diagram for it using a free web application: https://netron.app/

Procedure/Methodology

To get the model learned, we performed following steps:

1.       About 20000 images has been classified (assigned a class numbering from 0 to 8); it has been done manually using a self-written simple tool

a.       The classification of images has been stored in a .CSV file, which contained pairs “file name;class”, for example:

•         7bf7a9d60ba94825a81ee31a4dd53d96.jpg;2

•         601bac4968e14bbe98a92ee06e0dacfc.jpg;7

•         1a361d2f62c84e6480c2e9f0066231ca.jpg;3

2.       Python array structures for training have been prepared based on the images and the classification (on a local environment)

a.       The reason to do it locally was to limit the sizes of files which were transferred to the Google drive and in consequence speeding it up and saving the drive space; instead of transferring gigabytes of images, we copied only the prepared .npy files

3.       The .npy files have been transferred to the Google drive

4.       Machine learning has been performed with train and validation data on the Colab environment

5.       The trained model has been tested with separate test data

Summary

Our team taught the software to recognize the required documents and photos, so that the user could be warned if some of their categories were missing. In some business processes a smart, well implemented AI module can be helpful for time and cost savings within companies and to support users in their daily routine work.

Michał Koźlik

Contact form

Patrycja Pałus

Office Administrative Assistant

Please feel free to contact me by phone or email

Newsletter FIS-SST

To continue downloading please subscribe to our newsletter 

Newsletter FIS-SST

Aby kontynuować ściąganie prosimy zapisz się do naszego newsletter`a