Automated robust first peak detection in a time signal using computational intelligence
Goal is to detect peak in given signal(s) in directory \dataset with computation intelligence and not just signal processing.
- read from xlsx into dataframe
- calculate fft and take complex conjugate to eleminate imaginary value
- discarding any frequency below power 1.5 and calculate inverse fft
- using hilbert transformation to calculate upper envelope
- plot orignal noisy signal (code commented)
- plot FFT of noisy and filtered signal (code commented)
- plot filtered signal with upper envelope and peaks marked as 'x' (code commented)
- save the real value of peaks
- group the peaks in chunk of n_slice = 62
- create a label as ((len(df.index),len(df.columns)//n_slice)) and mark the cell as 1 where the peak is present
- create a 1D CNN network and put in the input with label
- save the modeled CNN netowork for prediction
- give test input and get peak
- read test input into dataframe
- using scipy.signal.find_peak() and get peak
• Run app.py to get web based UI to upload sample file and get results
-
Run pip install -r requirement.txt and get all libs (note that all libraries mentioned in the requirement are alligned with python version 3.9.7)
-
Run python model_train.py so we have the trained model save
-
Run python app.py to get web based UI and upload sample input from \static\files and get comparision
input - \static\files\sample_input_001.xlsx
Note: You can always run each file CNN_Model.py, model_train.py and model_predict.py for individual output