Smart Attendance Monitoring Technology for Industry 4.0

Keeping track of employee attendance in academic settings can be a di ﬃ cult task. It frequently wastes a signi ﬁ cant percentage of the category ’ s productive time when done manually. In this study, the OpenCV open-source image processing library presents an e ﬀ ective Raspberry Pi-based methodology that reduces product cost and aids in connecting to heterogeneous devices for attendance. When teaching and testing and collecting employee photos and taking attendance, the system delivers a user-friendly interface that maximizes the user experience. Face detection and recognition are done with LBP histograms, and the database is updated with SQLite (a lightweight version of SQL for the Raspberry Pi) rather than MySQL.


Introduction
There is a fully manual attendance system. It takes instructors and children a considerable amount of time. There is still the opportunity of proxies inside the category when attendance is taken manually. Manual attendance costs are always a human mistake. The most significant evidence is the face of every human being. This will enhance the production of the category by automating the attendance routine. To make the Raspberry Pi 3 available on all platforms, we employed face recognition. A camera is supposed to be in the Raspberry Pi module. Identification of face differentiates faces from nonfaces and expressions recognizable by other persons.
Facing recognition is separated into two steps: firstly, faces are detected; secondly, facial pictures are compared to the existing database. Various methods of facial detection and identification have been presented. Face recognition either uses a visual approach based on features that identifies geometrical characteristics such as the eyes, nose, eyes, and cheeks. Face recognition is a technological technique that can distinguish human facets according to the definition in digital photos. Face detection algorithms make it possible to recognize the facial expressions of human faces.
The first and most significant phase in the process of face recognition is facial detection. Face recognition is understood to be the process of detection or evaluation of a personal image from a digital or video frame. Over many years, face recognition has also been studied. Face recognition has been possible in the previous several decades due to technology progress. OpenCV is often used to create face recognition algorithms. This system is made up of a Raspberry Pi.
This article shows how Raspberry Pi can be used in real time to detect and recognize face. This project outlines an efficient solution using the OpenCV image processing package. The facial database is designed to identify the faces of the employees. This project is often used in a number of different applications, which rely on authenticating facial recognition. A camera is supposed to be in the Raspberry Pi module. Face recognition differentiates between faces and other detectable expressions of individuals. This approach may also be used to quickly monitor a certain employee in a major company [1,2].
Automatic facial recognition algorithms are supposed to recognize a particular person with full facial pictures. The aim of the facial detection is the positioning of frontal human appearances. Extraction is a technique where the distinctive face highlight is located and concentrated. In this effort, a photograph taken by the Raspberry Pi camera begins recognizing the face. With a storage capacity of 2,4 MB and a total memory space of 16 GB, the Raspberry Pi CPU records the image. This is why it is important to compress photographs from Raspberry Pi. The Raspberry Pi (RPi) was utilized for the first time in school for employees with no understanding of software programming or embedded systems as an easy do-it-yourself (DIY) platform [3,4].
The system that contains a Raspberry Pi Zero, a Raspberry Pi camera module, a capacitive sensor for touch, and an OLED display will be discussed in this article. The Haar cascade classifier is used to identify your face in a shot, followed by the local binary pattern histogram to identify your face (LBPH). The LBPH approach is utilized by OpenCV. The sensor is utilized to give the camera module with input, which makes it take an image. The Haar cascade classifier is used to recognize the hairs if there are faces in the image. The Local Binary Patten Histogram (LBPH) approach is used to identify the face of the system's face database. OpenCV is a common programming language for algorithms for face recognition [5,6].
This method benefits from the advantages afforded by other libraries such as OpenCV and NumPy. As the backbone of the memory, the SQLite database system is employed. This technique is worth using in every software to enhance automation and usability thanks to its faster and more authentic performance. The methodology for image recognition may normally be used with free source Python modules OpenCV and NumPy. SQLite maintains critical information for the most important persons. The system is frequently best characterized in three components for its whole functioning process. The camera essentially states that the sample requires 20 photos [7,8].
The authors of [6] proposed an attendance system based on fingerprints. A portable fingerprint device has been developed that may be circulated among students to allow them to lay their finger on the sensor during lecture time without the instructor's intervention. This technology ensures that attendance is recorded in an error-free manner. The issue with this strategy is that passing the device during lecture time may cause students to lose focus. In the literature, there are several works linked to RFID-based attendance systems. [9] proposes an RFID-based system in which students carry an RFID tag type ID card that they must place on a card reader to register their attendance. The system is connected to the computer through RS232, and the recorded attendance is saved from the database. This system may lead to an issue with unauthorized access. Unauthorized individuals may gain access to the organization by using an authorized ID card. Another biometric that can be employed in attendance systems is the iris. The authors of [10] suggested an iris recognition system based on Daugman's method. This system makes use of an iris recognition management system that captures, extracts, stores, and matches iris recognition images. However, laying transmission lines in areas with poor topography is problematic. The authors of [11] proposed a system based on real-time facial recognition that is reliable, secure, and quick, although it still has to be improved in varied lighting circumstances.
Many organizations, enterprises, and institutions use [12] RFID technologies, [12] biometric fingerprint methods, and [13] registers to take periodic attendance. The calculation time for these approaches is usually longer. RFID (Radio Frequency Identification) [14] is a method of automatically identifying and tracking tags affixed to people using electromagnetic fields. RFID has the potential to invade people's privacy and security. RFID tactics eventually lead to software that allows the primary database to analyze each individual. Hackers can readily compromise this environment. When the RFID reader and receiver are not correctly matched, the read rate is reduced. The fingerprint is used as a unique identity in biometric fingerprint identification systems [12]. It is one of the most precise systems in use today. However, distinguishing an individual fingerprint from a collection of enrolled fingerprints is a challenging task. The fingerprint system keeps no record of the original fingerprint. Many algorithms [13] show that a fingerprint can be recreated with minute templates, proving this to be untrue. Iris recognition [15] is a sort of implementation in which people's iris is scanned, saved, and then retrieved for comparison, and attendance is maintained automatically in the server. However, because capturing the iris of students or staff is challenging, quick implementation of face recognition [15] with reduced illumination impact can be used.
By using complete facial photos, automatic face recognition algorithms hope to distinguish a specific individual. The way these facial recognition processes are carried out is influenced by a variety of factors, including changes in posture, appearance, and lighting. However, the large variety in the facial image diminishes one's likeness and increases the similarity between personalities, making the face representation phase one of the most difficult aspects of face recognition [16,17]. Face representation approaches vary, but they all aim to find the most effective and efficient features to improve face recognition performance [18,19]. It is not an easy process, but it is a simple errand for image preparation applications since there are a few criteria that must be specified absolutely before recognition [20].
We discuss other relevant works that were created to recognize faces and takedown attendance and the benefits and drawbacks of each method. The first method, auto attendance with facial recognition [21], requires the administrator to choose a camera to record, gather, and save photos to a database or folder. After the data gathering and storage process is complete, the training set manager uses face detection to extract faces from the image. The instructor selects the course ID and class ID [18]. The second system is a face detection attendance system [22], which was designed to provide a secure and straightforward method of tracking attendance. The software programme takes a photo of each of the permitted individuals and stores the information in the system's database. The technology then saves images by mapping them into a face match structure. The system will recognize the registered person and record their presence and arrival time [22]. We discovered that both systems benefited from storing faces and automatically marking 2 Journal of Nanomaterials attendance, multiple face detection, and maximizing the number of recovered faces from an image after comparing the two systems. However, the system's accuracy is not perfect; data processing is a little slow, face detection is limited, and live video cannot be replayed to distinguish missed faces.
According to the study, the system is represented by a Mi fare 1K contactless smart card that should be tapped on an NFC card reader. It will initialize the Raspberry Pi and the NFC card reader and will exchange the data. These details will be used to investigate the student and sent to the server for attendance verification and will employ two software programmes in this scenario. One is for card administration, while the other is for the reader.
The authors of [23] suggest a way of creating a comprehensive embedded class attendance system that includes facial recognition and door access management. Raspberry Pi and Raspberry Pi camera are used to power the system. By facing the camera, the image is captured and sent to the Raspberry Pi, which is programmed to handle facial recognition using the LBP algorithm. The prototype door will open using a servo motor if the student's input image matches the trained dataset image, and it will save the attendance results in the MySQL database.
The technique created in is based on the concept of face recognition for a small group of students. Every student in the class is identified and authenticated by the system. This approach allows for the attendance of a group of pupils to be completed in less time. The design was aimed at automating the old way of taking attendance on registers and integrating it with the cloud.

Problem Statement and Objective
2.1. Problem Statement. The employee's attendance is taken manually using an attendance sheet, which can be a timeconsuming process. Furthermore, determining whether authenticated pupils are physically answering or not in a large classroom environment with spread branches is quite challenging. The teacher normally checks it at the beginning and end of sophistication, but it is possible that an educator will miss someone, or that some employees will answer many times. Face recognition-based attendance systems may provide a problem in identifying faces in connection with high-definition monitor video and other information technologies for attendance. In a number of practical applications, such as criminal identification, safety systems, and biometric identification, face detection and reconnaissance computers may also be utilized. Two phases are typically included in the facial recognition system.
(i) Face recognition compares the detected and processed face to the known face database to establish who the individual is (ii) The project's goal is to design and develop a system that is less sensitive to illumination, rotates invariantly, scales invariantly, and used in real-world applications 2.2. Objectives. The aim of this project is to construct an automated employee attendance system based on facial recognition. The following are intended to achieve the objectives: (i) Detect a portion of the face in a video frame (ii) Keep track of identified employee's attendance (iii) Reduces human mistakes by creating an automated and reliable attendance system (iv) By blocking employee from exposing themselves or their friends while they are not present, to improve privacy and security (v) Create monthly professor reports (vi) Provides flexibility 3. Architecture Figure 1 displays the system architecture. The camera module captures video from which human face images are derived. Then, using OpenCV's library files, face recognition is performed, which automatically compares to the existing database. The Raspberry Pi is the utilized microprocessor and the fact that in Python we programmed [25]. Python opensource libraries like as OpenCV and NumPy are often used to process methods for image recognition [23,26]. SQLite stores the data from the designated persons. The complete operation of the system is often best described in three parts. The following are: The Python code is used to keep track of an identified information of a person. In essence, the camera is instructed to take 20 sample pictures. Users must also supply their names, age, gender, and department with personal information. This data is stored in a SQLite database along with 20 example photographs, if the information of a person is similar to that of someone else, the example photos of a person will be modified.
Section on trainers: this section mostly focuses on getting the system ready to recognize certain people. Grayscale conversion is performed on a person's sample images. Color is not required for this strategy. Furthermore, information regarding a picture's hue can obscure important edges. As a result, in today's society, color in an image is generally seen as noise. As a result, the grey scaling process is finished. As a result, gray scaling enhances the image processing method's efficiency and performance [11]. The 3D pixel values in an RGB image are converted to 1D values when it is converted to grayscale.
In the detecting section, the CPU receives images of the camera in real time. The video is placed as a twodimensional matrix in the microprocessor Python code. NumPy is a Python open-source tool that makes multidimensional matrices easier to deal with. The section of the picture including the face is removed and saved in a matrix so that the background effect in picture processing is reduced. Afterwards, the matrix is modified to discover if 3 Journal of Nanomaterials one of them matches the example images. The SQLite management system provides the additional information.
3.1. Raspberry Pi 3. Raspberry Pi is a computer of credit card size that connects to a computer display or a TV and utilizes a conventional mouse and keyboard. It is a little and able gadget that lets individuals in languages like Scratch and Python to learn computer programming at all levels.

Web Camera.
A camera is a device that records or captures images for storage, transmission, or both. Individual still shots or picture sequences from videos or movies could also be utilized. The camera could be a remote sensing device because it detects subjects without making physical touch.

Power Supply.
A crucial necessity for the project's completion could be power. For both the bottom unit and the recharge unit, the main line delivers the necessary DC power. This is achieved by tapping a 12 V-012 V transformer's secondary tapped centre. We received a 5 V power supply from this transformer.

OpenCV.
OpenCV is a library that focuses on computer vision in real time. We employ an image processing module with functions such as linear and nonlinear imaging and geometrical image change. It is modular and suggests a series of shared or static libraries in the package (resize, affine and perspective warping, and general table-based remapping) [21,26].

DLIB.
The Dlib method is used to identify the face and position the facial points of the provided picture [21]. Our aim is to apply shape prediction algorithms in order to detect important facial characteristics on the face: The Viola-Jones technique is used for the detection of faces in the first step. (2) Integral Image. The pixel (x, y) value in an integrated picture is the sum of the above and the left pixels (x,y).
(i) AdaBoost is a feature that is used to get rid of extraneous features. As previously stated, a detector with a 24 × 24 base resolution requires the calculation of 160,000+ feature values (ii) However, only a small number of features are thought to be useful in detecting faces (iii) AdaBoost might be a method of machine learning to locate among 160,000+ attributes just the most basic characteristics. A weighted blend of these features is used to analyze and to decide if a window has a face, after the identification of these properties (iv) These features are referred to as weak classifiers. AdaBoost builds a classifier (4) Cascading.
(i) The primary concept for the detection of viola jones is to scan the detector numerous times through the corresponding picture with a replacement size. While one or more faces of an image are present, it is evident that an important part of the subwindows studied is negative. The algorithm should therefore immediately examine the rejection of nonfaces and devote more time on prospective candidates  Journal of Nanomaterials (iii) As a result, a cascade classifier is deployed, with a robust classifier at each stage. As a result, all of the qualities have been divided into stages, each with its own set of attributes Face markers occur in many forms and dimensions, but always strive to find the following facial areas and categories them. The procedure begins with the following: To start, the training series uses a set of marked facial sights on an image. These pictures have been carefully labelled and supplied with the (x,y) coordinates of each face structure surrounding the region.
The result is a side marker detector, which can identify facial markers in real time and generated reliable forecasts. Priors, or the chance of an input pair of pixels being spacesaved.

SVM Classifier
Algorithm. The support vector machine or SVM is among the most often utilized supervised training techniques to difficulties of classification and regression. However, it is mostly employed to overcome classification issues in machine learning.
The SVM approach is designed to determine the simplest line or decision limit which divides n-dimensional space into classes so that further data may simply in future be added to the right category. A hyperplane is the best choice.
SVM is used to choose the hyperplane'ing sharp points/ vectors. The algorithm is known as a support vector machine, with the extreme instances of support vectors. Consider the chart below, which shows how a decision boundary or hyperplane is used to classify two groups.
Mainly, there are two types of SVM: Linear SVM: to show how the SVM algorithm works, an example is usually used. Suppose we have a two tag (green and blue) dataset that shows it has two different characteristics (x1 and x2). To identify if the coordinates (x1,x2) are green or blue, we need a classifier. Consider the example below.
Thus, the SVM approach helps to determine the simplest line or decision boundary, known as a hyperplane as an optimal border or region. The SVM method identifies the intersection of lines between the two classes. These locations are known as vectors of support. The margin is the region between the vectors, and hence, the hyperplanes and were aimed at maximizing the SVM. The most advanced is the ideal hyperplane.
In Figure 2, the SVM method aids in the discovery of the best line or decision boundary, which is known as a hyperplane. The SVM method locates the intersection of the lines from both classes. Support vectors are the names for these points. The margin is the distance between the vectors and the hyperplane. SVM's purpose is to maximize this margin. The ideal hyperplane is the one with the highest margin.
Nonlinear SVM: we can use a straight line to segregate data that is linearly structured, but we cannot draw a single straight line for nonlinear data. Consider the following example: We will need to add another dimension to distinguish these datasets. For linear data, we have utilized two dimensions, x and y; therefore, add a third dimension for nonlinear data, z. You may use the following formula to calculate it: z = x 2 + y 2 .
In Figure 3, SVMs' parameters will be chosen using a 10fold cross-validation search technique that includes a heuristic line search to find a suitable parameter region, followed by a grid search. The dataset is significantly down sampled for the parameter search phase to speed up the processing.
SVM is an excellent image classification algorithm. Figures 2 and 3 show the examples of SVM classifiers that are used to categorize the datasets and how decision boundaries will be determined. SVM classifies data according to the plane with the highest margin. The decision border of the SVM is straight. After only three to four rounds of relevant feedback, SVMs provide much higher search accuracy than standard query refinement systems, according to experimental results. This is also true for image segmentation systems, including those that use a privileged method and a modified version of SVM.

Methodology Used
In situations, such as institutions and offices, the recommended approach is utilized to take attendance using facial recognition and to manage attendance. The Raspberry Pi camera module V2 is connected to a Raspberry Pi 3 and is installed at the company's entrance. The camera module records video that is used to create human face pictures. Face recognition is then conducted using OpenCV library files, which compares to the current database automatically. Face recognition is often more advanced and prosperous than other approaches. The microprocessor used is the Raspberry Pi. We also programmed in Python. OpenCV and NumPy, both Python open-source libraries, are frequently used to process image recognition methods. The data from the specified individuals is stored in SQLite.
A person's identifying information is tracked using Python programming. The camera is basically told to take 20 test shots. In addition to personal information, users must provide their names, ages, genders, and departments. This information, along with 20 photos, is kept in an SQLite database. The example images of a person will be adjusted if their data is identical to that of another individual. Our system can react to minute changes in a person's facial pattern thanks to this feature.
Trainer Section: this section is mainly concerned with preparing the system to recognize specific individuals. On a person's sample photos, grayscale conversion is done. This approach does not require color. Furthermore, information about the color of a photograph can conceal essential edges. As a result, color in an image is commonly perceived as noise in today's society. The grey scaling is now complete. Gray scaling thereby improves the efficiency and performance of the image processing approach. When an RGB image is converted to grayscale, the three-dimensional pixel values are changed to one-dimensional values. As a result, we will be able to influence fewer people.
The CPU receives images from the camera in real-time during the detecting part. In microprocessor Python code, the video is represented as a two-dimensional matrix.
NumPy is an open-source Python utility that simplifies the handling of multidimensional matrices. In order to eliminate the backdrop effect in picture processing, the picture section containing the face is deleted and saved in a matrix. The matrix is then tweaked to see if any of the entries match the example photos. If a match is found, a green square mark traces the person's recognized face on the critical time display panel. The SQLite management system provides additional information.
We proposed the Viola-Jones algorithm, which incorporates face identification features because traditional approaches are time intensive. Faces facing sideways, above, or downwards are more challenging to notice. The image will be transformed to grayscale before being used to recognize a face since it is easier to work with and there is less data to process. The Viola-Jones algorithm discovers the location on the colored image after first detecting the face on the grayscale image.
Images can identify using Dlib software. Dlib library will help us to find facial landmarks; then, it will be encrypted.
Images will be compared with the stored database by considering similar and dissimilar images.
Finding the person's name from the database with the resultant image processed after encoding.
The following are the steps involved.
Step 1. Using Dlib, find the faces in the supplied photos.
The Dlib technique is used to locate the facial points in the provided image and identify the face.
Our goal is to use shape prediction algorithms to identify essential facial features on the face. 6 Journal of Nanomaterials As a result, recognizing face landmarks occurs in two stages: (1) Determine the position of the picture's face in the first step (2) Determine the basic facial structure of the ROI The Viola-Jones approach is utilized to detect faces in the first step.
Step 2. Use the Dlib library to locate facial features.
Essential facial structures will be discovered within the face region when the face region has been established.
Face markers come in various shapes and sizes, but always try to locate and categorize the following facial parts: mouth, right eyebrow, left eyebrow, right eye, left eye, nose, and jaw.
The procedure starts with these steps: (i) To begin, the training series employs an image with designated facial sights Each face structure surrounding the region has been meticulously labeled and supplied with the (x,y) coordinates.
(ii) The result is a side marker detector that can recognize facial markers in real-time and give accurate predictions (iii) Priors, or the possibility of a space-saving input pair of pixels Step 3. Encoding photos of faces.
Step 4. Obtaining the person's name from the database and encoding the resulting image. Figure 4 shows how the images 2 and 3 match closer, and image 1 measurements are further away. The results will be compared, and the person will be identified.

Applications
(i) This project is commonly used to enforce employee attendance as shown in Figure 5 in a range of industries, including software companies, production companies, and a variety of others (ii) It is often used to take scholars' attendance at colleges, various educational establishments, and university campuses. In educational institutions, rollcall muster is used when teachers take attendance and record it manually on paper (iii) It is commonly used to track employee and worker attendance in stores and shopping malls Since the whole operation will be performed by a computer, the whole registration process and calculation will be automated and will be done by the system itself.

Increased Security.
A face recognition-based attendance system will not only calculate attendance but it will also keep track of tourist arrival and departure times.
7.1.4. Time Saving. It will be a problem if you employ a manual attendance system. Not only will a face recognitionbased attendance system allow you to record an individual's attendance.
7.1.5. Easy to Manage. Because the synthetic intelligencebased attendance system is completely automated, it will be much easier to keep track of daily activities and manage.

Disadvantages.
In conventional method, the attendance is marked manually by roll calls or signatures. So, the demerits of the conventional attendance maintenance process are keeping track of students' or employee attendance can be a tedious task, which often results in wastes a substantial proportion of the productive time in marking, maintaining, and managing the attendance. The attendance is maintained manually, and all other processing is also done manually which is time consuming.   Journal of Nanomaterials 7.2.1. Data Privacy Breach. Data on these systems equates to billions of images and, who knows, thousands of hours of video footage stored on a hard disc.

Low Reliability.
There are times when a person's identification is not ready for verification. There are also times when a third party verifies a person's identity. This means that someone who is "X" is stabilizing as "Y" instead of "X." Criminals will seize the opportunity to conduct crimes in the name of the people.

Lack of Regulations within the AI in Face Recognition
Systems. We can already see how frequently an AI-based attendance system is exploited. Governments around the world lack a specific policy or set of legislation to control the use of touchless biometric attendance systems, in addition to all or any of these. Because of the potential threat this technique poses to individuals, it has already been outlawed in some cities and nations around the world.
With these considerations in mind, the benefits of an AIbased attendance system are numerous, as are the disadvantages. We will see, however, that if all the procedures are regulated and followed, this technique will be far more effective.
When establishing and stabilizing a touchless biometric attendance system, certain rules and regulations must be observed.
Second, rather than concentrating on other components of this methodology, firms or organizations should place a higher priority on knowledge security.
Third, to get closer to the ideal system that we want, the facial recognition-based attendance system should be employed more frequently each day.
In [21], the results conclude that the primary concern is that attendance is not automated. Since it is physically maintained, it is more prone to hacking or misusing other physical attacks. There is no increase in the feedback comments.

Conclusion
The suggested method entails developing a face recognitionbased automated attendance system to distinguish persons based on the captured video frame. The preprocessing stage also improves image contrast and lowers light influence. The LBP and hair cascade algorithms are used to extract characteristics from a facial image. The suggested strategy is 100 percent correct for high-quality data based on the result obtained.

Data Availability
The data used to support the findings of this study are included within the article.

Disclosure
The publication of this research work is only for the academic purpose of Debre Berhan University, Debre Berhan, Ethiopia.