Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/shayanriyaz/drowsy-detector
- Owner: ShayanRiyaz
- Created: 2020-09-26T07:14:42.000Z (over 4 years ago)
- Default Branch: new-master
- Last Pushed: 2020-09-27T15:38:33.000Z (over 4 years ago)
- Last Synced: 2024-12-17T12:33:47.190Z (2 months ago)
- Topics: hackathon, javascript, ml, python
- Language: Python
- Homepage:
- Size: 68.4 MB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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!