Top Banner
Hub Queue Size Analyzer Implementing Neural Networks in practice
25

Hub Queue Size Analyzer

Feb 22, 2016

Download

Documents

Meagan

Hub Queue Size Analyzer. Implementing Neural Networks in practice. Task. Provide an opportunity for DataArt employees to know queue size in DataArt Hub via PM. Choosing implementation method. Create a service which takes an image from camera in DataArt Hub and performs image recognition - PowerPoint PPT Presentation
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Hub Queue Size Analyzer

Hub Queue Size Analyzer

Implementing Neural Networks in practice

Page 2: Hub Queue Size Analyzer

Task

• Provide an opportunity for DataArt employees to know queue size in DataArt Hub via PM

Page 3: Hub Queue Size Analyzer

Choosing implementation method• Create a service which takes an image from camera in

DataArt Hub and performs image recognition• Additional module makes decision about queue size based

on recognition results• It was recommended to implement Neural Network for

image recognition because of following reasons:– We don’t need exact solution– Recognition error is not fatal– We have small amount (4) of possible queue states– Alternative solution (image analyzing with wavelets, analyzing

pixels etc.) is too long and expensive to implement

Page 4: Hub Queue Size Analyzer

Introducing Neural Networks

computational model that is inspired by the structure and functional aspects of biological neural networks.

Page 5: Hub Queue Size Analyzer

3 words about Neural Network structure

Page 6: Hub Queue Size Analyzer

Neural Network Advantages– We program only structure of system, not behavior.

Structure is universal Structure is flexible

– We provide an image on the input and get recognition result on the output. Simple and fast recognition

– We do not care about algorithm for image analyzing No need of PhD

– We can reuse existing neural network in similar AND different tasks with minor changesReusability

– Parallel equations Fast & furious

Page 7: Hub Queue Size Analyzer

How does it work

Every 5 seconds image is downloaded from web

Page 8: Hub Queue Size Analyzer

How does it work

Image is converted to gray scale

Page 9: Hub Queue Size Analyzer

How does it work

Image is compressed, auto leveled and transformed to double array

Auto leveling

Page 10: Hub Queue Size Analyzer

How does it work

Brightness adjustment

Processed image is sent to input layer of network. If weights are correct on the output layer we get desired result (queue size).

Weights

Page 11: Hub Queue Size Analyzer

How does it work

Threshold, integrationBrightness

adjustment

Threshold value and integration of result are implementedResult picture are created

Page 12: Hub Queue Size Analyzer

How does it work

Threshold, integrationBrightness

adjustment

Uploading results on server

Page 13: Hub Queue Size Analyzer

Implementation details

• All Neural Network logic was placed in class library for reusability. This library can be used in other projects

• For monitoring network condition and making extra training if needed administrative tool was developed.

Page 14: Hub Queue Size Analyzer

Administrative tool

• Creating and training network• Retraining existing networks• Enlarging training set• Monitoring of correct work for all processes• Monitoring current network error and dependability of recognition result.• Saving and loading weights from file

Page 15: Hub Queue Size Analyzer

Neural Network minuses

• Very careful approach to training set creation– Each pattern must be representative – Training set must cover all typical situations– large diversity of training for real-world operation

• We should always check what our network has learned

• Limited number of input, hidden and output nodes

• Large computations during training process

Page 16: Hub Queue Size Analyzer

EXPLAINING PRINCIPLES OF NEURAL NETWORK

Part 2

Page 17: Hub Queue Size Analyzer

How does NN work?

Page 18: Hub Queue Size Analyzer

Couple words about sigmoid function

Page 19: Hub Queue Size Analyzer

Bias nodeNo bias Bias

Page 20: Hub Queue Size Analyzer

NN Training

Trial and error method– Initial weights have to be small enough

– Feed with sample data set (training set)– Get the output value– Use error (output minus target value) as a criteria

of success in the training algorithm– Change is small, number of iterations is big

Page 21: Hub Queue Size Analyzer

Algorithm overview1. Initialise the network with small random weights

o maxWeight < 5.0 / (inputNodesNum * maxInputNodeValue)2. Repeat for each input pattern in the input collection

1. Present an input pattern to the input layer of the network.2. Get output values3. Calculate network’s summary error 4. Reduce the error by changing NN weights properly (back propagation)5. Propagate an error value back to each hidden neuron that is

proportional to their contribution of the network’s activation error. 6. Adjust the weights feeding each hidden neuron to reduce their

contribution of error for this input pattern. 3. Repeat step 2 until the network is suitably trained.

Page 22: Hub Queue Size Analyzer

Back Propagation

• Is a way to reduce summary NN error and improve its performance

• “Blind paratrooper” method• 3 steps:

o o o

Page 23: Hub Queue Size Analyzer

What can be customized in NN?

• Nodes number• Network error• Maximum number of training iterations• Learning rate

Page 24: Hub Queue Size Analyzer

Where NN has been used already • Image/sound recognition• Stock market• Data classification• Medicine• Detecting credit card fraud.• Forecast engines• Geo routing systems• Aviation• NASA• Etc

Page 25: Hub Queue Size Analyzer

Questions