Computer vision answers · Construction

How do I identify electrical distribution board components with computer vision?

In a breaker panel or distribution board, without writing down every breaker by hand.

Short answer

Train an object detection model to find each component in photos of a breaker panel, such as the main breaker, circuit breakers and GFCI or AFCI breakers, with Roboflow for free. Sort the breakers into the panel's two columns, top to bottom, to get its layout, and add OCR to read each breaker's amp rating. Label each breaker type as its own class, including blank fillers, so empty spaces in the panel are recorded too.

Roboflow agent · free to start

Skip the setup. Describe your images.

Describe your images and what you need to find. The agent sets up labeling, training and deployment with you.

Key facts

What you need
Panel photos and a model trained on your breaker types
What you get
Each breaker found, in panel order, with its amp rating read
Image sources
Phone and tablet photos taken on site
Runs on
Cloud API, or a laptop or server running Docker
An open electrical consumer unit with a labeled main switch, RCD, four MCBs, and a blank slot, highlighted by color-coded outlines.

How to build breaker panel detection, step by step

Six steps from a photo of a breaker panel to every breaker listed in order.

  1. Connect Roboflow to your coding agent, ChatGPT or Codex

    Add the Roboflow MCP server to Claude, Cursor or Gemini CLI, or install the Roboflow plugin in ChatGPT or Codex. Your assistant can then upload and auto-label panel photos, start training, build the Workflow and run the model from a prompt, at no extra cost beyond your Roboflow plan.

  2. Photograph each panel straight on

    Take each photo square to the panel, with the door open and the dead front cover left in place, in good light. Include the panel brands and sizes you see on your jobs.

  3. Label each breaker type as its own class

    Draw a box around every component and give each type its own class, such as main breaker, breaker, GFCI breaker, AFCI breaker and blank filler. Roboflow Annotate can pre-label photos with SAM 3, and public breaker datasets on Roboflow Universe can give you a head start.

  4. Train a detection model

    Train an object detection model such as RF-DETR on your labeled panel photos with Roboflow Train, and test it on panels it has not seen.

  5. List the breakers in panel order

    Run the model on a panel photo, split the breakers into the left and right columns, and sort each column from top to bottom, so the list follows the layout of the panel.

    Python
    import numpy as np
    import supervision as sv
    from inference import get_model
    
    model = get_model("your-project/1")
    result = model.infer("panel_07.jpg", confidence=0.4)[0]
    detections = sv.Detections.from_inference(result)
    
    breakers = detections[detections.data["class_name"] != "main_breaker"]
    centers = breakers.get_anchors_coordinates(sv.Position.CENTER)
    is_left = centers[:, 0] < (centers[:, 0].min() + centers[:, 0].max()) / 2
    for side, mask in (("left", is_left), ("right", ~is_left)):
        column = breakers[mask]
        print(side, column[np.argsort(column.xyxy[:, 1])].data["class_name"].tolist())
    # left ['breaker', 'breaker', 'gfci_breaker', 'breaker']
    # right ['afci_breaker', 'breaker', 'breaker', 'blank']

    Rather not write code? Ask the Roboflow agent to set this up for you

  6. Read each breaker's amp rating with OCR

    Build a Workflow that crops each detected breaker with the Dynamic Crop block and reads its rating with the OCR Model block, such as 15 or 20. Run it on every panel photo with Roboflow Deploy.

Why 2 million engineers build on Roboflow

  • Label faster

    Auto-label with SAM 3 or your own model, then fix the misses instead of drawing every box.

  • RF-DETR

    Roboflow’s open-source real-time detection model, built for accuracy (opens in a new tab) on small objects.

  • Logic built in

    Counting, zones, tracking and alerts are ready-made Workflow blocks, so there is less code to write.

  • Your model, your weights

    Use your trained weights on every plan, including free, through the open-source Inference package.

  • Run it anywhere

    Self-host on a workstation, Docker, an on-prem GPU or an edge device, or call the cloud API.