This tool processes EEG (Electroencephalogram) data by filtering and visualizing alpha, beta, and theta brain waves. The code is in data_preprocessor.py
. The data preprocessor performs the following operations:
- Reads raw EEG data from CSV files
- Applies bandpass filtering to isolate specific frequency bands
- Generates visualizations of both raw and filtered data
- Processes data into averaged time segments
- Saves visualizations as PNG files
- Reform the data to the format that the model needs
The config.json
file controls the preprocessing parameters, modify once there is a new dataset to be processed.
The model training part is in the file train_w_lstm.py
.
The test data is generated by the file gen_testData.py
.
The overall testing part is in the file alarm.py
. The structure can be devided into two parts:
- Hardware Setup: Setup LED, Buzzer, and HC05.
- Model Predicting: Using test data as input, predict the result and compare with the expected result.
This part of code is run on the Raspberry Pi to achieve the function of the alarm system.