muqtadar commited on
Commit
5f51360
1 Parent(s): 1d972bd

Upload 5 files

Browse files
Files changed (5) hide show
  1. README.md +82 -0
  2. config.json +107 -0
  3. preprocessor_config.json +9 -0
  4. pytorch_model.bin +3 -0
  5. training_args.bin +3 -0
README.md ADDED
@@ -0,0 +1,82 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ tags:
4
+ - generated_from_trainer
5
+ metrics:
6
+ - accuracy
7
+ model_index:
8
+ name: wav2vec2-lg-xlsr-en-speech-emotion-recognition
9
+ ---
10
+
11
+ # Speech Emotion Recognition By Fine-Tuning Wav2Vec 2.0
12
+
13
+ The model is a fine-tuned version of [jonatasgrosman/wav2vec2-large-xlsr-53-english](https://huggingface.co/jonatasgrosman/wav2vec2-large-xlsr-53-english) for a Speech Emotion Recognition (SER) task.
14
+
15
+ The dataset used to fine-tune the original pre-trained model is the [RAVDESS dataset](https://zenodo.org/record/1188976#.YO6yI-gzaUk). This dataset provides 1440 samples of recordings from actors performing on 8 different emotions in English, which are:
16
+
17
+ ```python
18
+ emotions = ['angry', 'calm', 'disgust', 'fearful', 'happy', 'neutral', 'sad', 'surprised']
19
+ ```
20
+
21
+ It achieves the following results on the evaluation set:
22
+ - Loss: 0.5023
23
+ - Accuracy: 0.8223
24
+
25
+ ## Model description
26
+
27
+ More information needed
28
+
29
+ ## Intended uses & limitations
30
+
31
+ More information needed
32
+
33
+ ## Training and evaluation data
34
+
35
+ More information needed
36
+
37
+ ## Training procedure
38
+
39
+ ### Training hyperparameters
40
+
41
+ The following hyperparameters were used during training:
42
+ - learning_rate: 0.0001
43
+ - train_batch_size: 4
44
+ - eval_batch_size: 4
45
+ - seed: 42
46
+ - gradient_accumulation_steps: 2
47
+ - total_train_batch_size: 8
48
+ - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
49
+ - lr_scheduler_type: linear
50
+ - num_epochs: 3
51
+ - mixed_precision_training: Native AMP
52
+
53
+ ### Training results
54
+
55
+ | Training Loss | Epoch | Step | Validation Loss | Accuracy |
56
+ |:-------------:|:-----:|:----:|:---------------:|:--------:|
57
+ | 2.0752 | 0.21 | 30 | 2.0505 | 0.1359 |
58
+ | 2.0119 | 0.42 | 60 | 1.9340 | 0.2474 |
59
+ | 1.8073 | 0.63 | 90 | 1.5169 | 0.3902 |
60
+ | 1.5418 | 0.84 | 120 | 1.2373 | 0.5610 |
61
+ | 1.1432 | 1.05 | 150 | 1.1579 | 0.5610 |
62
+ | 0.9645 | 1.26 | 180 | 0.9610 | 0.6167 |
63
+ | 0.8811 | 1.47 | 210 | 0.8063 | 0.7178 |
64
+ | 0.8756 | 1.68 | 240 | 0.7379 | 0.7352 |
65
+ | 0.8208 | 1.89 | 270 | 0.6839 | 0.7596 |
66
+ | 0.7118 | 2.1 | 300 | 0.6664 | 0.7735 |
67
+ | 0.4261 | 2.31 | 330 | 0.6058 | 0.8014 |
68
+ | 0.4394 | 2.52 | 360 | 0.5754 | 0.8223 |
69
+ | 0.4581 | 2.72 | 390 | 0.4719 | 0.8467 |
70
+ | 0.3967 | 2.93 | 420 | 0.5023 | 0.8223 |
71
+
72
+ ## Contact
73
+
74
+ Any doubt, contact me on [Twitter](https://twitter.com/ehcalabres) (GitHub repo soon).
75
+
76
+
77
+ ### Framework versions
78
+
79
+ - Transformers 4.8.2
80
+ - Pytorch 1.9.0+cu102
81
+ - Datasets 1.9.0
82
+ - Tokenizers 0.10.3
config.json ADDED
@@ -0,0 +1,107 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "jonatasgrosman/wav2vec2-large-xlsr-53-english",
3
+ "activation_dropout": 0.05,
4
+ "apply_spec_augment": true,
5
+ "architectures": [
6
+ "Wav2Vec2ForSequenceClassification"
7
+ ],
8
+ "attention_dropout": 0.1,
9
+ "bos_token_id": 1,
10
+ "codevector_dim": 256,
11
+ "contrastive_logits_temperature": 0.1,
12
+ "conv_bias": true,
13
+ "conv_dim": [
14
+ 512,
15
+ 512,
16
+ 512,
17
+ 512,
18
+ 512,
19
+ 512,
20
+ 512
21
+ ],
22
+ "conv_kernel": [
23
+ 10,
24
+ 3,
25
+ 3,
26
+ 3,
27
+ 3,
28
+ 2,
29
+ 2
30
+ ],
31
+ "conv_stride": [
32
+ 5,
33
+ 2,
34
+ 2,
35
+ 2,
36
+ 2,
37
+ 2,
38
+ 2
39
+ ],
40
+ "ctc_loss_reduction": "mean",
41
+ "ctc_zero_infinity": true,
42
+ "diversity_loss_weight": 0.1,
43
+ "do_stable_layer_norm": true,
44
+ "eos_token_id": 2,
45
+ "feat_extract_activation": "gelu",
46
+ "feat_extract_dropout": 0.0,
47
+ "feat_extract_norm": "layer",
48
+ "feat_proj_dropout": 0.05,
49
+ "feat_quantizer_dropout": 0.0,
50
+ "final_dropout": 0.0,
51
+ "finetuning_task": "wav2vec2_clf",
52
+ "gradient_checkpointing": true,
53
+ "hidden_act": "gelu",
54
+ "hidden_dropout": 0.05,
55
+ "hidden_size": 1024,
56
+ "id2label": {
57
+ "0": "angry",
58
+ "1": "calm",
59
+ "2": "disgust",
60
+ "3": "fearful",
61
+ "4": "happy",
62
+ "5": "neutral",
63
+ "6": "sad",
64
+ "7": "surprised"
65
+ },
66
+ "initializer_range": 0.02,
67
+ "intermediate_size": 4096,
68
+ "label2id": {
69
+ "angry": 0,
70
+ "calm": 1,
71
+ "disgust": 2,
72
+ "fearful": 3,
73
+ "happy": 4,
74
+ "neutral": 5,
75
+ "sad": 6,
76
+ "surprised": 7
77
+ },
78
+ "layer_norm_eps": 1e-05,
79
+ "layerdrop": 0.05,
80
+ "mask_channel_length": 10,
81
+ "mask_channel_min_space": 1,
82
+ "mask_channel_other": 0.0,
83
+ "mask_channel_prob": 0.0,
84
+ "mask_channel_selection": "static",
85
+ "mask_feature_length": 10,
86
+ "mask_feature_prob": 0.0,
87
+ "mask_time_length": 10,
88
+ "mask_time_min_space": 1,
89
+ "mask_time_other": 0.0,
90
+ "mask_time_prob": 0.05,
91
+ "mask_time_selection": "static",
92
+ "model_type": "wav2vec2",
93
+ "num_attention_heads": 16,
94
+ "num_codevector_groups": 2,
95
+ "num_codevectors_per_group": 320,
96
+ "num_conv_pos_embedding_groups": 16,
97
+ "num_conv_pos_embeddings": 128,
98
+ "num_feat_extract_layers": 7,
99
+ "num_hidden_layers": 24,
100
+ "num_negatives": 100,
101
+ "pad_token_id": 0,
102
+ "pooling_mode": "mean",
103
+ "problem_type": "single_label_classification",
104
+ "proj_codevector_dim": 256,
105
+ "transformers_version": "4.8.2",
106
+ "vocab_size": 33
107
+ }
preprocessor_config.json ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "do_normalize": true,
3
+ "feature_extractor_type": "Wav2Vec2FeatureExtractor",
4
+ "feature_size": 1,
5
+ "padding_side": "right",
6
+ "padding_value": 0.0,
7
+ "return_attention_mask": true,
8
+ "sampling_rate": 16000
9
+ }
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:51f2f61d0b1e09d7873ad2ef6a287f99b8e11ad1d2ee44d8278940e952270f03
3
+ size 1266155629
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:73d0e655c82ce458316cab3dff37a9cc7cf70d03b7f98b5fa338642876e3733f
3
+ size 2863