• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

MMM-Face-Reco-DNN username display mapping problem

Scheduled Pinned Locked Moved Solved Troubleshooting
5 Posts 2 Posters 549 Views 2 Watching
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 Offline
    kicifans
    last edited by Sep 30, 2021, 4:32 PM

    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 Oct 2, 2021, 12:25 AM Reply Quote 0
    • S Away
      sdetweil @kicifans
      last edited by Oct 2, 2021, 12:25 AM

      @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

      How to add modules

      learning how to use browser developers window for css changes

      K 1 Reply Last reply Oct 2, 2021, 8:30 AM Reply Quote 0
      • K Offline
        kicifans @sdetweil
        last edited by Oct 2, 2021, 8:30 AM

        @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 Oct 8, 2021, 12:21 PM Reply Quote 0
        • S Away
          sdetweil @kicifans
          last edited by sdetweil Oct 8, 2021, 12:28 PM Oct 8, 2021, 12:21 PM

          @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

          How to add modules

          learning how to use browser developers window for css changes

          K 1 Reply Last reply Oct 9, 2021, 7:48 AM Reply Quote 0
          • K Offline
            kicifans @sdetweil
            last edited by Oct 9, 2021, 7:48 AM

            @sdetweil
            Thank you very much!
            Exactly what I needed :)

            1 Reply Last reply Reply Quote 0
            • 1 / 1
            1 / 1
            • First post
              1/5
              Last post
            Enjoying MagicMirror? Please consider a donation!
            MagicMirror created by Michael Teeuw.
            Forum managed by Sam, technical setup by Karsten.
            This forum is using NodeBB as its core | Contributors
            Contact | Privacy Policy