SEERNET / deepaffects-node

Node wrapper for DeepAffects API
https://developers.deepaffects.com
MIT License
5 stars 11 forks source link

Big accuracy problems with various files format #12

Open coltaemanuela opened 6 years ago

coltaemanuela commented 6 years ago

I have tested the Emotion Recognition API with 10 different samples for all the 7 emotions. Out of 70 tests, none of them failed. It was 100% accurate. But this was because I used a particular type of .wav files (find them here: https://tspace.library.utoronto.ca/handle/1807/24487 ). When I use mp3 files or other files expressing exactly the same emotion, the API fails. It identifies a wrong emotion. I also tried to provide base64 encoded data. The same happened: for this sort of files, it works perfectly, for others it just fails. With curl request, the same happens. A big difference between encoded .wav files and encoded .mp3 or other formats or even .wav files with different properties. And this is even more annoying.

For example, in the MP3 file here, taken directly from your website, the API will not identify fear(as it should and you state it should), but it identifies happiness with a score of 0.6907534228467851: https://drive.google.com/file/d/1HKkGCzci5GE6ObC8Frm-hMacTINcE9yd/view?usp=sharing

However, for exactly the same content, but in .wav format, it identifies fear correctly with a score of 0.9999930278037144. https://drive.google.com/file/d/1pc8ekCX_--m5c-e7amxwEz-CCuKJuggy/view?usp=sharing

Please, tell me what are the required properties for the files provided as parameters. I was testing it with files of different sample rate, bit rate, file type, bits per sample, encoding, etc. It just fails.

royaljain commented 6 years ago

Hi Emanuela,

Thanks for your patience. I'll look at the cause of this issue and update you. I have requested access for the google drive links you have shared, can you approve them ?

coltaemanuela commented 6 years ago

Thank you! Yes, I shared the documents. I am sorry, I thought I made them public. It doesn't concern me the problems with MP3 files as much as the difference between the responses to similar WAV files.

For example, the analysis of the file "potential_anger.wav" in attachment (link: https://drive.google.com/file/d/18JA3vOVyZDjT0_jXbbfPHCO0RT06AAkb/view?usp=sharing) in which I acted anger, returns a score like this: [ { emotion: 'angry', score: 2.4995487213473704e-10 }, { emotion: 'disgust', score: 0.5389057574399883 }, { emotion: 'fear', score: 2.58724934523868e-15 }, { emotion: 'happy', score: 0.4610939522111886 }, { emotion: 'neutral', score: 1.4425794330464223e-26 }, { emotion: 'surprise', score: 2.9009886564275957e-7 }, { emotion: 'sad', score: 1.9392587709339924e-21 } ]

, while for the file "YAF_soup_angry",(https://drive.google.com/file/d/13lnrwlzEFsbvenM7LkgVs-P9PX2Psiao/view?usp=sharing) the score is very, very accurate: [ { emotion: 'angry', score: 0.9999999999577296 }, { emotion: 'disgust', score: 1.1889247352508444e-18 }, { emotion: 'fear', score: 3.5162425965083294e-11 }, { emotion: 'happy', score: 5.694770937476145e-22 }, { emotion: 'neutral', score: 1.4645949764467913e-27 }, { emotion: 'surprise', score: 7.10804068600984e-12 }, { emotion: 'sad', score: 1.1053981091057583e-26 } ]

I tried to convert the first file to get to similar properties as the second file. Please, tell me what other properties it should have (and can possibly be added computationally) or if you believe the problem is at all regarding the properties of the file. Please, keep me updated with what you believe it could be the cause. I am looking forward to hearing from you!

Kind regards, Emanuela Colta

On Thu, Aug 30, 2018 at 7:13 AM royaljain notifications@github.com wrote:

Hi Emanuela,

Thanks for your patience. I'll look at the cause of this issue and update you. I have requested access for the google drive links you have shared, can you approve them ?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/SEERNET/deepaffects-node/issues/12#issuecomment-417201937, or mute the thread https://github.com/notifications/unsubscribe-auth/AJyXjiY2jUklHpXFdyB9W9sUlLSWZbEbks5uV4KhgaJpZM4WMxF8 .

-- Colța Emanuela-Felicia tel: 0753.2828.872

IshanFx commented 5 years ago

@coltaemanuela Is it return score? I tried with node library and it doesn't return any score for emotion Recognition API.