Project Info
Inspiration
I've attended police academies at both my last university, Duke, and at Stanford. Last Wednesday in class, I watched a live Standard Field Sobriety Test (SFST) training (and conducted tests of my own on drunk volunteers). Learning about the process was frustrating -- a single DUI takes at least 4-6 hours of paperwork, keeping officers off the streets from saving lives. The DUI-Vision automates the grunt work of sobriety testing and provides complementary evidence in court.
What it does
Hardware-integrated Edge AI assistant using body-cam feed to perform real-time Horizontal Gaze Nystagmus (HGN) detection on Jetson Nano. -- HGN is the sobriety test with the highest accuracy rate; it looks at movement of the eye when following an object or at certain angles; inebriated persons will have uncontrollable movement of the eye -- Model detects eyes and pupils automatically and tracks involuntary eye patterns (spasms) -- Automatically uses data to start populating the NHTSA-standard HGN reports (e.g. scores/eye) -- All processing is done entirely on the device
How we built it
Hardware: NVIDIA Jetson Orin Nano Super + USB Camera Software: Custom pupil-tracking algorithm using OpenCV and NanoOwl Jitter Engine: Filters head movement from actual Nystagmus jerking and differentiates between frequential spasms of eye vs. normal smooth movement Edge Stack: Local FastAPI server and CSS dashboard on Jetson to serve real-time results
Challenges we ran into
This hackathon was an absolute hardware war for me. As an EE it was humbling to see how much work there is going to just make a connection on "software." I spent hours figuring out SSH/Serial Console and combatting network collisions. I've never used a terminal or SSH'ed into a machine before this, or even used codex to help edit code so it was a steep learning curve. Accomplishments that I'm proud of First hackathon & Competing Solo Not quitting dealing with the difficult hardware and unstable network Not throwing the jetson on the ground after another connection failure Having a working product and local web server running real time What I learned Developer kits are a lot harder than they look. Latency is so important for edge AI products. AI Code tools can help a lot but if you don't have a clear architectural vision or idea it can't do much. Once the project grows big the errors become more and more. Kind of like a cancer.
What's next
: Field Sobriety Test (FST) Edge Assistant Multi-Modal Agent -- integrating Whisper on a second Jetson to transcribe the suspect interview and auto-fill initial contact and arrest forms. Rest of the SFST -- adding CV models for the "Walk and Turn" and "One Leg Stand" tests, among many. Miniaturization -- making the logic work on a Orin-based body cam rig or recording glasses
DUI-Vision: Field Sobriety Test (FST) Edge Assistant
DUI-Vision is a Jetson-based edge system that runs computer vision on live video to assist Horizontal Gaze Nystagmus (HGN) field testing workflows in near real time.
What it does
- Captures face/eye video from a local camera
- Tracks pupil motion and estimates HGN indicators
- Computes:
- Lack of smooth pursuit (L/R)
- Nystagmus prior to 45° (L/R)
- Distinct nystagmus at max deviation (L/R)
- Vertical nystagmus estimate
- Detects excessive head movement during tests
- Publishes completed session results to a local API
- Serves a web dashboard for latest result + session history
Tech stack
- Edge/device: NVIDIA Jetson Nano
- Languages: Python 3, JavaScript, HTML, CSS
- CV/ML: OpenCV, NumPy, PyTorch, NanoOWL (OWL-ViT), Pillow
- Backend/API: Python
http.server+ThreadingHTTPServer(REST) - Storage: SQLite + CSV export
Run it locally
# Terminal 1: start API + dashboard
python3 api_server.py
# Terminal 2: run HGN edge capture
python3 hgn_tracker3.py
Dashboard: http://localhost:8000
API receives finalized sessions at POST /api/session/finish
## Why this matters for judges
This demonstrates a practical edge-first safety workflow:
- on-device inference (no mandatory cloud dependency),
- lightweight persistence,
- structured result delivery,
- browser dashboard for review.
## Privacy note
This is a field operations prototype; no public live law-enforcement endpoint is exposed in this
release. Data handling is local-first, and sensitive operational data is intentionally not
published publicly.
## Notes
test_eyes.py is a validation utility used during development to test pupil extraction behavior
before full pipeline integration.
Analysis
View
Metric
- 14
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
- CSSIn code
- HTMLIn code
- JavaScriptIn code
- PythonIn code
- PyTorchClaimed
4 of 5 appear in the indexed code. 1 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
103 KB
Source files
9
Counts recognized source files only; vendored directories, binaries and lockfiles are excluded, so this is smaller than the repository on disk.
Repository
ethans0ng/treehack2026
9 files · 103 KB · @ 32c857e
Structure
Interface
1 file · 11%Screens, components and styles rendered to the user.
Application logic
5 files · 56%Domain rules, services and shared utilities.
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
- Python84%
- JavaScript7%
- CSS5%
- HTML2%
- Markdown2%
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.