Skip to content

ShayanRiyaz/Drowsy-Detector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Drowsy Detector

ShellHacks Competition

How to run for now:

  1. If dependencies haven't been installed run: pip install -r requirements.txt

  2. run python VideoStreaming/main.py

Functions

Step 1

get_frame() ''' Uses camera to track the users eyes, in case user has eyes closed for more than 15 frames, send Alert. '''

Step 2

def simulated_user_path(start_address, end_address):
    points = get_points_along_path(API_KEY,start_address,end_address)

    times,coords = [],[]
    for time,geo in points.items():
        times.append(times)
        coords.append(geo)
    
    return times,coords

Creates a simulated user path from start_address to ```end_address``. This path also includes the latitude and longitude generated by the external algorithm.

Step 3

find_places(journey_coords_1,journey_coords_2) Gets the users current-coodinates and When Drowsey alert is recieved finds the closest gas_station

Step 4

updateGraphData() :Function in /VideoStreaming/static/scripts/script.js Updates the Drowsy instance vs time graph.

Thank you!

About

Helping people sleep on the road but in a safe way.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •