MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord

    SOLVED MMM-Face-Reco-DNN username display mapping problem

    Troubleshooting
    2
    5
    242
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • K
      kicifans last edited by

      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?

      S 1 Reply Last reply Reply Quote 0
      • S
        sdetweil @kicifans last edited by

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

        Sam

        Create a working config
        How to add modules

        K 1 Reply Last reply Reply Quote 0
        • K
          kicifans @sdetweil last edited by

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

          S 1 Reply Last reply Reply Quote 0
          • S
            sdetweil @kicifans last edited by sdetweil

            @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]
            

            Sam

            Create a working config
            How to add modules

            K 1 Reply Last reply Reply Quote 0
            • K
              kicifans @sdetweil last edited by

              @sdetweil
              Thank you very much!
              Exactly what I needed 🙂

              1 Reply Last reply Reply Quote 0
              • 1 / 1
              • First post
                Last post
              Enjoying MagicMirror? Please consider a donation!
              MagicMirror created by Michael Teeuw.
              Forum managed by Paul-Vincent Roll and Rodrigo Ramírez Norambuena.
              This forum is using NodeBB as its core | Contributors
              Contact | Privacy Policy