Folio III Field Notes
Plate III.5 — Wound

Building an AI-Powered Wound Measurement System

This post reflects my personal experience and contributions as an AI/Machine Learning Services Applications intern. The project was a collaborative effort involving developers, healthcare professionals, and mentors who provided guidance throughout.

Introduction

During my recent internship as an AI/Machine Learning Services Applications specialist, I had the opportunity to work on a challenging and impactful healthcare project: developing an AI-based wound measurement system that integrates standard medical reference objects for accurate wound assessment. This post outlines my experience, the technical challenges we overcame, and the insights gained throughout this journey.

The Problem: Accurate Wound Measurement in Healthcare

Wound assessment is a critical component of patient care, particularly for chronic wounds like pressure ulcers, diabetic foot ulcers, and venous leg ulcers. Traditional wound measurement methods often lack consistency, are time-consuming, and can be subjective depending on the healthcare provider performing the assessment. The goal was to create a system that could:

  • Consistently detect and measure wounds with high accuracy
  • Work with flexible reference objects commonly available in clinical settings
  • Provide reliable data for monitoring wound healing progress over time
  • Integrate seamlessly into existing clinical workflows

The Solution: AI-Driven Detection with Reference Objects

The core of the solution was a wound detection API powered by YOLO (You Only Look Once) object detection models. What makes the approach unique is the flexible reference system that allows healthcare providers to use one of three common objects for measurement:

  1. Coins — circular reference objects with known diameters
  2. Card — rectangular reference objects with standardized dimensions
  3. Rulers — linear reference objects for direct measurement

Each reference method has its advantages in different clinical scenarios:

  • During routine patient monitoring, coins or cards are convenient options
  • During surgical procedures, rulers provide the accuracy and flexibility needed in an operating room environment

Technical Implementation

The Architecture

The system comprises several key components:

  1. YOLO Object Detection Models — custom-trained to detect wounds and reference objects
  2. FastAPI Backend — handles image processing, object detection, and measurement calculations
  3. PHP/Laravel/Filament Frontend — provides the user interface for clinical staff

Key Technical Challenges

Learning New Technology Stacks. One of my first challenges was getting up to speed with PHP/Laravel/Filament, which was used for the frontend system. Coming from a different programming background, this required quick adaptation and learning while ensuring that the backend logic I was developing would integrate well.

Bridging Backend-Frontend Communication. The most significant challenge was ensuring reliable communication between the backend (Python/FastAPI) and frontend (PHP/Laravel) systems. These different frameworks use different libraries and data structures, requiring careful design of APIs and data formats.

Image Processing and Measurement Algorithms. Developing algorithms to:

  • Process polygon calculations for wound boundaries
  • Reduce polygon points while maintaining shape accuracy
  • Calculate accurate scaling based on reference objects
  • Account for perspective distortion

A particularly interesting part of the development was implementing the polygon calculation functions that determine wound dimensions. For example, the system uses the Shoelace formula (also known as the surveyor's formula) to calculate polygon areas accurately.

def calculate_polygon_area(points):
    # Shoelace formula implementation
    n = len(points)
    area = 0.0
    for i in range(n):
        j = (i + 1) % n
        area += points[i][0] * points[j][1]
        area -= points[j][0] * points[i][1]
    return abs(area) / 2.0

Synthetic Data Generation. To improve model performance, I developed an extensive library of synthetic images for machine learning. This approach allowed us to train robust models without requiring large amounts of real clinical data, which can be difficult to obtain due to privacy concerns and regulatory requirements.

Real-World Impact

The system has been able to address several issues:

  • Accuracy — consistent measurements independent of the healthcare provider
  • Efficiency — reduced time to document and measure wounds
  • Monitoring — precise tracking of wound healing progress over time
  • Integration — works with common objects found in clinical settings (coins, cards, rulers)

Conclusion

My internship experience developing an AI-powered wound measurement system has been invaluable. It provided the opportunity to work on a project with real-world healthcare impact while developing both technical and professional skills.

The flexible approach to reference objects (coins, cards, and rulers) makes the solution particularly adaptable to different clinical scenarios, from routine wound checks to surgical procedures. As healthcare continues to embrace digital transformation, tools like this — which enhance clinical assessment through AI and computer vision — will play an increasingly important role in improving patient care.

back to folio III · field notes