[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3910918.svg)](https://doi.org/10.5281/zenodo.3910918)
## About
Pre-processing of annotated music video datasets:
* [COGNIMUSE dataset](http://cognimuse.cs.ntua.gr/database)
* [DEAP dataset](https://www.eecs.qmul.ac.uk/mmv/datasets/deap/index.html)
### Contents
[Requirements](#requirements) • [How to Use](#how-to-use) • [How to Cite](#acknowledgement)
## Requirements
Tested with Python 2.7 and Ubuntu 16.04
```
pip install -r requirements.txt
sudo apt-get install -y sox
```
> See [more details](./README_notes.md)
## How to Use
### COGNIMUSE
0. Download [COGNIMUSE dataset](http://cognimuse.cs.ntua.gr/database):
* [Download annotations](http://cognimuse.cs.ntua.gr/sites/default/files/COGNIMUSEdatabase_v0.1.zip)
* Emotion: 2D (valence-arousal) with ranges between [-1, 1]
* 2 emotions = {Neg: 0, Pos: 1}
* 4 emotions = {NegHigh: 0, NegLow: 1, PosLow: 2, PosHigh: 3}
* Download videos, extract the last 30 minutes of each video, and copy them to `data/`
* The final directory structure should be as follow:
```
.data
+-- BMI
| +-- emotion
| | +-- intended_1.dat
| +-- text
| | +-- subtitle.srt
| +-- video.mp4
...
```
1. Splice full video (with subtitle information) into S seconds each -> video, emotion, audio, text
* Run: `python video2splice.py`
* Output:
```
.data_test
+-- BMI
| +-- audio_splices_Xsecs
| | 0.wav
| ...
| | N.wav
| +-- emotion
| | +-- intended_1.dat
| | +-- intended_1_[1D/2D].csv
| | +-- intended_1_[1D/2D]_splices_Xsecs.csv
| +-- text
| | +-- subtitle.srt
| | +-- text.csv
| | +-- text_splices_Xsecs.csv
| +-- video_splices_Xsecs
| | 0.mp4
| ...
| | N.mp4
...
```
2. (Optional) Transform audio to instrumental piano audio
* Run: `python audio2piano.py`
> [More info](https://github.com/gcunhase/wav2midi2wav), needs Python 2.7
3. Save spliced data in Python's *npz* format
* Run: `python splices2npz.py`
* Run after full video has been spliced accordingly
* Full: 7 annotated music videos divided into splices of S seconds stored in *data_test/*
<p align="left">
<img src="https://github.com/gcunhase/AnnotatedMV-PreProcessing/blob/master/assets/dataset.png" width="300" alt="Dataset">
</p>
* Test: Single *.avi* or *.mp4* file in *data_test/*
4. Results will be a train and test dataset with the *npz* extension in the same root directory containing the data folders
### DEAP
0. [Download dataset](https://www.eecs.qmul.ac.uk/mmv/datasets/deap/download.html) (need to sign EULA form):
* Train data:
* Choose a video option: `highlights` (1 minute videos) or `raw video` (original music videos of varying lengths)
* Convert `$DEAP_DATA/Video/highlights/*.wmv` files to `mp4`
* Copy videos to `./data/deap/mp4/`
* Open `$DEAP_DATA/metadata_xls/participatn_ratings.XLS`, save as `$DEAP_DATA/metadata_xls/participatn_ratings.CSV` and copy it to `./data/deap/`
* Test data (same for `highlights` or `raw video`):
* Extract the first 11 seconds of each train video
* Copy it in `./data/deap/test_data/`
* The final directory structure should be as follow:
```
.data/deap/
+-- mp4
| +-- 1.mp4
| +-- 2.mp4
| ...
+-- participatn_ratings.csv
+-- test_data
| +-- 1.mp4
| +-- 2.mp4
| ...
...
```
1. Get average of emotion scores
* Run: `python deap_1_average_emotion_scores.py`
2. Splice video, audio, emotion and dummy text files
> Dummy text is necessary in order to ensure compatibility with the COGNIMUSE script
* Run: `python deap_2_video2splice.py`
3. (Optional) Transform audio to instrumental piano audio
* Run: `python deap_3_audio2piano.py`
4. Save spliced data in Python's *npz* format
* Run: `python deap_4_splices2npz.py`
## Acknowledgement
Please star or fork if this code was useful for you. If you use it in a paper, please cite as:
```
@software{gwena_cunha_2020_3910918,
author = {Gwenaelle Cunha Sergio},
title = {{gcunhase/AnnotatedMV-PreProcessing: Pre-Processing
of Annotated Music Video Corpora (COGNIMUSE and
DEAP)}},
month = jun,
year = 2020,
publisher = {Zenodo},
version = {v2.0},
doi = {10.5281/zenodo.3910918},
url = {https://doi.org/10.5281/zenodo.3910918}
}
```
If you use the COGNIMUSE database:
```
@article{zlatintsi2017cognimuse,
title={COGNIMUSE: A multimodal video database annotated with saliency, events, semantics and emotion with application to summarization},
author={Zlatintsi, Athanasia and Koutras, Petros and Evangelopoulos, Georgios and Malandrakis, Nikolaos and Efthymiou, Niki and Pastra, Katerina and Potamianos, Alexandros and Maragos, Petros},
journal={EURASIP Journal on Image and Video Processing},
volume={2017},
number={1},
pages={54},
year={2017},
publisher={Springer}
}
```
If you use the DEAP database:
```
@article{koelstra2011deap,
title={Deap: A database for emotion analysis; using physiological signals},
author={Koelstra, Sander and Muhl, Christian and Soleymani, Mohammad and Lee, Jong-Seok and Yazdani, Ashkan and Ebrahimi, Touradj and Pun, Thierry and Nijholt, Anton and Patras, Ioannis},
journal={IEEE transactions on affective computing},
volume={3},
number={1},
pages={18--31},
year={2011},
publisher={IEEE}
}
```
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
个人收集的deap数据集,脑电信号分类的工程文件,有十多个工程,有的有一些说明,值得研究一下。前面是用到的算法,后面是准确率。 1.1D CNN,82.4% 2.KNN,分类器 3.SVM4.CNN 7.ANN-83% 8.ANN-SVM,85% 9.97% 10.4D-cnn,94% 11,cnn-Istm 12.Gradient Boosting Machine&PCA 13.ACRNN,97% 14.TSception,61.57% 16.CNN 17.AMR+DWT,86.4% 18,MT-CNN,96% 19.cnn-Istm-GRU,99%
资源推荐
资源详情
资源评论
收起资源包目录
个人收集的deap数据集,脑电信号分类的工程文件 (643个子文件)
events.out.tfevents.1623185086.LAPTOP-27KR6J11.5508.0 236B
events.out.tfevents.1623184861.LAPTOP-27KR6J11.11628.0 236B
events.out.tfevents.1623066098.LAPTOP-27KR6J11.10664.0 142B
events.out.tfevents.1623066023.LAPTOP-27KR6J11.4420.0 142B
events.out.tfevents.1623185046.LAPTOP-27KR6J11.3668.0 40B
events.out.tfevents.1623064780.LAPTOP-27KR6J11.11776.0 40B
events.out.tfevents.1623064149.LAPTOP-27KR6J11.4020.0 40B
events.out.tfevents.1623065414.LAPTOP-27KR6J11.17828.0 40B
events.out.tfevents.1623065804.LAPTOP-27KR6J11.11396.0 40B
events.out.tfevents.1623064863.LAPTOP-27KR6J11.12916.0 40B
events.out.tfevents.1623064225.LAPTOP-27KR6J11.6908.0 40B
events.out.tfevents.1623064127.LAPTOP-27KR6J11.16724.0 40B
events.out.tfevents.1623065456.LAPTOP-27KR6J11.4048.0 40B
events.out.tfevents.1623065691.LAPTOP-27KR6J11.9356.0 40B
events.out.tfevents.1623065890.LAPTOP-27KR6J11.16968.0 40B
events.out.tfevents.1623065176.LAPTOP-27KR6J11.4004.0 40B
events.out.tfevents.1623064719.LAPTOP-27KR6J11.12072.0 40B
events.out.tfevents.1623065841.LAPTOP-27KR6J11.19340.0 40B
events.out.tfevents.1623064290.LAPTOP-27KR6J11.13952.0 40B
events.out.tfevents.1623065230.LAPTOP-27KR6J11.2520.0 40B
events.out.tfevents.1623065138.LAPTOP-27KR6J11.12904.0 40B
events.out.tfevents.1623064985.LAPTOP-27KR6J11.17776.0 40B
events.out.tfevents.1623064476.LAPTOP-27KR6J11.11248.0 40B
events.out.tfevents.1623065644.LAPTOP-27KR6J11.17988.0 40B
events.out.tfevents.1623065509.LAPTOP-27KR6J11.19124.0 40B
events.out.tfevents.1623185153.LAPTOP-27KR6J11.5508.1 244B
events.out.tfevents.1623184933.LAPTOP-27KR6J11.11628.1 244B
events.out.tfevents.1623066123.LAPTOP-27KR6J11.10664.1 146B
events.out.tfevents.1623066182.LAPTOP-27KR6J11.10664.10 146B
events.out.tfevents.1623066189.LAPTOP-27KR6J11.10664.11 146B
events.out.tfevents.1623066196.LAPTOP-27KR6J11.10664.12 146B
events.out.tfevents.1623066203.LAPTOP-27KR6J11.10664.13 146B
events.out.tfevents.1623066209.LAPTOP-27KR6J11.10664.14 146B
events.out.tfevents.1623066216.LAPTOP-27KR6J11.10664.15 146B
events.out.tfevents.1623066222.LAPTOP-27KR6J11.10664.16 146B
events.out.tfevents.1623066229.LAPTOP-27KR6J11.10664.17 146B
events.out.tfevents.1623066235.LAPTOP-27KR6J11.10664.18 146B
events.out.tfevents.1623066241.LAPTOP-27KR6J11.10664.19 146B
events.out.tfevents.1623185186.LAPTOP-27KR6J11.5508.2 244B
events.out.tfevents.1623184967.LAPTOP-27KR6J11.11628.2 244B
events.out.tfevents.1623066130.LAPTOP-27KR6J11.10664.2 146B
events.out.tfevents.1623066248.LAPTOP-27KR6J11.10664.20 146B
events.out.tfevents.1623066254.LAPTOP-27KR6J11.10664.21 146B
events.out.tfevents.1623066261.LAPTOP-27KR6J11.10664.22 146B
events.out.tfevents.1623066268.LAPTOP-27KR6J11.10664.23 146B
events.out.tfevents.1623066274.LAPTOP-27KR6J11.10664.24 146B
events.out.tfevents.1623066282.LAPTOP-27KR6J11.10664.25 146B
events.out.tfevents.1623066291.LAPTOP-27KR6J11.10664.26 146B
events.out.tfevents.1623066297.LAPTOP-27KR6J11.10664.27 146B
events.out.tfevents.1623066304.LAPTOP-27KR6J11.10664.28 146B
events.out.tfevents.1623066310.LAPTOP-27KR6J11.10664.29 146B
events.out.tfevents.1623185218.LAPTOP-27KR6J11.5508.3 244B
events.out.tfevents.1623066136.LAPTOP-27KR6J11.10664.3 146B
events.out.tfevents.1623066316.LAPTOP-27KR6J11.10664.30 146B
events.out.tfevents.1623066323.LAPTOP-27KR6J11.10664.31 146B
events.out.tfevents.1623066329.LAPTOP-27KR6J11.10664.32 146B
events.out.tfevents.1623066336.LAPTOP-27KR6J11.10664.33 146B
events.out.tfevents.1623066343.LAPTOP-27KR6J11.10664.34 146B
events.out.tfevents.1623066349.LAPTOP-27KR6J11.10664.35 146B
events.out.tfevents.1623066356.LAPTOP-27KR6J11.10664.36 146B
events.out.tfevents.1623066362.LAPTOP-27KR6J11.10664.37 146B
events.out.tfevents.1623066369.LAPTOP-27KR6J11.10664.38 146B
events.out.tfevents.1623066399.LAPTOP-27KR6J11.10664.39 146B
events.out.tfevents.1623066143.LAPTOP-27KR6J11.10664.4 146B
events.out.tfevents.1623066405.LAPTOP-27KR6J11.10664.40 146B
events.out.tfevents.1623066412.LAPTOP-27KR6J11.10664.41 146B
events.out.tfevents.1623066418.LAPTOP-27KR6J11.10664.42 146B
events.out.tfevents.1623066425.LAPTOP-27KR6J11.10664.43 146B
events.out.tfevents.1623066432.LAPTOP-27KR6J11.10664.44 146B
events.out.tfevents.1623066441.LAPTOP-27KR6J11.10664.45 146B
events.out.tfevents.1623066448.LAPTOP-27KR6J11.10664.46 146B
events.out.tfevents.1623066454.LAPTOP-27KR6J11.10664.47 146B
events.out.tfevents.1623066462.LAPTOP-27KR6J11.10664.48 146B
events.out.tfevents.1623066468.LAPTOP-27KR6J11.10664.49 146B
events.out.tfevents.1623066150.LAPTOP-27KR6J11.10664.5 146B
events.out.tfevents.1623066156.LAPTOP-27KR6J11.10664.6 146B
events.out.tfevents.1623066163.LAPTOP-27KR6J11.10664.7 146B
events.out.tfevents.1623066169.LAPTOP-27KR6J11.10664.8 146B
events.out.tfevents.1623066176.LAPTOP-27KR6J11.10664.9 146B
make.bat 795B
train.csv 7.18MB
features_raw.csv 4.68MB
trainb.csv 1.48MB
traind.csv 1.48MB
trainc.csv 1.48MB
traina.csv 1.48MB
train_std.csv 118KB
tuning_gsr.csv 761B
tuning_amigos_EEG.csv 756B
tuning_deap_EEG.csv 659B
class_valence.csv 79B
class_arousal.csv 79B
intended_1.dat 1.1MB
intended_1.dat 953KB
intended_1.dat 893KB
intended_1.dat 892KB
intended_1.dat 874KB
intended_1.dat 864KB
intended_1.dat 801KB
labels_0.dat 7KB
共 643 条
- 1
- 2
- 3
- 4
- 5
- 6
- 7
大大U
- 粉丝: 754
- 资源: 136
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 技术资料分享TF卡资料很好的技术资料.zip
- 技术资料分享TF介绍很好的技术资料.zip
- 10、安徽省大学生学科和技能竞赛A、B类项目列表(2019年版).xlsx
- 9、教育主管部门公布学科竞赛(2015版)-方喻飞
- C语言-leetcode题解之83-remove-duplicates-from-sorted-list.c
- C语言-leetcode题解之79-word-search.c
- C语言-leetcode题解之78-subsets.c
- C语言-leetcode题解之75-sort-colors.c
- C语言-leetcode题解之74-search-a-2d-matrix.c
- C语言-leetcode题解之73-set-matrix-zeroes.c
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
- 3
前往页