Ahmad Nayfeh
Back to Projects

Frequency Decomposition Explorer

Frequency Decomposition Explorer
Signal Processing
Fourier Transform
Frequency Analysis
Image Processing
Educational Tools

Frequency Decomposition Explorer

Overview

This interactive Streamlit application enables real-time exploration of frequency components in both 1D signals and 2D images using Fast Fourier Transform (FFT). Users can upload data, define custom frequency bands, isolate specific frequency content, and reconstruct the signal/image using only selected components. The tool is designed for educational analysis, research prototyping, and visual intuition building.

Motivation

Frequency decomposition is fundamental in signal processing, but rarely visualized interactively. This project addresses that gap by combining FFT analysis with user-controllable reconstruction, making it easier to understand how low, mid, and high frequency components shape raw signals and images. It also simulates the effect of frequency-based compression and denoising.

Technical Approach

  • Frontend: Built with Streamlit for easy deployment and interactive UI
  • FFT Core: Uses NumPy's fft, fft2, and corresponding inverse transforms
  • Modular System:
    • frequency_analyzer.py: FFT computation, band masking, filtering
    • main.py: Streamlit app logic and session-based UI
    • plotter.py: Matplotlib-based visualizations (time domain, spectrum, difference)
  • Features:
    • 1D and 2D data support (.npy, .png, .jpg, etc.)
    • Customizable frequency bands (up to 8 by default)
    • Selective reconstruction using user-selected bands
    • Band-wise visualizations + difference map
    • Compression-like metrics: % of FFT coefficients retained

Key Features / Contributions

  • Real-time frequency band control with checkboxes and sliders
  • FFT-based masking and band separation using radial or linear filtering
  • Side-by-side comparison of original vs. reconstructed signals/images
  • Difference plot to visualize removed frequency content
  • Easily extendable architecture (ideal for applying to denoising or compression pipelines)

Results & Findings

  • Demonstrated clear trade-offs between frequency selection and signal fidelity
  • Achieved meaningful data reduction (up to ~90% coefficient removal) with visually minimal distortion in low-pass reconstructions
  • Exposed noise and sharp edge contributions by isolating high-frequency bands

Streamlit UI Demo

Reflection

This project sharpened my understanding of frequency-domain transformations and practical filtering techniques. It also allowed me to apply signal theory in a hands-on way, combining interactive UI design with numerical algorithms. Going forward, I plan to extend it to support wavelet transforms and integrate benchmark datasets (like ECG signals, DICOM images) for more real-world testing.

Related Projects

AI-Powered MRI Brain Tumor Segmentation

AI-Powered MRI Brain Tumor Segmentation

An end-to-end deep learning solution for the automated segmentation of brain tumors from multi-modal MRI scans.

MRI
Deep Learning
Image Processing
+1 more
AI-Powered Bearing Fault Diagnosis

AI-Powered Bearing Fault Diagnosis

An end-to-end deep learning project that uses a 1D Convolutional Neural Network (CNN) to diagnose bearing faults from vibration signals, deployed as an interactive Streamlit web app.

Machine Learning
Deep Learning
Signal Processing
+3 more
DIP-Lib: Interactive Digital Image Processing Toolkit

DIP-Lib: Interactive Digital Image Processing Toolkit

A modular Streamlit-based web app for exploring core image processing techniques — complete with parameterized controls, visual comparisons, and dynamic pipelines.

Image Processing
Educational Tools
Denoising
+2 more