Image Processing and Image Recognition with Keras

Verified

Added on  2023/01/03

|14
|2747
|37
AI Summary
This report explores the use of Keras for image processing and image recognition. It discusses the algorithms and techniques used for image detection and prediction, as well as the applications and tools in this field. The report also provides insights into neural technology and its role in image processing.

Contribute Materials

Your contribution can guide someone’s learning journey. Share your documents today.
Document Page
Running head: COMPUTER SCIENCE B.SC
Computer Science B.sc
Name of the Student
Name of the University
Author Note

Secure Best Marks with AI Grader

Need help grading? Try our AI Grader for instant feedback on your assignments.
Document Page
1COMPUTER SCIENCE B.SC
Executive Summary
The Keras is the main software that has been used for machine learning to complete the task
properly. The image processing and image prediction have been done through this process.
There are several application and tools are used for image detection. The following report
contains the method which will compare two case studies to complete the process. The two
cases are selected from the Keras software. Neural technology is also explained properly.
Document Page
2COMPUTER SCIENCE B.SC
Table of Contents
Executive Summary:..................................................................................................................1
Introduction:...............................................................................................................................3
Literature Review.......................................................................................................................3
Discussion..................................................................................................................................7
Conclusion:................................................................................................................................9
Referencing:...............................................................................................................................9
Document Page
3COMPUTER SCIENCE B.SC
Introduction:
The keras is one of the high level technology which is used now a days for various
fields. It is one of the high level network; which helps to complete various application. It is
actually combined with the API technology. Various fast experimentation also done through
this. Theano, CNTK, Tensor-Flow are the backend of the keras which actually help to
execute various experiment and development (Shanmugamani 2018). The Tensor-Flow is the
one of the framework made by the Google Brain Team. It actually used as the large machine
learing which will help to explain the numerical computation. The distributed deep learning is
maintained by the Cognitive toolkit or CNTK. In the other hand Therno is used as the Python
library which evaluate the mathematical expressions or terms which is denoted with the
multi-dimensional array. So all of these backend will help or support the base of the Keras
(Abadi et al.,2016). The following report has been made with the case studies of artificial
neural network which is connected with the image recognition procedure in several fields.
Literature Review (600)
Case1: The following case study has been include the neural network which is
combined with the image recognition procedure. The image recognition is one of the main
procedure which is used in various field now a days. The key feature of the image
classification are based on:
Replacing the password when the facial recognition has been done.
In the obstruct situation the autonomous vehicle detection has been enabled.
The geographical features is needed when the satellite imagery has happened(Arnold
2017).
Now suppose two images are taken to scan properly to detect the car in the both of the
pictures. The first algorithm is used to predict the data properly:

Secure Best Marks with AI Grader

Need help grading? Try our AI Grader for instant feedback on your assignments.
Document Page
4COMPUTER SCIENCE B.SC
Algorithm:
# Import Libraries
from keras.preprocessing.imag import load_img
from keras.preprocessing.imag import img_to_array
from keras.applications.vgg16 import preprocess_input
from keras.applications.vgg16 import decode_predictions
from keras.applications.vgg16 import VGG16
from keras import backend as K
import matplotlib.pyplot as plt
import numpy as np# Process Model
model = VGG16()
imag = load_img('madrid.jpg', target_size=(224, 224))
imag = img_to_array(image)
imag = image.reshape((1, imag.shape[0], imag.shape[1], imag.shape[2]))
imag = preprocess_input(imag)# Generate predictions
pred = model.predict(imag)
print('Predicted:', decode_predictions(pred, top=3)[0])
np.argmax(pred[0])
Prediction result:
>>>print'Predicted:',decode_predictions(pred,top=3)[0])
Predicted: [('n03788195', 'mosque', 0.578081), ('n03220513', 'dome', 0.16524781),
('n03837869', 'obelisk', 0.08766182)]
Document Page
5COMPUTER SCIENCE B.SC
For the Heatmap detection another algorithm applied: (The grad CAM algo)
specoutput=model.output[:,668]
last_conv_layer=model.get_layer('block5_conv3')
grads=K.gradients(specoutput,last_conv_layer.output)[0]
pooled_grads=K.mean(grads,axis=(0,1,2))
iterate=K.function([model.input],[pooled_grads,last_conv_layer.output[0]])
pooled_grads_value,conv_layer_output_value=iterate([image])
for_i_in_range(512):
conv_layer_output_value[:, :, i] *=
pooled_grads_value[i]heatmap=np.mean(conv_layer_output_value, axis=-1)# Heatmap post
processing
heatmap=np.maximum(heatmap,0)
heatmap/=np.max(heatmap)
plt.matshow(heatmap)
plt.show()
Result figure:
Case 2: In the second case, the convolutional neural network and Image classification
usage has been explained adequately. The MNIST and the CIFAR10 concept will
help to accomplish the target of the case. In the MNIST dataset usage, the user can
achieve 98.3% up to accuracy for the image processing. But the problem has arisen
Document Page
6COMPUTER SCIENCE B.SC
that in the dataset all images are centred in position. For that reason, the MLP
approach will fail. The network has to be Translation Invariant. Suppose an image of
number 7 has been chosen. It has been pushed to the top left and the bottom right. The
classifier tried to predict but failed in the two cases. The training will be set properly,
but the result will be difficult.
The full connected network will try to learn the global features or equivalent pattern. It will
act as a good classifier. The problems will be solved by a great extent; the layer L is
connected with the node layer L-1, which is not feasible(Ketkar 2017). The full problem has
been solved in the next step. First of all, the concept of the involvement in the Convolution
Neural completed in the implementation of CNN. The Keras is used to implement it.
The convolutional Neural Networks will form the Feed Forward Neural network.
The upcoming part is the typical CNN, which is consisted of the feature extractor.
The second part is done by the connected layer, which will perform the nonlinear
transactions to extract the features. Both the software and types are concluded
with the image recognition technology. But the first one is for the image
processing technology and the second one is the image prediction method. More
or less, both have the same thought to create the result accurately. The second
method has been selected separately. Also, it is a new approach rather than the

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
7COMPUTER SCIENCE B.SC
first one. The first one is also applied in various investigation and the scanning
object. Like Google, glass has been used this concept of technology. The other
one can be used for those situations where the estimate of an image is
needed(Gulli and Paul.,2017).
It is obvious both technologies has been used recently. The world has been trying
the concept of the Artificial Intelligence technology in today’s world. That is why
this kind of technology is needed to complete various method, like quick access
and various new technology machine (for active machinery). Some machines are
also used for the defence purpose. Now in the first algorithm, the detection has
been done properly; but the algorithm can be modified more. The second one is the
prediction procedure, that is why it is needed to more perfect. The same shape
object can be detected through this process, which will create a problem(Zhang et
al.,2016). That is why the pixel detection can be added properly.
Discussion (700):
There are several ways to create image processing through machine learning. The
biological neural network has been connected through the process in the neural network. Sir
Walter Pitts and Warren McCulloch are first to develop the concept of the processing in the
year of 1943. The Neural network can be explained with the cell unit of the system, named
Neurons. The Neurons are combined with several series; which is known as the layers. The
Neurons are connected to the other Neurons in each layer of the mapping. Each and every
node has been calculated with the mathematical calculation(Wanchaem et al.,2017). It will
transmit all the data for the connected nodes. The last wave has been connected with the
increased computing power with the accumulation of the experience. It will be brought deep
learning thought. The technological structures of the network (neural) is hugely complicated.
The wide range of task can also be solved by this process. The image classification is the best
Document Page
8COMPUTER SCIENCE B.SC
example to implement it.
CNN or the Convolution neural networks is denoted as the special architecture of the
artificial networks. This network chain has been proposed by Sir Yann LeCun in the year of
1988. The visual cortex has been used by him. The image clarification has been created in
this explanation. Facebook uses CNN for analysing the automatic tag algorithms. Amazon
has chosen this concept for generating product reference. As the previously discussed that
Google has launched the Google glass. The photo search technology in this glass and
standard website has been done through this CNN(Bahrampour et al.,2016). The image
classification has been processed with various thoughts; the skill of image processing
achieved by the human being is quite different from the computer. The idea of the computer
Document Page
9COMPUTER SCIENCE B.SC
is a little bit different; the following picture will show what the difference is:
The computer will detect the image with the array pixel. Suppose the image is
200 x 200 in size. The size of the array will be explained as 200x200x2. The first 200 is for
the width, next 200 is for the height, and the two is for the RGB value channel. The computer
is generally assigned with the value of 0 to 255. This value will describe the general intensity
of the pixel against each point implementation. The problem of the computer is created for
the character of the object. The convolutional layers are contracted through the abstract of the
target. The image has been passed through the series of the convolutional and non-linear
layers (pooling). It is fully connected with the layers, and it will generate the proper
equivalent output. The convolution layer is started in the first position. The main matrix of
the pixel value is entered into it. The imaginary reading of the input matrix will begin at the
top of the left image. The software of the selected matrix is here, which is called in the filter.
The task of the filter is selected for multiplying the values with the original value of the pixel.
All the multiplication are added. One number is generally obtained at the end of the
task(Seide and Agarwal, 2016). It will move to the further right (by 1) with the unit perform
of the operation. It will be smaller than the input matrix to control the task properly. So
according to the access of the image processing the concept of the image recognition and the

Secure Best Marks with AI Grader

Need help grading? Try our AI Grader for instant feedback on your assignments.
Document Page
10COMPUTER SCIENCE B.SC
prediction is quite popular. That is why both techniques needed to be completed properly to
complete the process. The active target of the processing is needed to complete the concept
properly. The following figure will help to clarify the hidden layer to neuron link properly.
Conclusion:
Keras is the main technology to solve image processing and the image recognition
technology. In machine learning, the Keras has a huge devotion. It has the backup of the
Tensor Flow, CNTK and the Theano techniques. All of the techniques made with the concept
of recognition and the prediction. The literature review has been created with two new topics
of Image recognition and the prediction. The recognition has been done with the algorithm to
match what is required. The prediction will predict the image with the new concept of the
scanning and Pixelization Both the task has been made with the prediction of the image (
Rampasek and Goldenberg.,2016). So both are needed to be appropriately modified for a
Document Page
11COMPUTER SCIENCE B.SC
better solution. This thought also explains the neural network. The python language also
implements the Keras, and in future, it will help for the machine learning properly.
Document Page
12COMPUTER SCIENCE B.SC
Referencing
Abadi, M., Barham, P., Chen, J., Chen, Z., Davis, A., Dean, J., ... & Kudlur, M. (2016).
Tensorflow: A system for large-scale machine learning. In 12th {USENIX}
Symposium on Operating Systems Design and Implementation ({OSDI} 16) (pp. 265-
283).
Anderson, D., Vlimant, J. R., & Spiropulu, M. (2017). An MPI-Based Python Framework for
Distributed Training with Keras. arXiv preprint arXiv:1712.05878.
Arnold, T. B. (2017). kerasR: R Interface to the Keras Deep Learning Library. J. Open
Source Software, 2(14), 296.
Bahrampour, S., Ramakrishnan, N., Schott, L., & Shah, M. (2016). Comparative study of
caffe, neon, theano, and torch for deep learning.
Chollet, F. (2018). Deep Learning mit Python und Keras: Das Praxis-Handbuch vom
Entwickler der Keras-Bibliothek. MITP-Verlags GmbH & Co. KG.
Druzhkov, P. N., & Kustikova, V. D. (2016). A survey of deep learning methods and
software tools for image classification and object detection. Pattern Recognition and
Image Analysis, 26(1), 9-15.
Gulli, A., & Pal, S. (2017). Deep Learning with Keras. Packt Publishing Ltd.
Jin, H., Song, Q., & Hu, X. (2018). Auto-keras: Efficient neural architecture search with
network morphism. arXiv preprint arXiv:1806.10282.
Ketkar, N. (2017). Introduction to keras. In Deep Learning with Python (pp. 97-111). Apress,
Berkeley, CA.

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
13COMPUTER SCIENCE B.SC
Rampasek, L., & Goldenberg, A. (2016). Tensorflow: Biology’s gateway to deep
learning?. Cell systems, 2(1), 12-14.
Seide, F., & Agarwal, A. (2016, August). CNTK: Microsoft's open-source deep-learning
toolkit. In Proceedings of the 22nd ACM SIGKDD International Conference on
Knowledge Discovery and Data Mining (pp. 2135-2135). ACM.
Shanmugamani, R. (2018). Deep Learning for Computer Vision: Expert techniques to train
advanced neural networks using TensorFlow and Keras. Packt Publishing Ltd.
Vidnerova, P., & Neruda, R. (2017, September). Evolving keras architectures for sensor data
analysis. In 2017 Federated Conference on Computer Science and Information
Systems (FedCSIS) (pp. 109-112). IEEE.
Wanchaem, T., Rattanamai, S., Dulyaseree, P., Khanchaitit, P., & Wongwiriyapan, W.
(2017). Facile synthesis of hybrid manganese oxide and multiwalled carbon nanotube
by two-step electrodeposition for supercapacitor electrode. Materials Today:
Proceedings, 4(5), 6620-6625.
Zhang, W., Du, T., & Wang, J. (2016, March). Deep learning over multi-field categorical
data. In European conference on information retrieval (pp. 45-57). Springer, Cham.
1 out of 14
circle_padding
hide_on_mobile
zoom_out_icon
[object Object]

Your All-in-One AI-Powered Toolkit for Academic Success.

Available 24*7 on WhatsApp / Email

[object Object]