Computer vision answers · Manufacturing

How do I read seven-segment displays on an edge camera with computer vision?

From meters, scales and controllers that have no data output.

Short answer

Train an object detection model to find each digit on the display, with one class per number from 0 to 9 plus the decimal point, with Roboflow for free. Sort the detected digits left to right and join them into a reading, all on an edge camera next to the display. Accept a reading only when the same value shows on several frames in a row, so a digit caught mid-change never ends up in your log.

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
A fixed camera on the display and a model trained on its digits
What you get
The display's value as a number, every time it changes
Image sources
Meters, scales, timers and controllers with LED or LCD digits
Runs on
Edge devices such as NVIDIA Jetson, or Roboflow AI1
Digital scale displaying '243.7' with object detection bounding boxes on each digit.

How to build seven-segment display reading, step by step

Six steps from a camera on a display to a reading you can log.

  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 display images, start training, build the Workflow and run the model from a prompt, at no extra cost beyond your Roboflow plan.

  2. Mount a camera square to the display

    Fix the camera straight in front of the display, free of glare, with the digits filling a good part of the frame. Record the display across its full range of values, so every digit shows up in your images.

  3. Label every digit as its own class

    Draw a box around each digit and give it the class of the number it shows, from 0 to 9, plus a class for the decimal point. Roboflow Annotate can pre-label images with SAM 3, and public seven-segment datasets on Roboflow Universe can give you a head start.

  4. Train a detection model small enough for the edge

    Train a small object detection model, such as RF-DETR Nano or Small, on your labeled images with Roboflow Train, so it runs quickly on the camera's own hardware.

  5. Turn the digits into a reading

    Run the model on a frame, sort the detected digits from left to right, and join their class names into one number.

    Python
    import numpy as np
    import supervision as sv
    from inference import get_model
    
    model = get_model("your-project/1")
    
    result = model.infer("display.jpg", confidence=0.5)[0]
    detections = sv.Detections.from_inference(result)
    
    digits = detections[np.argsort(detections.xyxy[:, 0])]
    reading = "".join(digits.data["class_name"])
    print(float(reading))
    # 243.7

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

  6. Run it on the edge camera and send each reading on

    Build a Workflow that reads the display and posts each new value to your system with the Webhook Sink block. Run it on an NVIDIA Jetson device or a Roboflow AI1 camera with Roboflow Deploy, right next to the display.

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.