Open johntcuellar opened 2 years ago
It looks like everything is working correctly. There are two things you should pay attention to.
linear_sum_assignment
function.In your example, the recovered sources are
true az | true co | est az | est co |
---|---|---|---|
19.5 | 38.0 | 20.28753509 | 37.83784526 |
90.0 | 57.0 | 89.88361159 | 121.61776733 |
I have aligned the groundtruth and estimated values to reduce the error.
You can see that all values are pretty good, except for source 2 colatitude 121.6 != 56.0
. However, 121.6 actually close to the symmetric point to 56.0 wrt xy-plane, i.e. 121.6 - 2 * (121.6 - 90) = 58.4 ~ 56
.
Hi FakuFaku,
Apologies for the delayed response. Thank you very much for the explanation. This was very helpful. Regarding your response, I have a couple more questions.
Can you please explain what you mean by aligning to ground truth?
Where did you get the reflection equation about the x - y plane?
Thank you.
Best,
John
On Tue, Jul 5, 2022 at 8:32 PM Robin Scheibler @.***> wrote:
It looks like everything is working correctly. There are two things you should pay attention to.
- The order you recover the sources in is not guaranteed. This means that when you measure the distance you should consider all permutations of the source and pick the one minimizing the total error. This can be done using the Hungarian algorithm https://en.wikipedia.org/wiki/Hungarian_algorithm, which is implement in scipy by the linear_sum_assignment https://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.linear_sum_assignment.html function.
- It seems that you are using a planar array, i.e. all the microphones in a plane. In that case, sources placed symmetrically with respect to that plane cannot be told apart by the DOA algorithm. You need to resolve the ambiguity, for example by forcing all recovered source to be in the upper plane.
In your example, the recovered sources are true az true co est az est co 19.5 38.0 20.28753509 37.83784526 90.0 57.0 89.88361159 121.61776733
I have aligned the groundtruth and estimated values to reduce the error. You can see that all values are pretty good, except for source 2 colatitude 121.6 != 56.0. However, 121.6 actually is the symmetric point to 56.0 wrt xy-plane, i.e. 121.6 - 2 * (121.6 - 90) = 58.4 ~ 56.
— Reply to this email directly, view it on GitHub https://github.com/LCAV/pyroomacoustics/issues/268#issuecomment-1175740123, or unsubscribe https://github.com/notifications/unsubscribe-auth/AP5W7TPS6VGDVELLS645IJLVST45XANCNFSM52M2WIVQ . You are receiving this because you authored the thread.Message ID: @.***>
-- John Cuellar
Hello @johntcuellar ,
Hope this clarifies. If not feel free to reply to this!
Hi Robin,
This helps a lot!
Thank you!
Unrelated question: I recall reading in another thread on the PRA GitHub that one can only choose to import a STL file for the model of the room or define a shoebox room and have the ability to define wall material properties.
Is it possible to import an STL of objects within a room (chairs, tables, desks, etc.) and use the shoebox method to define the walls so that one can define a more realistic sound simulation model? If not, do you have any suggestions on any resources to do this?
Also, thank you so much for your contribution to PRA! It has been immediately helpful to my thesis. As I’ve read through the source code, I can tell that you must have put a lot of time and effort into it and it is much appreciated.
Best,
John Cuellar
On Tue, Oct 11, 2022 at 7:33 AM Robin Scheibler @.***> wrote:
Hello @johntcuellar https://github.com/johntcuellar ,
- Sure. The order of the source locations given by the algorithm is not guaranteed to match that of the groundtruth. A common practice is to measure to the error of all pairs (estimated, reference) sources, and choose the ones that minimize the total error.
- This is just standard geometry. The collatiude goes from 0 for a source right at the north pole, to 180 degrees for one at the south pole. The colatitude of the source reflected by the x-y plane is given by co_refl = co - 2 * (co - 90).
Hope this clarifies. If not feel free to reply to this!
— Reply to this email directly, view it on GitHub https://github.com/LCAV/pyroomacoustics/issues/268#issuecomment-1274794872, or unsubscribe https://github.com/notifications/unsubscribe-auth/AP5W7TLPUL75DX46HWQINSTWCV3EZANCNFSM52M2WIVQ . You are receiving this because you were mentioned.Message ID: @.***>
-- John Cuellar
Hi FakuFaku,
I cannot seem to get grid search to work for multiple signal signals. I used Issue #166 as a starting point, however, I am unsure of where to proceed from here. Please see my code below. Thank you. Also, please excuse the messy code. It is a work in progress.
In this example, I set two signals in the room. The input azimuths are 19.5 and 90 degrees and the colatitudes are 38 and 57 degrees. The output I get is as follows. As you can see, the colatitudes are way off: