numediart / emotion-eeg Goto Github PK
View Code? Open in Web Editor NEWPublic Models considered for emotion estimation from EEG
License: BSD 3-Clause "New" or "Revised" License
Public Models considered for emotion estimation from EEG
License: BSD 3-Clause "New" or "Revised" License
I used your code to run, but it reported an error, it shows such an error in the classifier section:
“”RuntimeError: Given groups=1, weight of size [32, 5, 3, 3], expected input[144, 3, 32, 32] to have 5 channels, but got 3 channels instead“”
please reply me if you see it, thank you
Hi,
I've tried to run the Sal_model.py on DEAP, but apart from fixing the number of output units of the classifier (using 4 for the valence/arousal quadrants) I can't get it to work because of an error:
RuntimeError: shape '[168, 5, 1, -1]' is invalid for input of size 43352064
The size is the product of 8064x32x168 (at least that's what it seems), of time samples x channels x (batch_size=128 + 40?)
The line is the following:
https://github.com/numediart/Emotion-EEG/blob/master/Models_DEAP.py#L530
Also I implemented the feature generation part myself, as it was incomplete (only the sensor locations code conversion is in the repo), by using "mne.time_frequency.psd_array_welch" and then averaging the power values of 5 frequency bins that are mentioned in the DEAP paper (for a total of 5 image channels which should be correct).
Best Regards.
Hello,
I was trying to reproduce the results you reported in your paper regarding the DEAP dataset. While doing so, I encountered several issues and it would be great if you could briefly comment on them.
In your paper, you describe that your framework consists of two models: a CNN designed to process EEG images and a H-RNN that accounts for information contained within different spatial levels.
However, it is not totally clear how the frequential array and the respective EEG images are obtained. Following the approach of @ale-pavel, one way would be to compute the PSD for each channel and each frequency band. For the DEAP dataset and the 5 common frequency bands, this would result in a frequential array
Using your image generation function, and the location mapping file, respective EEG images of size
Is this approach in line with your work or did you obtain your inputs differently?
Following the above mentioned approach to generate inputs for your framework, I tried to train your model using the Sal_Model.py script.
It appears that the loss becomes nan
after a few epochs. This might be related to the following line of code (168):
saliency = (saliency/saliency.max()+0.05)*2
as the maximum of the saliency matrix becomes 0 which results in a division by zero. Fixing this line using:
saliency = (saliency/(saliency.max()+0.05))*2
allows me to train your model. However, I fail in reproducing the results you report in your paper, i.e.
can you share the address of the research report or paper? Thanks a lot
Why is the size of the array (500,31,3) instead of (500,32,3)?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.