First download the Model file from https://drive.google.com/drive/folders/1GhwU6zTvBdgX-86NIx8Aph9Txi61-1iG?usp=sharing then download the zip file from Github and keep the model folder in the same place as the watchman folder then Run the program "python run watchman.py"
to exit from the program press q
The model we used is built with Keras using Convolutional Neural Networks (CNN). A convolutional neural network is a special type of deep neural network which performs extremely well for image classification purposes. A CNN basically consists of an input layer, an output layer and a hidden layer which can have multiple layers. A convolution operation is performed on these layers using a filter that performs 2D matrix multiplication on the layer and filter.
The CNN model architecture consists of the following layers:
Convolutional layer; 32 nodes, kernel size 3
Convolutional layer; 32 nodes, kernel size 3
Convolutional layer; 64 nodes, kernel size 3
Fully connected layer; 128 nodes
The final layer is also a fully connected layer with 2 nodes. A Relu activation function is used in all the layers except the output layer in which we used Softmax.
The requirement for this Python project is a webcam through which we will capture images. You need to have Python (3.7 version or higher recommended) installed on your system, then using pip, you can install the necessary packages.
OpenCV – pip install opencv-python (face and eye detection).
TensorFlow – pip install tensorflow (keras uses TensorFlow as backend).
Keras – pip install keras (to build our classification model).
Pygame – pip install pygame (to play alarm sound).