## Inspiration

The inspiration for this project came from learning about the drunk driving epidemic. Specifically, our team was interested in developing a method to screen users of car sharing services for intoxication. The goal was to add more security against drunk drivers from being allowed to operate a motor vehicle, using an accurate and objective method of suitability for driving.

## What it does

This program utilizes computer vision to determine inebriation using the same standardized method that is commonly applied by law enforcement officers in North America - the one leg standing test. This assessment evaluates whether an individual can balance on one leg, without overly swaying or losing balance. Since dizziness and loss of motor coordination are common symptoms of alcohol intoxication, this method has been shown to be effective through multiple clinical and field studies.

The program is deployed as a website, which after a facial authentication step (to ensure the individual performing the one-leg test is the registered user of the app), the test is performed by the user, then the machine learning backend determines the binary classification task of whether the individual is sober or drunk. Thereafter, the car either opens or refuses to start, respectively.

## How I built it

There were two machine learning stages involved: facial recognition for authentication, as well as the computer vision to classify a video recording of a user performing the one leg test.
The frontend used React.js, and the backend was run using a GCP computer engine.

## Challenges I ran into

Like many machine learning projects, there were issues with the dataset, or lack thereof. There was no readily available set of videos showing the one leg test performed by both sober and drunk people, so there was need to find a more creative solution for determining sobriety.

## Accomplishments that I'm proud of

The face verification performs very accurately - it was able to correctly differentiate the faces of different members of our group.

## What I learned

We learned the intricacies (and difficulties) of incorporating AI tools into a website. Deploying the machine learning model on a server, then interpreting that output and sending the results to a frontend requires a very well planned pipeline. Our whole team gained skills in terms of developing an organized pipeline.

## What's next for Tipsy

We plan to extend tools to other tests of sobriety.
## Inspiration

On October 17, 2018 the government of Canada legalized marijuana at the federal level. While this has its benefits, it has one big drawback; increasing the risk of accidents caused by intoxicated/high driving. According to MADD Canada, an estimated 55.4% of road crash deaths were as a result of alcohol and/or drugs with cannabis being the most common drug. While breathalyzers exist to detect drunk drivers, there are currently no accurate roadside tests for detection of cannabis use in drivers. That is why we wanted to develop an application that uses state of the art technology to accurately determine whether an individual is intoxicated or not from cannabis use.

## What it does

Using 3 roadside tests, law enforcement will be able to accurately test for cannabis use in a driver. The three tests include one for common facial expressions associated with cannabis use, such as red eyes and relaxed face muscles, eye pupil dilation changes to light, and a balance test. After the three assessments, D.U.High will give a percentage confidence for whether or not the individual is high or not.

## How we built it

Our team created an Android and iOS mobile application using react-native, which communicates with a NodeJs and Flask API, to get data from custom Azure machine learning models including computer vision and video analytics.

## Challenges we ran into

Training the model to accurately predict the three different tests took quite a while, as the data we used was personally gathered from the internet to insure its quality. Also, hosting the flask REST API proved to be a challenge, as nobody in our team had worked with deployable REST APIs before. For our mobile engineer, it was a challenge to learn all that was needed, as she had attended a hackathon before. This was an incredible learning opportunity for the both of us.

## Accomplishments that we're proud of

We're proud of having created an MVP, from concept to production, in just 24 hours! Both of us set out to create a robust and difficult to make application, so that we could use it as a learning opportunity while solving a critical issue in society. In particular, we're proud of:

* Building a fully functional dual platform mobile application developed using React-Native
* Using several custom Microsoft Azure APIs and Machine Learning Models for facial, video and emotion detection.
* Developing a custom machine learning recommendation engine using custom picked data for categorization .

## What we learned

We learned how to connect mobile applications to custom built REST APIs, to host said REST APIs online, how to get past CORS, and how to train custom vision AI models.

## What's next for D.U.High

We wish to integrated D.U.High in real law enforcement sobriety tests, in order to both improve the machine learning model, and to make sure that the roads are safer from intoxicated drivers. We would also like to develop more tests, including speech analytics and dexterity tests. With more data in our model, we hope to one day make D.U.High an accurate testing tool for law enforcement.
## Inspiration

The inspiration for the project was thinking back to playing contact sports. Sometimes players would receive head injuries and not undergo a proper concussion examination; a concussion could then go undetected - possibly resulting in cognitive issues in the future.

## What it does

The project is a web page that has a concussion diagnosis algorithm and a concussion diagnosis form. The web page can open the camera window - allowing the user to record video of their pupils. This video undergoes analysis by the concussion algorithm. This compares the radii of the patient's pupils over time. With this data, a concussion diagnosis can be provided. After analysis, a concussion form is provided to the patient to further confirm the diagnosis.

## How we built it

We built the project using openCV in python. The web browser was developed using JavaScript in WIX and the communication between the openCV algorithm and the browser is done using flask.

## Challenges we ran into

We ran into a challenge with sending data between flask and our hosted file. The file would refresh before receiving the flask data causing us to be unable to use our calculated concussion variable.

## Accomplishments that we're proud of

We are proud of developing a functional front end and a functional algorithm. We are also proud that we were able to use OpenCV to locate pupils and read their sizes.

## What we learned

We learned how to work with openCV, Wix, flask, and js. Although some of these skills are still very rudimentary, we have a foundation using frameworks and languages we had never used before.

## What's next for ConcussionMD

Next, we will try to improve our flask back end to ensure users can upload their own videos, as right now this functionality is not fully implemented. We will also try to implement an option for users who were found concussed to see hospitals near their location to go to.