introlab / odas

ODAS: Open embeddeD Audition System
MIT License
780 stars 248 forks source link

Configuration of SST. #78

Open bradysprings opened 6 years ago

bradysprings commented 6 years ago

Hello @FrancoisGrondin ,

I have changed the sampling rate (48000hz), hop size (2048), frame size (4096) to do some experiment. SSL works well but SST no longer works (the big highlighted dots do not appear any more).

I think it may be because of the number of pots being generated (from SSL) per unit time decreased.

Or could there be any other reason? Could you help me find the correct configuration to make SST work with my current settings?

Thanks!

FrancoisGrondin commented 6 years ago

Yep could be that. Have you play with the detection threshold?

bradysprings commented 6 years ago

How do I play with the detection threshold? Could you let me know which configuration (https://github.com/introlab/odas/wiki/configuration) variable I should manipulate?

FrancoisGrondin commented 6 years ago

Sorry for the late reply:

The energy distribution of the localization process is modeled by two GMMs, one for source activity, and one for source inactivity. In most cases you can simply have one gaussian for each, and their parameters are given in active.[0].mu and inactive.[0].mu. You can usually decrease the mean of active to make detection more sensitive.

bradysprings commented 6 years ago

Reducing active.[0].mu and inactive.[0].mu did not work well. I also tried increasing the number of pots in the ssl section of the configuration file from 4 to 8 but got a segmentation fault. Do I need to change something else together?

FrancoisGrondin commented 6 years ago

Also, please try to reduce the frameSize to 1024, and set the hopSize to 256. Tell me if it helps.

bradysprings commented 6 years ago

Reducing values (frameSize to 1024, hopSize to 256) decreases the overall detection performance. And also the computation overhead seems to be too high for a raspberry pi 3 to handle.

luc2yj commented 6 years ago

Hello, @FrancoisGrondin

I noticed the same thing with @bradysprings . Changing the number of pots causes a segmentation fault. Do you have plans to fix the issue?

Thanks!

FrancoisGrondin commented 6 years ago

Ok; I'm currently on vacations: let me address that next week. Out of curiosity, when you get the segfault, what's the number of potential sources?

luc2yj commented 6 years ago

Thank you @FrancoisGrondin ! Anything other than 4 causes a segmentation fault.

FrancoisGrondin commented 6 years ago

:O I can't believe I missed that. Will definitely investigate. Thanks for pointing this out!

bradysprings commented 6 years ago

Could you leave a comment in this thread once you fix it? Thanks.

luc2yj commented 6 years ago

Sounds good @FrancoisGrondin ! I tracked the problem just a bit and it seems like it runs well until ODAS runs the amod_sst_thread function in amod_sst.c. More specifically, within the function the line below seems to generate the segmentation fault. msg_pots_in = amsg_pots_filled_pop(obj->in1); I didn't go further from here though. Please let me know how you fixed it as I want to fix my code as well.

FrancoisGrondin commented 6 years ago

Thank you! I'll run valgrind and investigate 'til I find the source of the problem!

bradysprings commented 6 years ago

When do you think you will have this issue fixed? Is there an estimate of fixing this error? Thank you @FrancoisGrondin .

FrancoisGrondin commented 6 years ago

So I ran odas with valgrind for the pheonix branch (which contains the version 3.0 of odas, with many new features, and I don't get any segfault while setting nPots to a different value). I suppose you are experiencing this problem with the version on the master branch? Did any of view tried with version 3.0 in the phoenix branch?

luc2yj commented 6 years ago

Yes. I am using the master branch. I will check out the phoenix branch. Hopeful the code is similar so that I can easily port the modifications that I made.

luc2yj commented 6 years ago

@FrancoisGrondin , it seems like the phoenix branch is quite different from the master branch. To begin with, it looks like the matrix voice configuration file in the phoenix branch is empty.

How do I port the current configuration file to the phoenix branch? Would directly using the current configuration file work?

Also, does it still work with ODAS web?

How do I set the port for reading the raw file. Is it set to 5001 by default in most cases? It seems like the master branch version didn't require such information.

Can we use the phoenix version like the odaslive? instead of the odasserver?

bradysprings commented 6 years ago

I have been using the odas master branch as well and was using odaslive. Is it possible to fix the error in the master branch as well?

FrancoisGrondin commented 6 years ago

Yes, the phoenix branch is a brand new thing with odas. It is very different from master, and this is why I'm not merging it yet. My goal is to have a first stable release based on the pheonix branch. Here odas behaves as a server that accepts socket connections, and uses external tools to format the data.

I plan to adapt every config file to match the phoenix config files (which are now in JSON). I wrote my own JSON parser, so this way I removed dependency on libconfig. Moreover, using sockets removes the needs to use ALSA (you can for instance push the raw with arecord, or any other software, which makes the library OS independent).

My colleague will have to update odas web to make it compatible with phoenix.

For now I'm aware many people use the current version in master, so I will try to reproduce your bug in the master branch tomorrow, and fix it.

bradysprings commented 6 years ago

Your latest master branch version seems to have no problems with increasing the pots from the config file. Let me port my code to you latest master branch and see how it works. @luc2yj you should update it to the latest master branch as well.

FrancoisGrondin commented 6 years ago

@bradysprings Oh! Lemme know if the problem is solved with the latest version

luc2yj commented 6 years ago

@bradysprings Thank you for letting me know. It did help. 👍

@FrancoisGrondin It does work until nPots=9. Starting from nPots=10 a segmentation fault occurs.

I found this problem by testing the configuration fields of SSL because I wanted to exactly understand how the potential points were getting plotted on ODAS_WEB. Since you paper is accepted, can you provide more details regarding what the configurations mean? By reading ODAS code, I did understand what some of them do. But if you could explain the effect of the parameters it would be very helpful.

nPots: the number of potential points to get from GCC PHAT result, nMatches: Not sure, probMin: Not sure, nRefinedLevels: Not sure, interpRate: used in ssl to interpolate the freq information before doing ifft,
scans.[0].level,
scans.[0].delta, scans.[1].level, scans.[2].level

FrancoisGrondin commented 6 years ago

Yes, I'm now doing the minor revision on the paper, and I'll push it on Arxiv in the next few days.