Raspberry Pi 3 Model B: $35.99
Samsung Evo Micro SD: $17.99
Keyboard w/ trackpad: $15.95
Traxxas Servo: $26.05
ELP Mini USB Camera: $29.99
Lavalier Mini USB Microphone: $14.99
5000 mAh External Battery: $11.99
Assorted LEDS: $9.99
Tactile Switches: $7.46
3d printer and filament: $??.??
All of these parts except for the raspberry pi 3 can be exchanged with similar parts, the provided links provide either the exact or similar hardware I used.
cd ~
git clone https://github.com/alexanderepstein/neuraLock
cd neuraLock
./env.sh
The script will ask for sudo privileges.
For both image and audio data the folder structure should look like
├── AudioData
│ ├── Subject1
│ │ ├── file1.wav
│ │ ├── file2.wav
│ │ ├── file3.wav
│ ├── Subject2
│ │ ├── file1.wav
│ │ ├── file2.wav
│ ├── Subject3
│ │ ├── file1.wav
│ │ ├── file2.wav
│ │ ├── file3.wav
I used about 8 subjects from the Yale Faces Extended B training set, the larger the number of subjects used the more robust the classifier will be. Also make sure to include pictures of any users you would like to be able to be validated for entering the safe, for better results take pictures with the same camera that will be used for prediction.
I used about 5 subjects from the VoxForge dataset, it is useful to utilize training data with the same sampling rate as your microphone. It is also useful to get training data from the same individual recorded at different times, something like Angus-CJG and Angus-NDD the wav files from both of these archives would go under one folder named Angus in the AudioData root directory. It is helpful to also record empty noise with about 10-20 samples 5 seconds each. This will classify noise with no speaker as this dummy subject. Finally make sure to record audio of any user you would like to be able to be validated for entering the safe, for better results record the audio with the same microphone that will be used for prediction.
The pin layout will be treated as BCM, to see what that looks like visit here
Component | GPIO |
---|---|
Servo | 17 |
Push Button | 18 |
Safe Green LED | 21 |
Safe Orange LED | 20 |
Safe Red LED | 16 |
Face Green LED | 13 |
Face Orange LED | 19 |
Face Red LED | 26 |
Voice Green LED | 5 |
Voice Orange LED | 6 |
Voice Red LED | 12 |
-ad AUDIO_DATASET, --audio_dataset AUDIO_DATASET
path to audio training data
-fd FACE_DATASET, --face_dataset FACE_DATASET
path to face training data
-vm VOICE_MODEL, --voice_model VOICE_MODEL
path to serialized voice model
-fm FACE_MODEL, --face_model FACE_MODEL
path to serialized face model
-lv, --load_voice_model
boolean for loading voice model
-lf, --load_face_model
boolean for loading face model
-u UNLOCK_PHRASE, --unlock_phrase UNLOCK_PHRASE
unlock phrase
-am {both,face,voice}, --authentication_model {both,face,voice}
choose the authentication model
-vu VALID_USERS [VALID_USERS ...], --valid_users VALID_USERS [VALID_USERS ...]
users the safe should open for
A valid execution of the program might look like
./controller.py -ad "AudioData" -fd "ImageData" -vm "voiceModel.bin" -fm "imageEncodings.bin" -lv -am both -vu Alex
# Execute the program, audio data is located in AudioData, image data is contained in "ImageData", the voice model should be read to/written from "voiceModel.bin", the face encodings should be read to/written from "imageEncodings.bin", load the voice model, authenticate using both voice and face, set Alex as a valid user
The STLS are not perfectly designed for the hardware, not enough testing was able to be done before confirm the design. However you can (force) the design to work by drilling and hot glue. You can use the STL's as a reference or starting point for what the safe will look like. Hopefully we will have time in the future to perfect the design.
For any issues please open a new issue in the issue tracker here
MIT License
Copyright (c) 2018 Alex Epstein
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.