Project Info
This project did not submit a demo video on Devpost.
Inspiration
College students are uniquely vulnerable to the dangers of excessive alcohol consumption. Blacking out substantially raises the risk of sexual assault, injury, and legal consequences, especially for younger students. That’s why we’ve created SafeSip, the first low-commitment, easy-to-use app to ensure safe drinking. SafeSip intelligently notifies users if they are likely to black out, based on their movements, giving users the tools they need to stay safe before tragedy strikes.
What it does
By analyzing users’ gait from smartphone accelerometer data, SafeSip provides an accurate estimate of a user’s intoxication level and warns them to stop alcohol consumption before serious consequences begin. Existing solutions require significant user input, such as manually entering every drink. Yet, as users drink more, they become increasingly careless, either forgetting or choosing not to track drinks, rendering these solutions ineffective. With SafeSip, users only have to press a button to indicate that they have started drinking, and our technology takes care of the rest. SafeSip extends existing research in the field, using machine learning methods to infer transdermal alcohol content (TAC) from accelerometer data. This is something entirely novel: while existing literature has suggested the possibility of doing so, SafeSip is the first working implementation. By accurately estimating a user’s TAC, SafeSip is able to preempt and stop excessive alcohol consumption, preventing students from blacking out. Studies show that people are not aware of the amount they consume while drinking, and informing them can prevent blackouts. Further, SafeSip has in-app tools to track historical alcohol consumption and provide safe-drinking education. With SafeSip, users can ensure that they have a safe and enjoyable drinking experience. SafeSip also prioritizes friends-and-family support, spurring conversations that disrupt perceived support for blackout drinking.
How we built it
SafeSip is built with an array of different technologies. The native iOS app itself is built in Swift, collecting and streaming movement data using Apple’s Core Motion framework. Our app is connected to the Firebase backend, which handles authentication and storage. A neural network built with PyTorch and hosted on Google Cloud Compute performs the novel TAC prediction.
Challenges we ran into
Data Wrangling: The dataset we used to train our model was quite unruly. Values were in different formats, timestamps didn’t match up, and data was everywhere. Wrangling and getting everything into a usable format took considerable thought and troubleshooting, requiring us to return to first principles. New to iOS: This was our first time ever building an iOS app. We’re proud to have gone from knowing nothing about Swift to having a working App in 36 hours.
Accomplishments we're proud of
For three of our four members, this was our first-ever hackathon! We’re proud to have made it through. Making something new! SafeSip is something novel. No one has ever done what we’ve done with deploying real-time TAC-level prediction models leveraging ML and accelerometer data. We’re excited to contribute to the literature on this problem. Learning new tech: This was our first time working with Swift, and front-end technologies in native iOS. We’re very happy with how much we learned, and how the end product looks.
What we learned
Swift: We’re new to Swift, and we had a lot of fun learning this new tech. Hackathons: We learned how to navigate and manage hackathons. Production-grade ML: We improved on impractical laboratory techniques to create a practical tool that balances speed and performance.
What's next
More Features: We think there’s a lot more room for new features in SafeSip. A few ideas we had were pass-out detection, which would call an emergency contact once you passed out, using physiological factors to distinguish it from sleep. We also thought of alcoholism alerts, which would alert you if you were drinking too frequently or heavily, based on CDC guidelines. We’re excited by our technology, and think there’s a lot of room for us to make drinking safer. Apple Watch Integration: By integrating with an Apple Watch, we could pull more biometric data, such as heart rate and temperature, allowing us to better estimate TAC, and make more accurate black-out predictions. Broader Integration with Different Wearable Devices: We plan to generalize to other brands of wearable devices leveraging platforms like TerraAPI so that we can provide our services to a broader range of users. CarPlay integration: we could potentially use SafeSip to integrate with CarPlay, ensuring that heavily intoxicated users do not drive. This could be paired with easy access to an Uber/Lyft to ensure user safety.
SafeSip: Alcohol black out warning and blood alcohol detector with deep learning and motion sensors
Excessive alcohol consumption can jeopardize personal safety. SafeSip uses machine learning to warn users when their consumption has reached unsafe levels, based on accelerometer movement data.
View our DevPost here!
Inspiration
College students are uniquely vulnerable to the dangers of excessive alcohol consumption. Blacking out substantially raises the risk of sexual assault, injury, and legal consequences, especially for younger students. That’s why we’ve created SafeSip, the first low-commitment, easy-to-use app to ensure safe drinking. SafeSip intelligently notifies users if they are likely to black out, based on their movements, giving users the tools they need to stay safe before tragedy strikes.
What it does
By analyzing users’ gait from smartphone accelerometer data, SafeSip provides an accurate estimate of a user’s intoxication level and warns them to stop alcohol consumption before serious consequences begin.
Existing solutions require significant user input, such as manually entering every drink. Yet, as users drink more, they become increasingly careless, either forgetting or choosing not to track drinks, rendering these solutions ineffective. With SafeSip, users only have to press a button to indicate that they have started drinking, and our technology takes care of the rest. SafeSip extends existing research in the field, using machine learning methods to infer transdermal alcohol content (TAC) from accelerometer data. This is something entirely novel: while existing literature has suggested the possibility of doing so, SafeSip is the first working implementation.
By accurately estimating a user’s TAC, SafeSip is able to preempt and stop excessive alcohol consumption, preventing students from blacking out. Studies show that people are not aware of the amount they consume while drinking, and informing them can prevent blackouts.
Further, SafeSip has in-app tools to track historical alcohol consumption and provide safe-drinking education. With SafeSip, users can ensure that they have a safe and enjoyable drinking experience. SafeSip also prioritizes friends-and-family support, spurring conversations that disrupt perceived support for blackout drinking.
How we built it
SafeSip is built with an array of different technologies. The native iOS app itself is built in Swift, collecting and streaming movement data using Apple’s Core Motion framework. Our app is connected to the Firebase backend, which handles authentication and storage. A neural network built with PyTorch and hosted on Google Cloud Compute performs the novel TAC prediction.
Challenges we ran into
Data Wrangling: The dataset we used to train our model was quite unruly. Values were in different formats, timestamps didn’t match up, and data was everywhere. Wrangling and getting everything into a usable format took considerable thought and troubleshooting, requiring us to return to first principles.
New to iOS: This was our first time ever building an iOS app. We’re proud to have gone from knowing nothing about Swift to having a working App in 36 hours.
Accomplishments that we're proud of
For three of our four members, this was our first-ever hackathon! We’re proud to have made it through.
Making something new! SafeSip is something novel. No one has ever done what we’ve done with deploying real-time TAC-level prediction models leveraging ML and accelerometer data. We’re excited to contribute to the literature on this problem.
Learning new tech: This was our first time working with Swift, and front-end technologies in native iOS. We’re very happy with how much we learned, and how the end product looks.
What we learned
Swift: We’re new to Swift, and we had a lot of fun learning this new tech.
Hackathons: We learned how to navigate and manage hackathons.
Production-grade ML: We improved on impractical laboratory techniques to create a practical tool that balances speed and performance.
What's next for SafeSip
More Features: We think there’s a lot more room for new features in SafeSip. A few ideas we had were pass-out detection, which would call an emergency contact once you passed out, using physiological factors to distinguish it from sleep. We also thought of alcoholism alerts, which would alert you if you were drinking too frequently or heavily, based on CDC guidelines. We’re excited by our technology, and think there’s a lot of room for us to make drinking safer.
Apple Watch Integration: By integrating with an Apple Watch, we could pull more biometric data, such as heart rate and temperature, allowing us to better estimate TAC, and make more accurate black-out predictions.
Broader Integration with Different Wearable Devices: We plan to generalize to other brands of wearable devices leveraging platforms like TerraAPI so that we can provide our services to a broader range of users.
CarPlay integration: we could potentially use SafeSip to integrate with CarPlay, ensuring that heavily intoxicated users do not drive. This could be paired with easy access to an Uber/Lyft to ensure user safety.
Analysis
View
Metric
- 12
- 4
Figures cover GitHub contributors during the hackathon window. A co-authored commit counts in full for each author, so per-member totals add up to more than the whole-team figures.
Technology
- CIn code
- SwiftIn code
- DockerClaimed
- FirebaseClaimed
- PythonClaimed
- PyTorchClaimed
2 of 6 appear in the indexed code. 4 claimed on Devpost could not be matched to code, which may simply mean the tool leaves no trace in the repository.
AI coding agents
No AI coding agent signals were found in this repository.
Detected from committed agent config files and commit authorship. Absence of a signal is not proof an agent was unused.
Codebase size
Source size
558 KB
Source files
154
Counts recognized source files only; vendored directories, binaries and lockfiles are excluded, so this is smaller than the repository on disk.
Repository
aakritil/SafeSip
280 files · 7.7 MB · @ 332c3fe
Structure
Interface
62 files · 22%Screens, components and styles rendered to the user.
Application logic
107 files · 38%Domain rules, services and shared utilities.
+1 moreBackground jobs
10 files · 4%Work run outside a request: tasks, workers and schedules.
Data & schema
23 files · 8%Schema definitions, migrations and data access.
Supporting
Layers are inferred from where files sit in the tree, not from reading the code. A project that names its directories unconventionally will read oddly here — open the file browser to check anything the diagram implies.
Languages
- Swift93%
- YAML4%
- Markdown1%
- C1%
Share of indexed source by file size. Binary and vendored files are excluded.
This project’s features have not been analysed yet.
Export this project's context (description, README, evidence, key source files) to chat with an AI agent elsewhere.