Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/shayanriyaz/drowsy-detector

Helping people sleep on the road but in a safe way.
https://github.com/shayanriyaz/drowsy-detector

hackathon javascript ml python

Last synced: 10 days ago
JSON representation

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

Awesome Lists containing this project

README

        

#

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!