Skip to content

Commit d3a8c4b

Browse files
committed
Update README.md
1 parent 8e21cbe commit d3a8c4b

File tree

2 files changed

+29
-1
lines changed

2 files changed

+29
-1
lines changed

README.md

+29-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,30 @@
1+
## Model Description
2+
The model is finetuned on the [WavLM base plus](https://arxiv.org/abs/2110.13900) with 2,374 hours of audio clips from
3+
voice chat for multilabel classification.
4+
The audio clips are automatically labeled using a synthetic data pipeline described in [our blog post](link to blog post here).
5+
A single output can have multiple labels.
6+
The model outputs a n by 6 output tensor where the inferred labels are `Profanity`, `DatingAndSexting`, `Racist`,
7+
`Bullying`, `Other`, `NoViolation`. `Other` consists of policy violation categories with low prevalence such as drugs
8+
and alcohol or self-harm that are combined into a single category.
9+
10+
We evaluated this model on a dataset with human annotated labels that contained a total of 9795 samples with the class
11+
distribution shown below. Note that we did not include the "other" category in this evaluation dataset.
12+
13+
|Class|Number of examples| Duration (hours)|% of dataset|
14+
|---|---|---|---|
15+
|Profanity | 4893| 15.38 | 49.95%|
16+
|DatingAndSexting | 688 | 2.52 | 7.02% |
17+
|Racist | 889 | 3.10 | 9.08% |
18+
|Bullying | 1256 | 4.25 | 12.82% |
19+
|NoViolation | 4185 | 9.93 | 42.73% |
20+
21+
22+
If we set the same threshold across all classes and treat the model as a binary classifier across all 4 toxicity classes (`Profanity`, `DatingAndSexting`, `Racist`, `Bullying`), we get a binarized average precision of 94.48%. The precision recall curve is as shown below.
23+
<p align="center">
24+
<img src="images/human_eval_pr_curve.png" alt="PR Curve" width="500"/>
25+
</p>
26+
27+
## Usage
128
The dependencies for the inference file can be installed as follows:
229
```
330
pip install -r requirements.txt
@@ -7,4 +34,5 @@ To run the inference file, please run the following command:
734
```
835
python inference.py --audio_file <your audio file path> --model_path <path to Huggingface model>
936
```
10-
37+
You can get the model weights either by downloading from the model releases page [here](https://github.com/Roblox/voice-safety-classifier/releases/tag/vs-classifier-v1), or from HuggingFace under `roblox/voice-safety-classifier`.
38+
If `model_path` isn’t specified, the model will be loaded directly from HuggingFace.

images/human_eval_pr_curve.png

28.1 KB
Loading

0 commit comments

Comments
 (0)