Inspiration
What it does
How we built it
Challenges we ran into
Inspiration
Border and perimeter security in remote or high-risk zones often relies on thermal cameras watched manually by human operators — a process that's exhausting, error-prone, and slow to react. We wanted to explore how far a lightweight, real-time AI pipeline could go toward automating that first layer of threat detection, using nothing more than a YOLOv8 model and some smart post-processing logic — deployable even on modest hardware.
What it does
ThermalGuard is a real-time person-detection and threat-classification system with three modes:
- Image mode — runs a custom-trained YOLOv8 model on uploaded thermal images and reports person detections with confidence scores.
- Video mode — tracks people frame-to-frame (ByteTrack), classifies their movement pattern (normal walking, stationary, crouching/crawling, or group movement), and raises a confirmed ALERT once a track sustains high-suspicion behavior for several consecutive frames. It also simulates dual-camera fusion, boosting confidence when a target is seen in the overlapping coverage zone of two virtual cameras.
- Live Camera mode — streams from a phone or laptop webcam over WebRTC, running a general COCO-trained YOLOv8 model in real time and tagging each tracked person SAFE / NORMAL / THREAT based on speed, body aspect ratio (crouch detection), and proximity to other people (group detection).
How we built it
The core is Ultralytics YOLOv8 for detection, with a custom-trained model for thermal imagery
and the stock COCO model for the live general-purpose feed. Tracking uses ByteTrack (video mode)
and a lightweight custom centroid tracker (live mode) to maintain consistent IDs across frames.
Movement classification is rule-based: we track per-ID position history and derive velocity,
bounding-box aspect ratio, and inter-person distance to score suspicion. The frontend is Streamlit,
with streamlit-webrtc handling the live camera stream, CLAHE-based contrast enhancement for
thermal footage, and ffmpeg re-encoding to make processed videos browser-playable.
Challenges we ran into
- False positives on close-range framing: our crouch-detection heuristic (based on ## Accomplishments that we're proud of
Log in or sign up for Devpost to join the conversation.