File size: 2,602 Bytes
e752aa6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
dcbc327
e752aa6
 
 
dcbc327
e752aa6
 
 
dcbc327
 
 
e752aa6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
---
license: apache-2.0
base_model: facebook/wav2vec2-base
tags:
- generated_from_trainer
datasets:
- audiofolder
metrics:
- accuracy
model-index:
- name: model_KWS
  results:
  - task:
      name: Audio Classification
      type: audio-classification
    dataset:
      name: audiofolder
      type: audiofolder
      config: default
      split: test
      args: default
    metrics:
    - name: Accuracy
      type: accuracy
      value: 0.9825
---

<!-- This model card has been generated automatically according to the information the Trainer had access to. You
should probably proofread and complete it, then remove this comment. -->

# model_KWS

This model is a fine-tuned version of [facebook/wav2vec2-base](https://huggingface.co/facebook/wav2vec2-base) on the audiofolder dataset.
It achieves the following results on the evaluation set:
- Loss: 0.3346
- Accuracy: 0.9825

## Model description

Finetuned on custom commands: "ambient", "light", "off", "on", "scene1", "scene2", "scene3", "void"

## Intended uses & limitations

Intended for keyword spotting applications.

## Training and evaluation data

3200 training samples, 800 testing samples in total. 
Originally was recorded 20 samples of every class. 
Each sample was randomly augmented with random methods: pitch-shifting, time-stretching, volume-change, gaussian noise.

## Training procedure

### Training hyperparameters

The following hyperparameters were used during training:
- learning_rate: 3e-05
- train_batch_size: 32
- eval_batch_size: 32
- seed: 42
- gradient_accumulation_steps: 4
- total_train_batch_size: 128
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- lr_scheduler_warmup_ratio: 0.1
- num_epochs: 10

### Training results

| Training Loss | Epoch | Step | Validation Loss | Accuracy |
|:-------------:|:-----:|:----:|:---------------:|:--------:|
| 2.0119        | 1.0   | 25   | 1.9832          | 0.375    |
| 1.4505        | 2.0   | 50   | 1.3361          | 0.8337   |
| 1.0767        | 3.0   | 75   | 0.8700          | 0.955    |
| 0.7448        | 4.0   | 100  | 0.6919          | 0.9513   |
| 0.6143        | 5.0   | 125  | 0.5333          | 0.9625   |
| 0.4924        | 6.0   | 150  | 0.4387          | 0.98     |
| 0.4544        | 7.0   | 175  | 0.3844          | 0.985    |
| 0.3888        | 8.0   | 200  | 0.3668          | 0.9812   |
| 0.3734        | 9.0   | 225  | 0.3436          | 0.9825   |
| 0.3522        | 10.0  | 250  | 0.3346          | 0.9825   |


### Framework versions

- Transformers 4.31.0
- Pytorch 2.0.1
- Datasets 2.14.0
- Tokenizers 0.13.3