This paper presents how the Neural Compute Stick 2 processor is used in conjunction with a Raspberry Pi 3 B+ board for controlling an electromagnetic lock using deep learning techniques to generate an access control system with embedded facial recognition capabilities. The system is based on object detection and facial recognition code developed in Python programming language. Through a webcam, it obtains images in real-time to make a comparison with the faces stored in a database. For prototype implementation, an embedded platform (Raspberry Pi) was used to provide the base operating system for programming and provide an analog signal in response to the system. A proof of concept experimentation was carried out with 15 subjects to test the effectiveness of the proposed method, achieving an average accuracy of 88.75%.