CyberCCNuts
• 1 min read • CyberCCNuts Team

Training YOLOv8 for Pressure Gauge Detection & IT-21 Compliance

Technical notes on field dataset collection, data augmentation for glass glare, and early v1 benchmarks for the CCNuts Extintor computer vision engine.

One of the trickiest engineering challenges in CCNuts Extintor is reliably reading the pressure gauge under real-world field conditions — dimly lit hallways, overhead fluorescent glare on glass dials, and angled smartphone shots taken quickly by municipal inspectors.

Two-Stage Inference Pipeline

Rather than classifying pressure directly on a wide-angle hallway photo, we split inference into two focused stages inside our FastAPI service:

  1. Macro Detection (YOLOv8s): Locates the extinguisher cylinder, wall signage plate, maintenance tag, and the tight bounding box crop around the pressure gauge.
  2. Fine-Grained Verification & OCR: The cropped gauge undergoes adaptive contrast enhancement (CLAHE) and green-zone needle verification, while the cropped recharge tag feeds our OCR module to parse and validate expiration dates.
# Simplified FastAPI + YOLOv8 compliance evaluation helper
def validate_extinguisher_frame(detections: dict) -> dict:
    has_signage = detections.get("wall_sign", 0.0) >= 0.70
    gauge_ok = detections.get("gauge_green_zone", False)
    expiry_valid = detections.get("ocr_expiry_ok", False)

    return {
        "compliant": all([has_signage, gauge_ok, expiry_valid]),
        "checks": {
            "signage_it21": has_signage,
            "pressure_nbr12962": gauge_ok,
            "recharge_validity": expiry_valid,
        },
    }

What’s Next

For dataset v2 we are adding dusty dials and harsh backlit samples to push mAP@50 past 96% ahead of municipal pilot deployments.