MagicMirror² v2.13.0 is available! For more information about this release, check out this topic.

Cannot run "MMM-Face-Reco-DNN" with "MMM-GoogleAssistant"



  • Hello everyone First of all Thank you so much for this amazing system, it is amazing to see what beautiful things you can do with it, many thanks to all the developers.

    I’m new here so I apologize if the question is unclear or my English is not the best.
    The system works on RPI4 4GB
    When I ask a question the google assistant it’s responds very slowly, sometimes getting stuck and not understanding what I asked, but when I remove the MMM-Face-Reco-DNN from theconfig.js then google assistant works perfectly without any problems.

    • i have the same problem with the older module MMM AssistantMk2
    • i can’t see any error when run npm run start dev

    Does anyone have the same problem?
    I am attaching logs that can help you help me, thank you very much in advance
    kobi

    pi@raspberrypi:~/MagicMirror $ npm run start dev
    
    > magicmirror@2.11.0 start /home/pi/MagicMirror
    > DISPLAY="${DISPLAY:=:0}" ./node_modules/.bin/electron js/electron.js "dev"
    
    [2020-06-06 01:45:36.510] [LOG]    Starting MagicMirror: v2.11.0
    [2020-06-06 01:45:36.517] [LOG]    Loading config ...
    [2020-06-06 01:45:36.522] [LOG]    Loading module helpers ...
    [2020-06-06 01:45:36.527] [LOG]    No helper found for module: alert.
    [2020-06-06 01:45:36.568] [LOG]    Initializing new module helper ...
    [2020-06-06 01:45:36.569] [LOG]    Module helper loaded: updatenotification
    [2020-06-06 01:45:36.570] [LOG]    No helper found for module: clock.
    [2020-06-06 01:45:36.993] [LOG]    Initializing new module helper ...
    [2020-06-06 01:45:36.994] [LOG]    Module helper loaded: calendar
    [2020-06-06 01:45:36.995] [LOG]    No helper found for module: compliments.
    [2020-06-06 01:45:37.024] [LOG]    Initializing new module helper ...
    [2020-06-06 01:45:37.025] [LOG]    Module helper loaded: newsfeed
    [2020-06-06 01:45:38.150] [LOG]    Initializing new module helper ...
    [2020-06-06 01:45:38.151] [LOG]    Module helper loaded: MMM-GoogleAssistant
    [2020-06-06 01:45:38.151] [LOG]    All module helpers loaded.
    [2020-06-06 01:45:38.284] [LOG]    Starting server on port 8080 ... 
    [2020-06-06 01:45:38.300] [LOG]    Server started ...
    [2020-06-06 01:45:38.301] [LOG]    Connecting socket for: updatenotification
    [2020-06-06 01:45:38.302] [LOG]    Connecting socket for: calendar
    [2020-06-06 01:45:38.303] [LOG]    Starting node helper for: calendar
    [2020-06-06 01:45:38.303] [LOG]    Connecting socket for: newsfeed
    [2020-06-06 01:45:38.304] [LOG]    Starting module: newsfeed
    [2020-06-06 01:45:38.304] [LOG]    Connecting socket for: MMM-GoogleAssistant
    [2020-06-06 01:45:38.305] [LOG]    Sockets connected & modules started ...
    [2020-06-06 01:45:38.405] [LOG]    Launching application.
    [2020-06-06 01:45:43.204] [LOG]    Create new calendar fetcher for url: http://www.calendarlabs.com/ical-calendar/ics/76/US_Holidays.ics - Interval: 300000
    [2020-06-06 01:45:43.268] [LOG]    Create new news fetcher for url: http://www.nytimes.com/services/xml/rss/nyt/HomePage.xml - Interval: 300000
    [2020-06-06 01:45:43.426] [LOG]    [ASSISTANT] MMM-GoogleAssistant Version: 2.0.0
    [2020-06-06 01:45:43.430] [LOG]    [SNOWBOY] Model selected: jarvis
    [2020-06-06 01:45:43.435] [LOG]    [SNOWBOY] snowboy v1.5.0 Initialized...
    [2020-06-06 01:45:43.450] [LOG]    [ASSISTANT] RECIPE_LOADED: with-MMM-TelegramBot.js
    [2020-06-06 01:45:43.452] [LOG]    [ASSISTANT] Google Assistant is initialized.
    [2020-06-06 01:47:08.720] [LOG]    Shutting down server...
    [2020-06-06 01:47:08.721] [LOG]    Stopping module helper: updatenotification
    [2020-06-06 01:47:08.722] [LOG]    Stopping module helper: calendar
    [2020-06-06 01:47:08.722] [LOG]    Stopping module helper: newsfeed
    [2020-06-06 01:47:08.723] [LOG]    Stopping module helper: MMM-GoogleAssistant
    
    

    part of my config.js

    {
      module: "MMM-GoogleAssistant",
      position: "fullscreen_above",
        classes: 'default everyone',  
      config: {
        debug: false,
        assistantConfig: {
          lang: "en-US",
          projectId: "", // Required to use gaction.
          modelId: "", // (OPTIONAL for gaction)
          instanceId: "", // (OPTIONAL for gaction)
          latitude: 51.508530,
          longitude: -0.076132,
        },
        responseConfig: {
          useScreenOutput: true,
          screenOutputCSS: "screen_output.css",
          screenOutputTimer: 5000,
          activateDelay: 250,
          useAudioOutput: true,
          useChime: true,
          newChime: false // !!!DEV!!! 
        },
        micConfig: { // put there configuration generated by auto-installer
          recorder: "arecord",
          device: "plughw:3",
        },
        customActionConfig: {
          autoMakeAction: false,
          autoUpdateAction: false, // in RPI, gaction CLI might have some trouble.(current version should be 2.2.4, but for linux-arm, Google haven't updated) so leave this as false in RPI. I don't know it is solved or not.
          actionLocale: "en-US", // At this moment, multi-languages are not supported, sorry. Someday I'll work.
        },
        snowboy: {
          audioGain: 2.0,
          Frontend: true,
          Model: "jarvis",
          Sensitivity: null
        },
        snowboy: {
          audioGain: 2.0,
          Frontend: true,
          Model: "jarvis",
          Sensitivity: null
        },
        A2DServer: {
          useA2D: false,
          stopCommand: "stop"
        },
        recipes: [ "with-MMM-TelegramBot.js" ]
      }
    },
    		{
        module: 'MMM-Face-Reco-DNN',
        classes: 'default everyone',
        config: {
          // Logout 15 seconds after user was not detected any more
          // If they are detected within this period, the delay will start again
          logoutDelay: 15000,
          // How often the recognition starts in milliseconds
          // With a Raspberry Pi 3+ it works well every 2 seconds
          checkInterval: 2000,
          // Module set used for strangers or if no user is detected
          defaultClass: 'default',
          // Set of modules which should be shown for every recognised user
          everyoneClass: 'everyone',
          // XML to recognize with haarcascade
          cascade: 'modules/MMM-Face-Reco-DNN/tools/haarcascade_frontalface_default.xml',
          // Pre-encoded pickle with the faces
          encodings: 'modules/MMM-Face-Reco-DNN/tools/encodings.pickle',
          // Use Raspberry Pi camera or another type
          // 1 = RasPi camera, 0 = other camera
          usePiCamera: 0,
          // Rotate camera
          rotateCamera: 0,
          // Method of facial recognition
          // dnn = deep neural network, haar = haarcascade
          method: 'dnn',
          // Which face detection model to use
          // "hog" is less accurate but faster on CPUs
          // "cnn" is a more accurate deep-learning model which is GPU/CUDA accelerated
          detectionMethod: 'hog',
          // How long in milliseconds modules take to hide and show
          animationSpeed: 0,
          // Path to Python to run the face recognition
          // null or '' means default path
          pythonPath: null,
          // Should a welcome message be shown using the MagicMirror alerts module?
          welcomeMessage: true,
          // Capture new pictures of recognized people, if unknown we save it in folder "unknown"
          // So you can extend your dataset and retrain it afterwards for better recognitions
          extendDataset: false,
          // If extendDataset is true, you need to set the full path of the dataset
          dataset: 'modules/MMM-Face-Reco-DNN/dataset/'
        }
    }
    

Log in to reply