EEG Spectrogram: A Python Flask EEG Analysis Tool Development - Part 4
Channel: BioniChaos
Date: 2023-12-06

Hi everyone, I'm showcasing a tool called Spectrum in this video. It's a Flask application designed for visualizing EEG (electroencephalography) data. The tool includes features like wavelet noise removal and the ability to toggle between different EEG spectrum displays. I demonstrate how to run the application, discuss its various components like Python code, JavaScript, CSS, and HTML, and delve into the specifics of the EEG data visualization.

Throughout the video, I explore the code's functionality, including loading and processing EEG data, applying wavelet denoising, generating spectrograms, and calculating metrics like signal-to-noise ratio (SNR) and mean square error (MSE). I also discuss the front-end adjustments needed for the wavelet denoising feature and the importance of consistency between the displayed raw signal and its corresponding spectrogram.

This video is particularly interesting as it includes real EEG data recorded from the surface of the brain, available from a public database. I demonstrate scrolling through EEG data, highlighting a section containing a seizure and discussing the challenges in auto-scaling during such events. The tool is still a work in progress, with some bugs and performance issues noted during the live stream.

I encourage viewers to check out the tool, provide feedback, and subscribe for more updates. Thanks for watching!

Timestamps
(00:00) Introduction to Spectrum tool
(00:22) Running the Flask application
(00:42) Features of Spectrum: Wavelet noise removal
(01:00) Toggling EEG spectrum displays
(01:36) Exploring the code: Python, JavaScript, CSS, HTML
(03:01) Discussing EEG data visualization features
(03:45) Adjusting front-end for wavelet denoising
(05:06) Parameters for spectrogram generation
(06:02) Front-end adjustments for EEG visualization
(07:00) Event listeners in JavaScript for EEG data
(08:01) Structuring JavaScript code for EEG data
(09:03) Logic for EEG signal and spectrogram
(10:26) Using raw EEG signal for spectrogram generation
(11:07) Saving progress and discussing version control
(11:41) Real EEG data demonstration
(12:27) Analyzing EEG data with small window size
(13:09) Interface functionality and page refresh
(13:29) Scrolling through EEG data with a seizure
(14:00) Auto-scaling challenges in EEG data
(14:58) Differentiating between baseline EEG and seizures

I use GitHub Copilot and ChatGPT for development. 
The tools I develop are available on https://bionichaos.com 
You can support my work on https://patreon.com/bionichaos