Zero to Hero in Machine Learning: Part 1 by Perera Ravindu

Zero to Hero in Machine Learning: Part 1 by Perera Ravindu

Author:Perera, Ravindu [Perera, Ravindu]
Language: eng
Format: epub
Published: 2020-05-23T16:00:00+00:00


You can use the python code below to get a RGB color matrix of an image.

If you try the above code with your own image file, then you can see it gives the RGB color code for each pixel. How many elements are there in that color matrix? Can you manually analyze them one by one? It’s a very hard task for you as well as for the computer.

So, we have to reduce the size of the matrix while keeping important characteristics which help to identify what that image contains. To do this, we can perform max pooling , min pooling , average pooling , etc. Reducing the size of the matrix helps to reduce the variance of the image and to reduce the computational complexity.

Max Pooling

Let's say we have a 4x4 matrix representing our image. And let’s say we need to reduce it to a 2x2 matrix. Then we have to divide the original matrix into 4 regions (because we need a 2x2 matrix as the output) and take the maximum value of each region to create the new matrix.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.