Answers.Body: <p> FFT is in essence linear transformation of the input image and can be represented by application of convolutional filter of the same size as image on the input.</p>
  <p>Provided, the convolutinoal neural network is deep enough with sufficient number of parameters and there are skip connections (in order to have a path of purely linear transformations on the input), FFT can be represented by the learned filters. If FFT of the image is relevant for the classification problem, NN most probably would learn to produce them in a certain way.</p>
  <p>For image classification problems - when the goal is identify an instance of something, local information is crucial, and this problem is better solved in the spatial, not frequency domain.</p>
  <p>However, for your case it seems, like the semantic is rather trivial, and the goal is to get rid of some frequencies. Hence, working in the frequency domain is a sensible option. Possibly, you can combine the spatial and frequency representation in some way.</p>
  <p>I think, it would be simpler to work with the real and imaginary part, that with the complex abs and phase, since you need to account for periodicity of the phase in a certain way, and then in the end transform phase to <span class="math-container">$e^{i \phi}$</span>.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-06-15T11:20:58.250Z
Answers.LastActivityDate: 2021-06-15T11:20:58.250Z
Answers.UserDisplayName: spiridon_the_sun_rotator
Body: <p>My dataset consists of about 40,000 200x200px grayscale images of centered blobs bathed in noise and occasional artifacts like stripes other blobs of different shapes and sizes, fuzzy speckles and so on in their neighborhood.
  They are used in a binary classification problem, with emphasis on recall.</p>
  <p>I read that using FFT of image and FFT of the convolutional kernel and multiplying the two, produces a similar result as convolutions would but at a way lower resource expense. This is probably the most straightforward article I found if you need a more detailed description(<a href="https://medium.com/analytics-vidhya/fast-cnn-substitution-of-convolution-layers-with-fft-layers-a9ed3bfdc99a" rel="nofollow noreferrer">https://medium.com/analytics-vidhya/fast-cnn-substitution-of-convolution-layers-with-fft-layers-a9ed3bfdc99a</a>)</p>
  <p>What I want to do however is simply feed the FFT of images to the standard CNN. The reasoning being, maybe it would be easier for the network to catch on to features that it would miss or tend to weigh less. Or in other words, FFT as a feature engineering technique.</p>
  <p>Would this be an idea worth trying to pursue?
  If so, any suggestion on which FFT components to extract (Amplitude/Phase, Real/Imaginary)?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-06-14T22:45:30.667Z
Comments.Text: Lots of people do this for dimensionality reduction for somewhat mixed results.
Comments.UserDisplayName: FourierFlux
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-06-15T08:50:37.287Z
Comments.Text: You may be interested in checking out the discussions in this [Kaggle competition](https://www.kaggle.com/c/rfcx-species-audio-detection/overview). It's an audio classification challenge actually, but there the approach is to use FT to produce a spectrogram. You may get some useful pointers to help with what you're trying to do.
Comments.UserDisplayName: Alexander Soare
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-03-08T02:37:40.347Z
Comments.Text: I don't think that is a dumb idea. [This paper](https://arxiv.org/pdf/1905.13545.pdf) fed High-frequency components of the image and found interesting results.
Comments.UserDisplayName: Minh-Long Luu
Tags: <convolutional-neural-networks><image-processing><feature-engineering>
Title: Feeding CNN FFT of an image, a dumb idea?
UserDisplayName: Dumitrescu Calin
ThreadText: # Feeding CNN FFT of an image, a dumb idea?
  
  (Asked by: username_0 on 2021-06-14)
  
  My dataset consists of about 40,000 200x200px grayscale images of centered blobs bathed in noise and occasional artifacts like stripes other blobs of different shapes and sizes, fuzzy speckles and so on in their neighborhood.
  They are used in a binary classification problem, with emphasis on recall.
  
  I read that using FFT of image and FFT of the convolutional kernel and multiplying the two, produces a similar result as convolutions would but at a way lower resource expense. This is probably the most straightforward article I found if you need a more detailed description(<https://medium.com/analytics-vidhya/fast-cnn-substitution-of-convolution-layers-with-fft-layers-a9ed3bfdc99a>)
  
  What I want to do however is simply feed the FFT of images to the standard CNN. The reasoning being, maybe it would be easier for the network to catch on to features that it would miss or tend to weigh less. Or in other words, FFT as a feature engineering technique.
  
  Would this be an idea worth trying to pursue?
  If so, any suggestion on which FFT components to extract (Amplitude/Phase, Real/Imaginary)?
  
  **Tags:** convolutional-neural-networks, image-processing, feature-engineering
  > **Comments:**
  > **username_1**: Lots of people do this for dimensionality reduction for somewhat mixed results.  
  > **username_2**: You may be interested in checking out the discussions in this [Kaggle competition](https://www.kaggle.com/c/rfcx-species-audio-detection/overview). It's an audio classification challenge actually, but there the approach is to use FT to produce a spectrogram. You may get some useful pointers to help with what you're trying to do.  
  > **username_3**: I don't think that is a dumb idea. [This paper](https://arxiv.org/pdf/1905.13545.pdf) fed High-frequency components of the image and found interesting results.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_4 on 2021-06-15. Score: 1
  
  FFT is in essence linear transformation of the input image and can be represented by application of convolutional filter of the same size as image on the input.
  
  Provided, the convolutinoal neural network is deep enough with sufficient number of parameters and there are skip connections (in order to have a path of purely linear transformations on the input), FFT can be represented by the learned filters. If FFT of the image is relevant for the classification problem, NN most probably would learn to produce them in a certain way.
  
  For image classification problems - when the goal is identify an instance of something, local information is crucial, and this problem is better solved in the spatial, not frequency domain.
  
  However, for your case it seems, like the semantic is rather trivial, and the goal is to get rid of some frequencies. Hence, working in the frequency domain is a sensible option. Possibly, you can combine the spatial and frequency representation in some way.
  
  I think, it would be simpler to work with the real and imaginary part, that with the complex abs and phase, since you need to account for periodicity of the phase in a certain way, and then in the end transform phase to $e^{i \phi}$.
  
  
  ---
  
  