The project presents a system of employee authorization, which can be used in a factory or any industrial plant. This solution allows access to individual machines, rooms or devices that it can be individually tailored to each employee. The design consists of a dummy door opened with an electric lock. System has three types of security:
- PIN code
- RFID card reader
- System face recognition
A person who wants to get into a room with a specific device must be authorized by the selected security. At the moment of successful verification, the doors are opened.
The system is controlled by a mobile application. Thanks to app it is possible to change the PIN and security code of the given machine and to add a new employee.
The TensorFlow library was used to implement the neural network. All architecture network was built from scratch. In order to save many days of training pre-trained weights were imported into the created model. The network architecture has been built on the basis of the VGG-Face network. The One Shot Learning method was used to recognize the face. Before the image is fed into the network, the image pre-processing is used. In the first step to avoid background interference, the influence of hair and other factors we cut the face itself, then the picture is scaled to 224x224. After these activities the image is ready for classification.
The easiest way is to install the file my_app.apk.
If you want to change something in the code, you have to build the application again. The buildozer tool is used for this. Instruction on how to use the buildozer tool is available at this link Buildozer.
When building the application, replace the generated buildozer.spec file with the one from this repository. If you don't do this, the application will not work correctly.
To build the application use the Cython version == 0.25.2. It may not work with newer versions.
- First, download weights and face landmarks for neural network and put them into utils_folder:
-
Then, turn on Arduino and upload the rfid.ino to it.
-
Next, run server.py on PC. The console displays the address where the server listens for connections.
-
At the end, change the IP address in client_cam.py and client_door.py to the server address and run programs on two Raspberry Pi.
In mobile appplication after pressing the WI-Fi logo, you connect to the server that is on the PC. After the correct connection, the tick icon will appear. In the main menu there is a possibility to choose 4 keys (3 machines and adding a new employee). After selecting a particular machine, you can change the security. It is possible to add a new employee by entering his name and taking a face photo.
- Kivy - Library for development of applications
- Kivy-Garden - Project to centralize addons for Kivy maintained by users
- PyGame - Library for making multimedia applications like games built on top of the SDL library
- Pillow - Imaging Library
- Plyer - Library for accessing features of your hardware / platforms
- Pyjnius - Library for accessing Java classes
- Cython - Optimising static compiler for both the Python programming language and the extended Cython programming language
- OpenCV - Open source computer vision and machine learning software library
- RPi.GPIO - Package provides a class to control the GPIO on a Raspberry Pi
- RPLCD - Package to control LCDs
- PyBluez - Bluetooth Python extension module
- TensorFlow - Deep learning framework (version 1.12)
- Pillow - Imaging Library
- netifaces - Library to get the address(es) of the machine’s network interfaces from Python
- Numpy - Package for scientific computing
- HDF5 - Pythonic interface to the HDF5 binary data format
- dlib - A toolkit for making real world machine learning and data analysis applications
- SoftwareSerial - Library to allow serial communication on other digital pins of the Arduino
- MFRC522 - Arduino library for MFRC522 and other RFID RC522 based modules
- Przemysław Kanach - Przemysław Kanach