Automatic Attendance System will recognize the face of the student through the camera in the class and mark the attendance. It was built in Python with Machine Learning.
2. WHAT WE USE
• TensorFlow
• TensorFlow is a free and open-source software library for dataflow and differentiable
programming across a range of tasks. It is a symbolic math library, and is also used for
machine learning applications such as neural networks.
• TensorFlow is Google Brain's second-generation system
3. • Keras
• Keras is an open-source neural-network library written in Python. It is capable of running
on top of TensorFlow, Microsoft Cognitive Toolkit, Theano, or PlaidML. Designed to enable
fast experimentation with deep neural networks.
• In 2017, Google's TensorFlow team decided to support Keras in TensorFlow's core
library. Chollet explained that Keras was conceived to be an interface rather than a
standalone machine-learning framework. It offers a higher-level, more intuitive set of
abstractions that make it easy to develop deep learning models regardless of the
computational backend used.
4. • Open CV
• OpenCV is Open Source Computer Vision Library is an open source computer vision
and machine learning software library.
• OpenCV is a library of programming functions mainly aimed at real-time computer
vision. Originally developed by Intel.
5. DEEP LEARNING
• Deep learning is an artificial intelligence function that imitates the workings of the
human brain in processing data and creating patterns for use in decision making. Deep
learning is a subset of machine learning in artificial intelligence (AI) that has networks
capable of learning unsupervised from data that is unstructured or unlabeled. Also
known as deep neural learning or deep neural network.
• use a cascade of multiple layers of nonlinear processing units for feature
extraction and transformation. Each successive layer uses the output from the previous
layer as input.
• learn in supervised (e.g., classification) and/or unsupervised (e.g., pattern analysis)
manners.
• learn multiple levels of representations that correspond to different levels of
abstraction; the levels form a hierarchy of concepts.
6. NEURAL NETWORKS AND
DEEP LEARNING
• A deep neural network (DNN) is an artificial neural network (ANN) with multiple
layers between the input and output layers. ... Each mathematical manipulation as such
is considered a layer, and complex DNN have many layers, hence the name
"deep" networks.
7. CONT…
• Artificial neural networks (ANNs) or connectionist systems are computing systems inspired by the biological neural
networks that constitute animal brains. Such systems learn (progressively improve their ability) to do tasks by considering
examples, generally without task-specific programming. For example, in image recognition, they might learn to identify
images that contain cats by analyzing example images that have been manually labeled as "cat" or "no cat" and using the
analytic results to identify cats in other images. They have found most use in applications difficult to express with a
traditional computer algorithm using rule-based programming.
• An ANN is based on a collection of connected units called artificial neurons, (analogous to biological neurons in
brain). Each connection (synapse) between neurons can transmit a signal to another neuron. The receiving (postsynaptic)
neuron can process the signal(s) and then signal downstream neurons connected to it. Neurons may have state, generally
represented by real numbers, typically between 0 and 1. Neurons and synapses may also have a weight that varies as
learning proceeds, which can increase or decrease the strength of the signal that it sends downstream.
• Typically, neurons are organized in layers. Different layers may perform different kinds of transformations on their inputs.
Signals travel from the first (input), to the last (output) layer, possibly after traversing the layers multiple times.
• The original goal of the neural network approach was to solve problems in the same way that a human brain would. Over
time, attention focused on matching specific mental abilities, leading to deviations from biology such as backpropagation,
or passing information in the reverse direction and adjusting the network to reflect that information.
• Neural networks have been used on a variety of tasks, including computer vision, speech recognition, machine
translation, social network filtering, playing board and video games and medical diagnosis.
8. LIBRARY USE
• scikit-learn
• Scikit-learn is a free software machine learning library for the Python programming
language. It features various classification, regression and clustering algorithms
including support vector machines, random forests, gradient boosting, k-
means and DBSCAN, and is designed to interoperate with the Python numerical and
scientific libraries NumPy and SciPy
9. • Numpy
• NumPy is a library for the Python programming language, adding support for large,
multi-dimensional arrays and matrices, along with a large collection of high-level
mathematical functions to operate on these arrays.
•
• NumPy is a general-purpose array-processing package. It provides a high-
performance multidimensional array object, and tools for working with these arrays.
•
• It is the fundamental package for scientific computing with Python. It contains various
features including these important ones:
• A powerful N-dimensional array object
10. • Pandas
• Pandas is an open-source Python Library providing high-performance data manipulation and analysis
tool using its powerful data structures. The name Pandas is derived from the word Panel Data – an
Econometrics from Multidimensional data.
• Key Features of Pandas
• Fast and efficient DataFrame object with default and customized indexing.
• Tools for loading data into in-memory data objects from different file formats.
• Data alignment and integrated handling of missing data.
• Reshaping and pivoting of date sets.
• Label-based slicing, indexing and subsetting of large data sets.
• Columns from a data structure can be deleted or inserted.
• Group by data for aggregation and transformations.
• High performance merging and joining of data.
• Time Series functionality.
11. GUI
• Tkinter
• Python offers multiple options for developing GUI (Graphical User Interface). Out of all
the GUI methods, tkinter is most commonly used method. It is a standard Python
interface to the Tk GUI toolkit shipped with Python. Python with tkinter outputs the
fastest and easiest way to create the GUI applications.
14. HOW A COMPUTER READ AN IMAGE
Size of the Image will be – B x A x 3
15. WHY CONVOLUTIONAL NEURAL
NETWORKS ?
In Case of CNN the neuron in a layer will only be connected to a small region of the layer before it, instead
of all of the neurons in a fully-connected manner.
16. WHAT IS CONVOLUTIONAL NEURAL
NETWORKS ?
• In machine learning, a convolutional neural network(CNN, or ConvNet) is a class of
deep, feed-forward artificial neural networks that has successfully been applied to
analyzing visual imagery.
17. HOW CNN WORKS ?
Convolutional Neural Networks have
following layers:
Convolution
ReLU Layer
Pooling
Fully Connected
18. TRICKIER CASE
Here, We will have some problems, because X and O images won’t always have the same images.
There can be certain deformations. Consider the diagrams shown below:
20. HOW CNN WORKS ?
A computer understands an image using numbers at
each pixels.
In our example, we have considered that a black pixel
will have value 1 and white pixel will have -1 value.
21. HOW CNN WORKS ?
Using normal techniques, computers compare these images as:
22. HOW CNN WORKS ?
CNN compares the images piece by piece. The pieces that it looks for are called features.
By finding rough feature matches, in roughly the same position in two images ,CNN gets a lot
better at seeing similarity than whole-image matching schemes.
23. HOW CNN WORKS ?
We will be taking three features or filters, as shown below:
24. HOW CNN WORKS ?
These are small pieces of the bigger
image. We choose a feature and put it
on the input image, if it matches then
the image is classified correctly.
25. CONVOLUTION LAYER
Steps Involved in Convolution Layer
Here we will more the feature/filter to every possible position on the images.
• Step - 1 : Line up the feature and the image.
• Step - 2 : Multiply each image pixel by the corresponding feature pixel.
28. STEPS INVOLVED IN CONVOLUTION
LAYER
Here we will more the feature/filter to every possible position on the images.
• Step - 1 : Line up the feature and the image patch ( by default image patch size is
taken of 9 pixels ).
• Step - 2 : Multiply each image pixel by the corresponding feature pixel.
• Step - 3 : Add them up
• Step - 4 : Divide by total number of pixels in the feature.
30. CREATING A MAP TO PUT THE VALUE OF THE FILTER
Now to keep track of where that feature was, we create a map and put the value of the filter at that
place
31. SLIDING THE FILTER THROUGHOUT
THE IMAGE
Now, using the same feature and move it to another location and perform the filtering again.
33. CONVOLUTION LAYER OUTPUT
Similarly, we will move the feature to every other positions of the image and will see how the
feature matches that area. Finally we will get an output as:
35. RELU LAYER
In this layer we remove every negative values from the filtered images and replaces it with
zero’s
This is done to avoid the values from summing up to zero
Rectified Linear Unit (ReLU) transform function only activates a node.
40. POOLING LAYER
In this layer we shrink the image stack into a smaller size steps :
1. Pick a window size (usually 2 or 3).
2. Pick a stride (usually 2).
3. Walk you window across your filtered images.
4. From each window, take the maximum value.
Let’s perform pooling with a window size 2 and a stride 2
41. CALCULATING THE MAXIMUM VALUE IN EACH WINDOW
Let’s start with our first filtered image
In our first window the maximum or highest value is 1, so we track and move the window two
strides
46. FULLY CONNECTED LAYER
This is the final layer where the actual classification happens
Here we take our filtered and shrinked images and put them into a single list
47. OUTPUT
When we feed in, ‘X’ and ‘O’. Then there will be some element in the vector that will be high.
Consider the image below, as you can see for ‘X’ there are different elements that are high and similarly,
for ‘O’ we have different elements that are high.