# CNNs-on-CHB-MIT
The project is about applying CNNs to EEG data from CHB-MIT to predict seizure. It's a group project assigned at UNIVERSITA' DI CAMERINO for computer science bachelor.
The objective of the project was to try to replicate the result obtained in the paper:
[Truong, Nhan Duy, et al. "Convolutional neural networks for seizure prediction using intracranial and scalp electroencephalogram." Neural Networks 105 (2018): 104-111.](https://www.sciencedirect.com/science/article/pii/S0893608018301485)
The algorithm consist to create spectograms of the data and than use them with a CNN model to predict seizure.
More information are in [presentazione.pdf](presentazione.pdf) and [relazione.pdf](relazione.pdf). The two file are respectively the presentation and the relation of the work in italian language.
## Getting Started
### Prerequisites
In the project anaconda was used to managed the packages. Packages required:
* keras 2.2.2
* python 3.6.6
* tensorflow 1.10.0
* matplotlib
* numpy
* pyedflib
* scipy
For the evaluation of the network, training and testing, the GPU is used to have a fast evaluation. By using the CPU the training time is a lot more slowly than using GPU. Packages required for GPU:
* tensorflow-GPU
For the using of the GPU this link was very useful to install all the driver for Ubuntu 18.04 LTS https://medium.com/@naomi.fridman/install-conda-tensorflow-gpu-and-keras-on-ubuntu-18-04-1b403e740e25 (Note that the GPU used was GTX 850M so I can't ensure that the guide linked will work for different hardware).
### Installing
Download or clone the repository on your computer and set the parameters:
* [PARAMETERS_DATA_EDITING.txt](PARAMETERS_DATA_EDITING.txt): contain the parameters for the creation of the spectograms:
- **pathDataSet**: path of the folder containing the dataset;
- **FirstPartPathOutput**: path of the folder where spectograms will be saved;
* [PARAMETERS_CNN.txt](PARAMETERS_CNN.txt): contain the parameters for the use of CNN:
- **PathSpectogramFolder**: Path of the folder containing the spectograms;
- **OutputPath**: file where to save the results;
- **OutputPathModels**: where to save the CNN models.
## Recovering data
The dataset is downloadable from this site: [https://archive.physionet.org/pn6/chbmit/](https://archive.physionet.org/pn6/chbmit/). To get all the data it's suggested to use this command:
```
wget -r --no-parent https://archive.physionet.org/pn6/chbmit/
```
In the code only patients 1, 2, 5, 19, 21, 23 are used, the others are discarded for problems in the data.
**NOTE**: For the patient 19 replace the summary file(chb19-summary.txt) with the one in this repository inside the folder summaryChanged.
## Running
After setted all the parameters run the code.
```
python DataserToSpectogram.py #Creation of the spectograms
python CNN.py #Creation of the CNN and evaluation of the model on the spectograms
python TestThreshold.py #Search the best thresold for each patient
```
## Contributing
Please read [CONTRIBUTING.md](https://gist.github.com/PurpleBooth/b24679402957c63ec426) for details on our code of conduct, and the process for submitting pull requests to us.
## Authors
* [**Simone Morettini**](https://github.com/MesSem)
* [**Alessandra Renieri**](https://github.com/a311987)
## License
This project is licensed under the GNU GENERAL PUBLIC LICENSE - see the [LICENSE.md](LICENSE.md) file for details
<!---
## Acknowledgments
* ______
--->
没有合适的资源?快使用搜索试试~ 我知道了~
CNNs-on-CHB-MIT:该项目是关于将CNN应用于CHB-MIT的EEG数据以预测癫痫发作
共11个文件
py:3个
txt:3个
pdf:2个
5星 · 超过95%的资源 需积分: 34 36 下载量 26 浏览量
2021-05-24
22:41:11
上传
评论 5
收藏 4.3MB ZIP 举报
温馨提示
CNNs-CHB-MIT 该项目是关于将CNN应用于来自CHB-MIT的EEG数据以预测癫痫发作。 这是UNIVERSITA DI CAMERINO分配给计算机科学学士学位的小组项目。 该项目的目的是尝试复制论文中获得的结果: 该算法包括创建数据的频谱图,然后将它们与CNN模型一起使用以预测癫痫发作。 有关更多信息,请参见和 。 这两个文件分别是意大利语的作品介绍和关系。 入门 先决条件 在该项目中,anaconda用于管理软件包。 所需包装: keras 2.2.2 python 3.6.6 张量流1.10.0 matplotlib 麻木 pyedflib 科学的 为了评估网络,进行培训和测试,GPU用于快速评估。 通过使用CPU,训练时间比使用GPU慢得多。 GPU所需的软件包: 张量流 对于GPU的使用,此链接对于安装Ubuntu 18.04 LTS的所有驱
资源详情
资源评论
资源推荐
收起资源包目录
CNNs-on-CHB-MIT-master.zip (11个子文件)
CNNs-on-CHB-MIT-master
PARAMETERS_DATA_EDITING.txt 117B
relazione.pdf 1.5MB
DataserToSpectogram.py 19KB
LICENSE 34KB
CNN.py 13KB
TestThreshold.py 3KB
summaryChanged
chb19-summary.txt 4KB
README.md 3KB
PARAMETERS_CNN.txt 138B
CNNModel.png 140KB
presentazione.pdf 2.91MB
共 11 条
- 1
传奇panda
- 粉丝: 23
- 资源: 4581
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论5