cd /news/computer-vision/how-to-run-video-analytics-for-manuf… · home › topics › computer-vision › article
[ARTICLE · art-168121] src=roboflow.com ↗ pub= topic=computer-vision verified=true sentiment=· neutral

How to Run Video Analytics for Manufacturing

Roboflow published a guide showing manufacturers how to run video analytics on existing IP cameras by connecting an RTSP stream to Roboflow Workflows and processing it with Roboflow Inference on the edge or in the cloud. The guide recommends starting with one camera and one measurable task, such as counting cartons leaving a packing station, before scaling across a plant, and covers safety monitoring like forklift-lane time-in-zone alerts and quality control such as checking blister packs for missing tablets. Roboflow advises safety teams to validate systems against footage from varied working conditions and retrain models with more plant footage if they keep missing real safety issues or raising false alerts.

by read13 min views2 publishedNov 12, 2026
How to Run Video Analytics for Manufacturing
Image: Roboflow (auto-discovered)

Video analytics for manufacturing turns the IP cameras already on your floor into systems that catch product defects, flag workers in forklift lanes or without required PPE, and count output on the line. Connect an RTSP stream to a Roboflow Workflow, run it with Roboflow Inference on the edge or in the cloud, and start with one camera and one easy-to-check task, such as counting cartons, before scaling across the plant.

A missing tablet in a blister pack. Cartons backing up on a conveyor. A worker entering a forklift lane. Each is a visible event that a camera can capture and computer vision can help identify. You can run video analytics for manufacturing using existing IP cameras, provided they support a compatible video stream and capture enough detail for the task.

Video analytics turns that footage into inspection results, production counts, and alerts that your team can act on. With Roboflow Workflows (opens in a new tab), you can connect computer vision models, object tracking, and rules to build an application for your production line. Roboflow Inference processes video from live RTSP camera streams, with deployment options for your own hardware or the cloud.

In this guide, we’ll explore how manufacturers use video analytics for safety, quality control, and production monitoring. We’ll cover how to connect cameras to Roboflow, choose between edge and cloud processing, and validate results against real factory conditions. Start with one camera and one measurable task, such as counting cartons leaving a packing station, then expand as you verify performance.

What Is Video Analytics in Manufacturing?

Manufacturing video analytics uses computer vision to analyze footage from cameras installed around a plant. Conventional CCTV systems record or display video for operators to review. Video analytics processes the footage to identify specific objects and activities, producing data that can be used without manually reviewing every recording.

As a product moves along a conveyor, the camera can capture it in several video frames before it leaves the camera's view. Tracking helps the system recognize that these detections belong to the same product, so it can count the product only once.

The accuracy of these results depends on camera coverage and the objects the model has been trained to recognize. The factory also decides what happens when the system detects a problem, such as sending an alert to an operator or saving the result for later review.

Video Analytics for Manufacturing Safety

In a manufacturing plant, forklifts often move near areas where workers walk between production stations. Video analytics can help safety teams monitor situations such as:

A worker enters the forklift lane. A Time in Zone (opens in a new tab) block measures how long each tracked worker stays inside a zone drawn over the lane. The Workflow can then send an alert or save an image for the safety team to review.

Cameras can miss activity when machinery or stacked materials block their view. They can also raise false alerts. For example, a worker may be wearing a helmet, but if the camera cannot see it clearly, the system may report that the worker is missing safety equipment. Safety teams should review the footage before treating an alert as a confirmed violation.

Before using the system during regular shifts, safety teams should test it with footage recorded under different working conditions. They should check how often the system misses real safety issues and how often it raises false alerts. If the system keeps missing safety issues or sending false alerts despite having a clear camera view, the model may need to be retrained using more footage from the plant.

Video Analytics for Manufacturing Quality Control

In a factory packaging medicine tablets, a camera can inspect each blister pack as it moves along the production line. A computer vision model checks whether every pocket in the pack contains a tablet. If a tablet is missing, the pack is marked for inspection.

Cracked tablets require a different check. A Dynamic Crop (opens in a new tab) block cuts each detected tablet out of the frame, and a classification model labels each crop as cracked or intact. The classification model needs to be trained on examples of this damage, including cracks that are difficult to see at first glance.

Camera position and lighting affect both checks. The camera needs a clear view of the tablets, with enough detail to detect any damage. Even when the tablets are visible through the packaging, reflections from the plastic can hide cracks. Manufacturers should test the model using footage from their production line to see how well it performs under actual working conditions.

The system can also track a defective blister pack as it moves along the conveyor, helping operators identify which pack needs to be removed for inspection.

Manufacturers should test their quality control system for two types of errors:

Error type

What happens

Why it matters

False reject

A good product is marked as defective.

It leads to unnecessary inspections or rework.

Missed defect

A defective product passes inspection.

It may reach the customer and require a return.

Manufacturers should measure both errors and decide which one could cause more serious problems. For medicine packaging, missed defects need particular attention because faulty products could reach patients.

Video Analytics for Production Workflow Monitoring

In a factory where cartons move along a conveyor, a camera can help measure how many products leave the packing station. A computer vision model detects the cartons, while a ByteTrack Tracker (opens in a new tab) block gives each one an ID as it moves through the video.

A Line Counter (opens in a new tab) block uses a counting line drawn across the conveyor in the video. When a tracked carton crosses this line in the correct direction, the block adds one to the count. Manufacturers can use these results to calculate how many cartons pass each minute and see when production slows down.

The footage can also reveal problems affecting the production line, such as:

Product buildup: Cartons begin to form a long line where two conveyors meet. This could mean the next conveyor is moving too slowly or has stopped.

Idle stations: Cartons stop moving through a workstation during an active production run.

The footage alone cannot tell whether the conveyor has stopped for planned maintenance or because of a machine problem. Operators may need to check equipment records or speak with staff to find out what happened.

Manufacturers can compare the recorded counts with their production reports. If the numbers do not match, they can review the footage for possible counting errors. For example, the system might count two cartons moving close together as one.

What Do You Need to Run Manufacturing Video Analytics?

Before building a Roboflow Workflow, check that the camera footage is suitable for the task and that the computer running the Workflow can process it.

Requirement

What to check

Camera or sample video

Use a recorded video or an RTSP camera stream that shows the production line clearly. For live cameras, make sure the computer running the Workflow can connect to the stream.

Image quality

Products or defects should be clearly visible, with enough image detail and lighting to detect them. Check for motion blur and poor exposure.

Computer vision model

Search Roboflow Universe for a model that detects the target objects. If no suitable model is available, collect and label images of your products and train a custom model in Roboflow.

Processing hardware

Run the Workflow on your own hardware or use a Roboflow cloud deployment. Test the chosen setup to check whether it can process video at the required speed.

Success criteria

Compare the Workflow's results with a manual count or inspection of the same footage.

The public model used in the carton-counting example is a starting point. For production use, choose a model that has been tested on footage from the actual factory line.

How to Run Video Analytics for Manufacturing with Roboflow

Many manufacturing plants already have IP cameras installed around their production lines. Cameras that support RTSP (Real-Time Streaming Protocol) can provide a live video stream to an application over the network. This means manufacturers can reuse existing cameras if they provide a clear view of the area being monitored.

Roboflow Inference (opens in a new tab) can take frames from the video stream and pass them to a Roboflow Workflow through its image input. A Workflow is built by connecting blocks, with each block performing a specific task.

Inside the Workflow, an object detection model can identify workers or products in the video. Tracking can be added when the system needs to follow movement across frames. Other blocks apply rules to the predictions and decide which observations should be reported.

For example, a safety Workflow can be configured to report when a worker enters a restricted area. A production Workflow may return the number of products counted, while a quality Workflow can provide inspection results. The output depends on the blocks and rules used in each Workflow.

Once the Workflow produces its results, manufacturers can use them in different ways:

Live dashboards: Display the latest results on a monitoring screen so staff can check activity across the plant.

Event records: The Roboflow Vision Events (opens in a new tab) block sends images, predictions, and event details to Roboflow, creating a record of what happened during each shift that can be searched and filtered in the Roboflow dashboard.

Other factory systems: A configured integration, such as a Webhook Sink (opens in a new tab), can send selected results to another application for further processing.

The detections pass to a ByteTrack Tracker block, which assigns each carton an ID as it moves through the video. A Line Counter block uses a vertical line from (720, 180) to (720, 650) to count cartons crossing the line. The line is positioned for the sample video and needs to be adjusted for other camera views.

Visualization blocks draw the counting line, bounding boxes, and tracking IDs on the frames. A Text Display block shows the current count. The Workflow returns the annotated frame as output_image and the number of cartons counted as count_in.

Run the Workflow on Video

To run the Workflow on a recorded video or live camera stream, install Roboflow Inference on the computer processing the footage. The Python example below runs the Workflow, displays the annotated video, and prints the carton count.

First, install the required packages:

pip install inference opencv-python

Then run the following Python script:

import os
import cv2
from inference import InferencePipeline

def on_prediction(result, video_frame):
    annotated = result.get("output_image")

    if annotated is not None:
        cv2.imshow(
            "Carton Counting",
            annotated.numpy_image
        )
        cv2.waitKey(1)

    print("Count:", result.get("count_in"))

pipeline = InferencePipeline.init_with_workflow(
    api_key=os.environ["ROBOFLOW_API_KEY"],
    workspace_name="YOUR_WORKSPACE_ID",
    workflow_id="YOUR_WORKFLOW_ID",
    video_reference="YOUR_VIDEO_PATH_OR_RTSP_URL",
    on_prediction=on_prediction,
)

pipeline.start()
pipeline.join()
cv2.destroyAllWindows()

Before running the script, set ROBOFLOW_API_KEY as an environment variable. To find the Workspace ID and Workflow ID, click Use in the workflow editor. The panel displays a code example containing both identifiers. Copy those values into YOUR_WORKSPACE_ID and YOUR_WORKFLOW_ID in the Python script.

For a recorded video, replace YOUR_VIDEO_PATH_OR_RTSP_URL with the path to the video file. For a live camera, enter its RTSP URL instead. To monitor different products, select a suitable model in the Workflow's Object Detection Model block. Also adjust the counting line to match the camera view.

Carton Counting Test Results

I tested the Workflow on a 10-second video with five cartons. The automated count matched the manual count.

In a second test, the model missed a carton when two boxes moved close together.

I lowered the confidence threshold from 0.3 to 0.25 and ran the video again. The Roboflow preview then counted all seven cartons.

Test

Manual count

Automated count

Counting errors

Five-carton video

5

5

0

Seven-carton video (before correction)

7

6

1

Seven-carton video (after correction)

7

7

0

All tests used model boxes-on-a-conveyer-belt/8, and ran on an Intel Core i5-10500H CPU. It processed 241 frames from a 10-second video in 17.47 seconds, averaging 13.80 processed FPS.

Lowering the confidence threshold might help the model detect more cartons, although it can also increase false detections. If the model continues to miss cartons that are close together, retraining it with more images of these cases could improve its accuracy.

Manufacturers need to decide where their video analytics system will process camera footage. The choice depends on how quickly the factory needs the results and how the system will be used.

Edge Video Analytics

Edge processing means running computer vision models on a computer inside the factory or near the cameras. This allows the system to make decisions using the factory's local network.

For applications that need an immediate response, keeping processing close to the production line can be useful. The factory also needs to maintain the equipment and make sure it has enough processing power to handle the camera streams.

Cloud Video Analytics

Cloud processing means sending camera footage to computers outside the factory for analysis. Manufacturers with several factories can use the same cloud service to process footage from different locations.

Sending images to the cloud only when needed can use less bandwidth than streaming video continuously. Live streaming also requires a reliable internet connection, as a slow or interrupted connection can delay results.

Choosing an Architecture with Roboflow Deploy

Roboflow offers different deployment options depending on how video analytics will be used.

Self-hosted (opens in a new tab) Roboflow Inference is Roboflow’s open-source inference server. It can run on factory hardware and process live camera streams, including RTSP streams. This allows manufacturers to process footage within their own network. Choose it for a camera that runs all shift on the line. Self-hosted inference does not use credits, though you supply and maintain the hardware.

Roboflow also offers cloud-hosted options. Its standardServerless API (opens in a new tab) is a Roboflow-hosted API for sending individual images or requests to a model or Workflow, which suits occasional image checks. Cloud Streaming (opens in a new tab) is for managed live cameras: it runs Workflows on live cameras, connecting RTSP and ONVIF cameras through a Video Connector (opens in a new tab). Dedicated Deployments (opens in a new tab) are private cloud servers managed by Roboflow with resources allocated only to you. Choose them when you need consistent performance on dedicated GPUs without managing servers.

The table below compares the main requirements of each approach.

Factor

Edge processing

Cloud processing

Response time

Local decisions avoid internet round trips

Network transfer adds to response time

Internet connection

Offline with the required setup and licensing

Requires a connection to the hosted service

Bandwidth

Uses less internet bandwidth because video is processed locally

Requires bandwidth to send images or video to the cloud

Hardware

Factory manages local computing equipment

Hosted provider manages the computing infrastructure

A factory can process video locally and analyze the results in the cloud. For example, a computer near the conveyor can inspect blister packs and identify problems before the packs reach the next station. The computer must be fast enough to keep up with production. Inspection results can then be sent to a cloud application, where they are stored and used to calculate defect rates for each shift.

Conclusion and Next Steps

Video analytics helps manufacturers identify visible problems and measure production activity using camera footage. Accurate results depend on clear camera views and testing the system under real factory conditions.

To get started, choose one camera view and one process that is easy to check, such as cartons crossing a counting line. Use Roboflow Workflows to count the cartons and Roboflow Inference to process the camera footage. Compare the results with a manual count to check the accuracy. Choose between local and cloud processing based on the factory's available hardware and internet connection. Once the counts are reliable, manufacturers can expand the system to other production lines.

── more in #computer-vision 4 stories · sorted by recency
── more on @roboflow 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/how-to-run-video-ana…] indexed:0 read:13min 2026-11-12 · —