CoolFace
Modelpublic

somosnlp-hackathon-2022/wav2vec2-base-finetuned-sentiment-classification-MESD

sourceHugging Faceapache-2.0updated 3y agoView on Hugging Face
10likes210downloads
Model Card

<!-- 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. -->

wav2vec2-base-finetuned-sentiment-mesd-v11

This model is a fine-tuned version of facebook/wav2vec2-base on the MESD dataset. It achieves the following results on the evaluation set:

  • —Loss: 0.3071
  • —Accuracy: 0.9308

Model description

This model was trained to classify underlying sentiment of Spanish audio/speech.

Intended uses

  • —Presenting, recommending and categorizing the audio libraries or other media in general based on detected mood/preferences via user's speech or user's aural environment. A mood lighting system, in addition to the aforementioned features, can be implemented to make user's environment a bit more user-friendly, and and so contribute a little to maintaining the user's mental health and overall welfare. [Goal 3- SDG]
  • —Additionally, the model can be trained on data with more class labels in order to be useful particularly in detecting brawls, and any other uneventful scenario. An audio classifier can be integrated in a surveillance system to detect brawls and other unsettling events that can be recognized using "sound." [Goal 16 -SDG]

Limitations

-The open-source MESD dataset was used to fine-tune the Wav2Vec2 base model, which contains ~1200 audio recordings, all of which were recorded in professional studios and were only one second long. Out of ~1200 audio recordings only 890 of the recordings were utilized for training. Due to these factors, the model and hence this Gradio application may not be able to perform well in noisy environments or audio with background music or noise. It's also worth mentioning that this model performs poorly when it comes to audio recordings from the class "Fear," which the model often misclassifies.

Training procedure

Training hyperparameters

The following hyperparameters were used during training:

  • —learning_rate: 0.0001
  • —trainbatchsize: 64
  • —evalbatchsize: 40
  • —seed: 42
  • —gradientaccumulationsteps: 4
  • —totaltrainbatch_size: 256
  • —optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
  • —lrschedulertype: linear
  • —num_epochs: 100

Training results

Training LossEpochStepValidation LossAccuracy
No log0.8631.75160.3846
1.94281.8661.68590.4308
1.94282.8691.55750.4692
1.96293.86121.41600.4846
1.56784.86151.29790.5308
1.56785.86181.22940.5308
1.47286.86211.07030.5923
1.47287.86240.99260.6308
1.25888.86270.92020.6846
0.9919.86300.85370.6846
0.99110.86330.88160.6769
0.905911.86360.71490.7769
0.905912.86390.76760.7462
0.790113.86420.69710.7538
0.627814.86450.66710.7923
0.627815.86480.56810.8231
0.567816.86510.55350.8154
0.567817.86540.59470.8077
0.515718.86570.63960.7692
0.418919.86600.52910.8077
0.418920.86630.46000.8538
0.388521.86660.51880.8308
0.388522.86690.59590.7923
0.325523.86720.52400.8462
0.271124.86750.51050.8385
0.271125.86780.51770.8231
0.274826.86810.33020.8923
0.274827.86840.47740.8538
0.237928.86870.42040.8769
0.198229.86900.65400.7692
0.198230.86930.56640.8308
0.217131.86960.51000.8462
0.217132.86990.39240.8769
0.1733.861020.60020.8231
0.176134.861050.43640.8538
0.176135.861080.41660.8692
0.170336.861110.43740.8692
0.170337.861140.38720.8615
0.156938.861170.39410.8538
0.114939.861200.40040.8538
0.114940.861230.43600.8385
0.108741.861260.43870.8615
0.108742.861290.43520.8692
0.103943.861320.40180.8846
0.09944.861350.40190.8846
0.09945.861380.40830.8923
0.104346.861410.45940.8692
0.104347.861440.44780.8769
0.090948.861470.50250.8538
0.102449.861500.54420.8692
0.102450.861530.38270.8769
0.145751.861560.68160.8231
0.145752.861590.34350.8923
0.123353.861620.44180.8769
0.10154.861650.46290.8846
0.10155.861680.46160.8692
0.096956.861710.36080.8923
0.096957.861740.48670.8615
0.098158.861770.44930.8692
0.064259.861800.38410.8538
0.064260.861830.45090.8769
0.082461.861860.44770.8769
0.082462.861890.46490.8615
0.067563.861920.34920.9231
0.083964.861950.37630.8846
0.083965.861980.44750.8769
0.067766.862010.41040.8923
0.067767.862040.30710.9308
0.062668.862070.35980.9077
0.041269.862100.37710.8923
0.041270.862130.40430.8846
0.056271.862160.36960.9077
0.056272.862190.32950.9077
0.044773.862220.36160.8923
0.072774.862250.34950.8923
0.072775.862280.43300.8846
0.057676.862310.51790.8923
0.057677.862340.55440.8846
0.048978.862370.46300.9
0.047279.862400.45130.9
0.047280.862430.42070.9077
0.038681.862460.41180.8769
0.038682.862490.47640.8769
0.037283.862520.41670.8769
0.034484.862550.37440.9077
0.034485.862580.37120.9077
0.045986.862610.42490.8846
0.045987.862640.46870.8846
0.036488.862670.41940.8923
0.028389.862700.39630.8923
0.028390.862730.39820.8923
0.027891.862760.38380.9077
0.027892.862790.37310.9
0.035293.862820.37360.9
0.029794.862850.37020.9
0.029795.862880.35210.9154
0.024596.862910.35220.9154
0.024597.862940.36000.9077
0.024198.862970.36360.9077
0.028499.863000.36390.9077

Framework versions

  • —Transformers 4.17.0
  • —Pytorch 1.10.0+cu111
  • —Datasets 2.0.0
  • —Tokenizers 0.11.6