Humans are traditionally better at recognising faces than computers. However, with advancements in technology, computers are slowly catching up. To do facial recognition, computers need to use convolutional neural networks (CNN). These CNNs contain many layers. Each layer uses multiple filters to perform tasks such as detecting patterns or reducing sample sizes. Convolutional neural networks can be used in healthcare, social media apps and driving software to analyse images.
When walking through town, I often see people I recognise, such as friends or teachers. Face recognition is something that we humans do naturally without much effort. However, this simple task is something computers struggle to do. Computers must use a type of neural network called a convolutional neural network to recognise faces.
Firstly, what is a neural network?
A neural network functions like a brain in which multiple neurons form layers. Neural networks take an input, pass it through hidden layers and then output the final result.
For neural networks to work, they need to be trained with large datasets, training increases the accuracy of the network. These networks are good at prediction and classification tasks. Therefore, they are often used for image analysis, including facial recognition.
To identify an image, all its pixels would need to be individually passed through the network, and because images can contain hundreds of pixels, the network to analyse these images would be overly complex. In addition, pixel position is not considered, which is important for image processing. This is where convolutional neural networks become important.
What is a convolutional neural network (CNN)?
A convolutional neural network is a type of feed forward neural network that processes data in a grid arrangement, such as pixels within an image. The CNN identifies and extracts features from an image. Whilst a neural network contains hidden layers, a CNN contains multiple types of layers. Here are the main layers of a CNN.
In this layer, filters are passed over the image from the top left to the bottom right. Each filter detects different patterns by performing convolution calculations. Simple filters can detect edges or simple shapes. However, more complex filters can detect patterns such as dogs. Below is an example of a simple convolution calculation.
In the pooling layer, a filter is passed over the input and carries out an aggregation function. This function reduces the sample size, often known as downsampling. Then the selected values are sent to the output array.
There are two main types of pooling,
- Maximum pooling - the highest number within the region is chosen.
- Average pooling - the mean number is chosen.
Fully connected layer
This layer connects the other layers to form an output.
Where are CNNs used?
- Airport security - airports can use cameras to identify travellers and ensure they match their passport photos.
- Social media - apps use CNNs to identify faces within images so users can tag their friends easier.
- Shops - more recently, CNNs have been used to identify if a shopper has an appropriate face mask on.
- Driving - as driverless cars become more prevalent, CNNs can be used to identify lane lines to help direct the car. They can also identify the driver and passengers.
Traditionally, humans are better at face recognition than computers. However, because of the advances in artificial intelligence - such as the use of convolutional neural networks - computers can also recognise faces - often even more efficiently and accurately than humans.
Convolutional networks by IBM Cloud Education (18/07/22)https://www.ibm.com/cloud/learn/convolutional-neural-networks
Video on: What is a convolutional neural network (CNN)? By Packt video (18/07/22)https://www.youtube.com/watch?v=K_BHmztRTpA
Article containing a Simple introduction to convolutional neural networks.Author: Matthew Stewart. (18/07/22)https://towardsdatascience.com/simple-introduction-to-convolutional-neural-networks-cdf8d3077bac
Article on facial recognition (20/07/22)https://www.kaspersky.com/resource-center/definitions/what-is-facial-recognition
Millie Saffery is a 17 year old student from the UK currently studying Mathematics, Computer Science and Biology. She wants to study Computer Science at the University. She participated in a Nuffield Foundation research project run by Professor Hassan Ugail in 2022 and undertook research on the topic of ‘Convolutional Neural Networks and Face Recognition". In her free time, she likes to code and attends the army cadets.
Cite this article as:
Millie Saffery, Convolutional Neural Networks and Face Recognition, theCircle Composition, Volume 3, (2022). https://theCircleComposition.org/convolutional-neural-networks-and-face-recognition/