Read the statement by Michael Teeuw here.
MMM-Face-Reco-DNN username display mapping problem
-
Hello everyone!
My problem probably is just because of my low knowledge of programming.In this module there is a property called usernameDisplayMapping and I haven’t been able to figure it out how to use it/ type in it to get it to work.
Maybe someone can help me how would this parameter should look if I would insert some random name mapping like : jerome -> Jérôme, John -> Jōhn, Caytlin -> Cāytlīņ or anything like that?
-
@kicifans dnn expects u to put the username in the module classes: “…” list ( not specified by default)
but I don’t think nls chars are supported there, so u would’ve have to map one to the other.
the name in the image recognition to the textual name used in the classes field.
MagicMirror can only show or hide modules.
for dnn, it shows the modules with the matching classes, and hides all the others.
-
@sdetweil thank you for response!
Maybe I didn’t write the problem clearly enough. I understand the main function of this module and it’s working fine. The thing is, there is a a notification which says “hello, ‘some_name’” . And I would like to map ‘šōmē_nāmē’ to show instead of ‘some_name’.This is one of this modules configuration field with its comment :
// Dictionary for person name mapping in welcome message // Allows for displaying name with complex character sets in welcome message //e.g. jerome => Jérôme, hideyuki => 英之 usernameDisplayMapping: null,
The thing is , I don’t full understand how and where I need to insert those names.
Thanks in advance! -
@kicifans ok, this is just a hash object
{ module:..., config:{ ...other config parameters usernameDisplayMapping: { //dataset_name : other_name, 'fred':'freddy', //dataset_name2: other_name2 'mary':'Mary Sue', etc } } }
the code will use this object like this
this.config.usernameDisplayMapping[dataset_name]
-
@sdetweil
Thank you very much!
Exactly what I needed :)