How Fourier Series helped introduce FCNN ?
Signal processing is a fundamental discipline in data science that deals with the extraction, analysis, and manipulation of signals and time-series data. - DataCamp
What is a signal ? :
- It's a physical quantity that varies with time , representing some form of information
- A signal can have different forms , like square , Triangle , Impulse , Sin ,Cos , Harmonic...etc according to the signal's function
- A Frequency is how many times the signal changes in a second , which unit is Hertz
What are harmonic signals ? :
Before we know about harmonic signals , we should know about sin and cos signals
- We can take a cos signal formula which can take the following form :
- 2 π :represents one full cycle around the unit circle
- f : represents the frequency or the number of cycles per unit time
Example :
Let's assume we have 2 sinusoidal functions with a frequency of 3 Hertz and 2 Hertz respectfully as follows :
- A harmonic signal , is a signal produced by a harmonic function which represents a combined signal made up of multiple sinusoidal components
Example :
If we combine the previous functions we'll get the following harmonic function :
What is a Fourier series ?
The Fourier series is a mathematical tool used in the field of signal processing and analysis, particularly in the study of periodic functions and waves.
- The Fourier series represents a periodic function as the sum of sinusoidal functions (sine and cosine) with different frequencies. This means it's breaks a periodic function into simpler pieces of sin and cosine which can help analysis
The waveform is as follows :
- a0 refers to the average value of an oscillation (one periodic cycle) , in simpler terms it tells you the baseline value the function that the signal reaches up or down
- an , bn both represents amplitudes of the sine and cosine terms in the Fourier series
Analogy :
To better understand the Fourier series formula let's take the following analogy :
Imagine if you have a cake with different layers of different flavours , the Fourier series helps breaking down the cake into individual layers :
- a0 : This is like the average flavour of the whole cake, capturing the general taste
- an and bn : These are like individual layers with coefficients representing their thickness : an : These are "cosine layers" contributing to the overall "flavour profile" in a specific way. Bigger coefficients mean thicker layers, with bigger impact on the final tastebn : These are "sine layers" also affecting the flavour profile. Even values of n (2, 4, ...) for b_n have no impact here, like layers with no flavour
领英推è
So big coefficients show importance of the layer but not necessarily the intensity of the flavour of that layer
How Fourier Transform is used to represent images ? :
- The Fourier Transform is a mathematical tool that takes a signal (like an image, sound wave, or even temperature data) and decomposes it into its constituent building blocks, which are harmonic sine waves of various frequencies and amplitudes
- Fourier Transform started working on signal analysis then audio processing which is basically 1D signals represented by the following formula :
- Also another thing is that Fourier Transform plays a crucial role in image analysis by allowing us to decompose an image, which is essentially a 2D signal, into its frequency components. This decomposition reveals valuable information about the image's content, and this information can be used for various image processing tasks :
- To do that it uses the following formula which is a 2D version of the previous formula :
Fourier Series & CNNs (FCNNs) :
Problem :
As we know Convolutional Neural Networks (CNNs) are powerful for computer vision but struggle with large datasets and deep networks due to the computational cost of spatial convolutions.
Standard CNNs perform convolutions by sliding a filter (kernel) across the image, which becomes expensive for large images
Solution :
FCNNs perform convolutions in the Fourier domain, significantly speeding up training without sacrificing accuracy. This allows processing of larger images within reasonable timeframes
FCNN has the same architecture as CNN but adds some Fourier spice into it where :
- Fourier Convolution : Traditional CNNs use a sliding window approach for convolutions, which is computationally expensive for large images. FCNNs uses Fourier transform which allows calculating convolutions efficiently which reduces the number of operations significantly compared to the sliding window method, especially for larger images
- Fourier Pooling : FCNNs can shrink images by cutting out the "edges" (less important information) while keeping the crucial "core" (details). This shrinks data size like traditional CNNs (max-pooling), but FCNNs might be better at keeping the important information .
For better and more extensive comprehension , please check out the following links :
You can check the same article on Medium