WoundLens — Hackathon Submission
Inspiration
Every year, over 28 million people suffer from chronic wounds, leading to severe infections and amputations. Despite living in an era of advanced medicine, the standard of care for wound assessment is shockingly primitive—often relying on subjective visual checks by overworked nurses using paper rulers. We learned that this subjectivity leads to a 30% misdiagnosis and mis-staging rate, meaning patients often receive the wrong treatments on day one. We were inspired to build WoundLens to bring objective, reproducible, pixel-perfect science to wound care, empowering clinicians and ensuring every patient gets the exact right treatment at the right time.
What it does
WoundLens is an AI-powered clinical decision support platform designed to eliminate subjectivity in chronic wound care. By analyzing a single smartphone photo, the system automatically detects the wound bed, performs pixel-perfect tissue segmentation (distinguishing healthy granulation, risky slough, and dangerous necrosis), and determines the clinical NPIAP stage. Based on this analysis, it instantly generates evidence-based treatment recommendations and provides an accessibility-friendly Voice Summary for clinicians on the go.
How we built it
We built the frontend and core application logic using Python and Streamlit. To achieve high-precision wound analysis without requiring massive GPU resources, we engineered a hybrid computer vision pipeline:
- Detection: We utilize a YOLOv8 object detection model (via Roboflow) to draw tight bounding boxes around the wound.
- Segmentation: We implemented a custom OpenCV GrabCut algorithm that uses the bounding box as a seed to extract the exact wound boundary.
- Classification: We built a tissue classifier that analyzes HSV and LAB color spaces to calculate the exact percentage of tissue types within the segmented mask.
- Accessibility: We integrated
gTTS(Google Text-to-Speech) to generate dynamic, on-the-fly audio summaries of the clinical findings.
Challenges we ran into
- UI/UX Limitations: Streamlit is fantastic for data dashboards but notorious for looking rigid. We spent hours writing aggressive CSS overrides (injecting glassmorphism, gradient animations, and custom sidebars) to make the app feel like a premium, production-ready web application.
- Lighting & Glare: Distinguishing between wet, yellow slough and simple camera glare was incredibly difficult. We had to implement multi-color space thresholding (combining HSV and LAB) to ensure accurate clinical segmentation.
- Background Processes: Managing state and background servers during rapid prototyping caused port conflicts and UI state resets, which we had to carefully debug and bypass.
Accomplishments that we're proud of
- Successfully building a zero-dependency, hybrid local segmentation engine that runs instantly and accurately without relying on expensive cloud GPUs.
- Designing a stunning dark-mode UI that completely breaks out of the standard "Streamlit look," proving that rapid prototyping tools can still deliver premium user experiences.
- Building a robust, decoupled Treatment JSON Rules Engine that directly maps our AI's computer-vision output to real-world clinical guidelines.
What we learned
- Clinical Nuance: We took a deep dive into NPIAP (National Pressure Injury Advisory Panel) guidelines to ensure our staging logic and treatment recommendations were actually medically sound.
- Advanced UI Engineering: We learned how to manipulate Streamlit's internal DOM using raw CSS and HTML injection to hide default navigation and build our own unified dashboard components.
- Hybrid Vision Pipelines: We learned that combining modern ML (YOLO) with traditional computer vision algorithms (GrabCut/Color Spaces) often yields faster, more explainable results than pure deep learning alone.
What's next for WoundLens
- EHR Integration: Building SMART on FHIR compliance to push wound metrics directly into Epic and Cerner patient records.
- Volumetric Measurement: Utilizing smartphone LiDAR sensors (like on the iPhone Pro) to measure the 3D depth and volume of deep stage 3/4 wounds.
- Longitudinal Tracking: Moving our session-state "Healing Tracker" to a persistent PostgreSQL database to track patient healing trajectories across months of care.
Log in or sign up for Devpost to join the conversation.