nischi / MMM-Face-Reco-DNN

Face recognition with opencv and deep neural network
MIT License
91 stars 46 forks source link

“extendDataset: false” has no effect #17

Closed SdeGeata closed 4 years ago

SdeGeata commented 4 years ago

I have “extendDataset” set to false in my config, but new pictures continue to be added anyway. I now have close to a hundred in my own folder.

HorstBaerbel commented 4 years ago

I don't notice that behavior on my machine...

SdeGeata commented 4 years ago

Really? I can’t be the only one. I keep having to dig into the folder and delete the ones that are added... hmmm, i should just set up a cron job to dump ‘em i guess.

HorstBaerbel commented 4 years ago

Are your sure it's "extendDataset: false," not "extendDataset: 'false'," something like that? Maybe posting your config will help. I copy-pasted mine straight from the README. Try that and work from there. Also be aware of ending differences between Linux / Windows so use a proper editor.

SdeGeata commented 4 years ago

Hello again Horst;

Definitely certain that its not a typo, as you can see - mine too is copied straight from the readme. Also not a windows issue, I'm driving a mac. Here's that config...

{ module: 'MMM-Face-Reco-DNN', config: { // Logout 10 seconds after user is not detected anymore, if they are detected between this 15 Seconds, they delay will start again logoutDelay: 15000, // How many time the recognition starts, with a RasPi 3+ it would be good every 2 seconds checkInterval: 2000, // Module set used for strangers and if no user is detected defaultClass: 'default', // Set of modules which should be shown for every user everyoneClass: 'everyone', // XML to recognize with haarcascae 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', // You wanna use pi camera or usb / builtin (1 = raspi camera, 0 = other camera) usePiCamera: 1, // Method of face detection (dnn = deep neural network, haar = haarcascade) method: 'haar', // 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 (if available). detectionMethod: 'hog', // How fast in ms should the modules hide and show (face effect) animationSpeed: 1000, // Path to Python to run the face recognition (null / '' means default path) pythonPath: null, // Should shown welcome message over alert module from MagicMirror welcomeMessage: true, // Save some pictures from 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 extenDataset is set, you need to set the full path of the dataset dataset: 'modules/MMM-Face-Reco-DNN/dataset/' } },

SdeGeata commented 4 years ago

Woah, it doesn't look all crappy like that normally. Lemme try again...

{ module: 'MMM-Face-Reco-DNN', config: { // Logout 10 seconds after user is not detected anymore, if they are detected between this 15 Seconds, they delay will start again logoutDelay: 15000, // How many time the recognition starts, with a RasPi 3+ it would be good every 2 seconds checkInterval: 2000, // Module set used for strangers and if no user is detected defaultClass: 'default', // Set of modules which should be shown for every user everyoneClass: 'everyone', // XML to recognize with haarcascae 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', // You wanna use pi camera or usb / builtin (1 = raspi camera, 0 = other camera) usePiCamera: 1, // Method of face detection (dnn = deep neural network, haar = haarcascade) method: 'haar', // 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 (if available). detectionMethod: 'hog', // How fast in ms should the modules hide and show (face effect) animationSpeed: 1000, // Path to Python to run the face recognition (null / '' means default path) pythonPath: null, // Should shown welcome message over alert module from MagicMirror welcomeMessage: true, // Save some pictures from 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 extenDataset is set, you need to set the full path of the dataset dataset: 'modules/MMM-Face-Reco-DNN/dataset/' } },

SdeGeata commented 4 years ago

Well thats more legible!

Here's a screen grab of the datasets from the last couple days (since last I emptied them)... for any sceptics. ;-p

Screen Shot 2020-01-26 at 3 43 33 PM

HorstBaerbel commented 4 years ago

You were right. It happens for me too. Try my fix.

SdeGeata commented 4 years ago

Pardon my newbie question... how do I implement that? git pull... and to where?

nischi commented 4 years ago

it is on my master now, you can use git pull

SdeGeata commented 4 years ago

Ah, thanks Thierry! ...and thanks Horst for solving that lingering problem for me! You guys are awesome!