Skip to content

A Computer Vision and Machine Learning Solution to implement Social Distancing and Mandatory Mask wearing Tracking.

Notifications You must be signed in to change notification settings

raj713335/EYEXA

Repository files navigation

EYEXA

A Computer Vision and Machine Learning Solution to implement Social Distancing and Mandatory Mask wearing to avoid the spread of the Covid 19 virus.

DESCRIPTION

EYEXA is a Combined Computer Vision and Machine Learning Application that recognises a person and checks if he is maintaining social distancing or not , and also checks if he is wearing a mask or not simultaneously.

If any of the two above criteria fails then it alerts a user concerned with a warning sound, so the person violating can take necessary steps to minimize the spread of the virus.

EYEXA performs two primary functions using multi-threading, OpenCV and ML

  1. EYEXA uses the yolov3 model to track a person and then does various internal computations to check all the people in the frame are maintaining proper social distancing norms or not. and display the number of people violating the social distancing norms.

  2. EYEXA uses a custom trained model based on MobileNetV2 to train on images of the person wearing/not_wearing a mask, and predict the person in the camera feed is wearing a mask or not. It also uses a res10_300x300_sad_iter_140000.caffemodel to focus on a person's face during the prediction.


Loading ....


Authors Arnab Das


START SCREEN

MASK DETECTION RESULT


EYEXA

SAMPLE RESULT


EYEXA


EYEXA


EYEXA

WORKING CODE


EYEXA

SAMPLE IMAGES


1.Social Distancing Violation but Mask are on (Left) 2.Social Distancing Violation and Mask are off(Right) 3 and 4. All Ok (Down Left/Right)

Getting Started

  • Clone the repo and cd into the directory
$ git clone https://github.com/raj713335/EYEXA.git
$ cd EYEXA

Download The YOLOV3 Trained Model From the Following link and Save the file inside ./Model Directory

$ url : https://pjreddie.com/media/files/yolov3.weights

Install tensorflow and all the other required libraries

$ pip install tensorflow
$ pip install EasyTkinter
$ pip install opencv-python
$ pip install keras
$ pip install Pillow
$ pip install imutils
$ pip install numpy

List of Python packages taht are being used in the Application

from tkinter import *
from tkinter.ttk import Combobox
import csv
import configparser
import tkinter as tk
from PIL import Image, ImageTk
import cv2
from datetime import date, datetime
import math
from tkinter import messagebox
from threading import Thread
import time
import socket
import tkinter.ttk as ttk
from tkinter import filedialog
import subprocess
from datetime import datetime
from home import display
from tensorflow.keras.applications.mobilenet_v2 import preprocess_input
from tensorflow.keras.preprocessing.image import img_to_array
from tensorflow.keras.models import load_model
from imutils.video import VideoStream
import numpy as np
import imutils
import time
import cv2
import os
import math
from main import mainc
from threading import Thread
from video_recorder import start

To run the Application

$ cd EYEXA
$ python EYEXA.py

CODE STRUCTURE


A Histogram Graph of the mask_detector.model based on mobilenet_v2


TRAINING of Model mask_detector.model Histogram

FUTURE ACTIONS

TO ADD TEMPERATURE DETECTION IN THE EXISTING SYSTEM

🌡️ AiThermometer 🌡️

Code creation in progress for automatically measuring the temperature of people using a thermal camera. The software can be freely used for any creating applications that it is useful for the automatic early-screening of fever symptoms.



Description

The software first detect people with an off-the-shelf body pose detector and then extract location of the face where the temperature is measured. The software requires a known reference temperature and the value and position are provided by the user (this information is shown as a single small green circle on the image). It is possible to have the absolute temperature but you need an image from a thermal camera with correct radiometric calibration and radiometric exif data loaded into image.

Tested hardware

  • FLIR® A600
  • FLIR® A315

About

A Computer Vision and Machine Learning Solution to implement Social Distancing and Mandatory Mask wearing Tracking.

Topics

Resources

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published

Languages