Build a real-time leak detection model with computer vision

Industry:

Facility Management & Industrial Safety

Who Is This Solution For:

Directors of Innovation, Developers
Interested in building this solution yourself?
See documentation

Customer Objectives:

  • Automatically detect and localize leaks (e.g., water, gas, or oil) in real-time using visual data from cameras or sensors

Key Results:

  • Deploy an AI-powered leak detection system that identifies leaks with 90%+ accuracy using natural language queries
  • Reduced development time by 70% compared to building a custom model

Groundlight Solution:

Groundlight's computer vision technology integrates with existing facility cameras to automatically detect spills, leaks and liquid hazards. Immediately alerts relevant personnel through real-time notifications. The system works 24/7, ensuring rapid response to potential safety hazards.

Problem: Building a reliable visual application that detects leaks and spills in a dynamic environment

Liquid spills and leaks in industrial and commercial facilities pose significant risks, from slip-and-fall accidents to potential chemical hazards. Traditional detection methods often rely on manual observation, leading to delayed responses and increased risk. However, building a custom computer vision model to detect leaks and spills can be a complicated and lengthy process, and isn't always reliable when it comes to dynamic environments. Groundlight's Python SDK enables developers to create a real-time leak detection system using computer vision.

Why choose Groundlight for building a Leak and Spill Detection system?

  • Utilize Existing Infrastructure: Groundlight's computer vision technology integrates with your current security cameras (or simple USB/wifi cameras), eliminating the need for additional hardware.​
  • Rapid Deployment: Use Groundlight's Python SDK to set up a functioning leak detection system within hours.​
  • Customizable Detection Criteria: Define specific parameters for different types of spills and liquids to suit your facility's needs.​
  • 24/7 Human Monitoring: Ensure continuous surveillance across multiple locations, adapting to various lighting conditions and environments.​
  • Instant Notifications: Receive real-time alerts via text or email when a leak is detected, allowing for immediate response.​
  • High level overview: building your leak and spill detection model using Groundlight AI

    Here's a high level overview of how you would build a leak and spill detection model using Groundlight AI. Interested in seeing the sample code for leak detection? Check out our Github repo.

    Set up Groundlight

    To get started, you would set up a Groundlight account, install Groundlight's Python SDK and connect it to your existing camera system.

    Define what you are detecting (your Computer Vision Models)

    On dashboard.groundlight.ai, you can create a detector (what you are detecting using computer vision), and using natural language just type your query: "Is there a spill or leak on the floor". You will also set your confidence threshold - in the example below, the confidence threshold has been set to 0.9, or 90%. This means that if the system is ever less than 90% sure that there is a leak or spill, it will ask for help from Groundlight staff.


    You can also create a detector directly by using Groundlight's Python SDK:

    import groundlight
    gl = groundlight.Groundlight()
    detector = gl.get_or_create_detector(
        name="leak_detector",
        query="Is there a liquid spill on the floor?"
    )
    

    For a dynamic leak and spill detection system that can recognize different liquids, you can create a combination of numerous detectors:

    • Binary Detector: Is there a leak or spill on the floor?
    • Counting Detector: Label each leak or spill in the image
    • Multi-class Detector: What types of spills or leaks are these?

    As images are captured, they are fed through numerous detectors. First, the image is fed through a binary detector ("Is there a leak or spill on the floor"). If the output is "Yes", the image will then be fed through an Counting and Object Detection Model that will count and create one bounding box for the leak or spill. Afterwards, the model is fed into a Multi-class detector to define what kind of leak or spill it is. The categories defined here are 1) water spills, 2) residue water after the spill has been cleaned, 3) food residue, and finally 4) other.

    Here is what the detectors would look like from your dashboard: a binary detector, a multi choice detector, as well as a count detector

    Capture and analyze images

    After setting up your detectors, you can begin capturing images from your camera feed and analyze them using your detectors. As new spills or leaks occur, the system uses its proprietary escalation framework to continuously learn.

    Here's an example where the algorithm has confidently said (with 97.8% confidence) that there is a spill (water residue after a spill has been cleaned).

    All of a sudden a new spill appears and the confidence score drops to 86.3%. Since the user has specified that if the algorithm is ever less than 90% confident on an answer, the system should escalate it to a human (Cloud Labeler) to confirm the answer. In this case, since the algorithm answered with a confidence score below 90%, it got escalated to a human who confirmed that there is a spill at a confidence score of 100%.

    Implement alert system

    Set up your system to send notifications when a leak is detected, integrating with your preferred communication channels.

    Advantages for Developers:

  • No Extensive ML Expertise Required: Groundlight's platform handles the complexities of machine learning, allowing you to focus on application development.​
  • Scalable Solution: Easily expand monitoring across multiple areas or facilities without significant additional investment.​
  • Continuous Improvement: The system learns and adapts over time, improving detection accuracy with increased usage.
  • How Do I Get Started?

    If you are a developer or have developers in-house, here’s how you can build this solution for yourself

    If you’d like to customize this solution for your business but need assistance to get started, book a call with Groundlight and we’d be happy to help

    Schedule a call