{"slug": "how-to-run-video-analytics-for-manufacturing", "title": "How to Run Video Analytics for Manufacturing", "summary": "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.", "body_md": "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.\n\nA 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.\n\nVideo 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.\n\nIn 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.\n\nWhat Is Video Analytics in Manufacturing?\n\nManufacturing 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.\n\nAs 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.\n\nThe 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.\n\nVideo Analytics for Manufacturing Safety\n\nIn a manufacturing plant, forklifts often move near areas where workers walk between production stations. Video analytics can help safety teams monitor situations such as:\n\nA 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.\n\nCameras 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.\n\nBefore 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.\n\nVideo Analytics for Manufacturing Quality Control\n\nIn 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.\n\nCracked 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.\n\nCamera 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.\n\nThe 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.\n\nManufacturers should test their quality control system for two types of errors:\n\nError type\n\nWhat happens\n\nWhy it matters\n\nFalse reject\n\nA good product is marked as defective.\n\nIt leads to unnecessary inspections or rework.\n\nMissed defect\n\nA defective product passes inspection.\n\nIt may reach the customer and require a return.\n\nManufacturers 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.\n\nVideo Analytics for Production Workflow Monitoring\n\nIn 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.\n\nA 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.\n\nThe footage can also reveal problems affecting the production line, such as:\n\nProduct 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.\n\nIdle stations: Cartons stop moving through a workstation during an active production run.\n\nThe 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.\n\nManufacturers 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.\n\nWhat Do You Need to Run Manufacturing Video Analytics?\n\nBefore building a Roboflow Workflow, check that the camera footage is suitable for the task and that the computer running the Workflow can process it.\n\nRequirement\n\nWhat to check\n\nCamera or sample video\n\nUse 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.\n\nImage quality\n\nProducts or defects should be clearly visible, with enough image detail and lighting to detect them. Check for motion blur and poor exposure.\n\nComputer vision model\n\nSearch 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.\n\nProcessing hardware\n\nRun 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.\n\nSuccess criteria\n\nCompare the Workflow's results with a manual count or inspection of the same footage.\n\nThe 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.\n\nHow to Run Video Analytics for Manufacturing with Roboflow\n\nMany 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.\n\nRoboflow 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.\n\nInside 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.\n\nFor 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.\n\nOnce the Workflow produces its results, manufacturers can use them in different ways:\n\nLive dashboards: Display the latest results on a monitoring screen so staff can check activity across the plant.\n\nEvent 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.\n\nOther 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.\n\nThe 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.\n\nVisualization 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.\n\nRun the Workflow on Video\n\nTo 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.\n\nFirst, install the required packages:\n\n```\npip install inference opencv-python\n```\n\nThen run the following Python script:\n\n``` python\nimport os\nimport cv2\nfrom inference import InferencePipeline\n\ndef on_prediction(result, video_frame):\n    annotated = result.get(\"output_image\")\n\n    if annotated is not None:\n        cv2.imshow(\n            \"Carton Counting\",\n            annotated.numpy_image\n        )\n        cv2.waitKey(1)\n\n    print(\"Count:\", result.get(\"count_in\"))\n\npipeline = InferencePipeline.init_with_workflow(\n    api_key=os.environ[\"ROBOFLOW_API_KEY\"],\n    workspace_name=\"YOUR_WORKSPACE_ID\",\n    workflow_id=\"YOUR_WORKFLOW_ID\",\n    video_reference=\"YOUR_VIDEO_PATH_OR_RTSP_URL\",\n    on_prediction=on_prediction,\n)\n\npipeline.start()\npipeline.join()\ncv2.destroyAllWindows()\n```\n\nBefore 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.\n\nFor 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.\n\nCarton Counting Test Results\n\nI tested the Workflow on a 10-second video with five cartons. The automated count matched the manual count.\n\nIn a second test, the model missed a carton when two boxes moved close together.\n\nI lowered the confidence threshold from 0.3 to 0.25 and ran the video again. The Roboflow preview then counted all seven cartons.\n\nTest\n\nManual count\n\nAutomated count\n\nCounting errors\n\nFive-carton video\n\n5\n\n5\n\n0\n\nSeven-carton video (before correction)\n\n7\n\n6\n\n1\n\nSeven-carton video (after correction)\n\n7\n\n7\n\n0\n\nAll 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.\n\nLowering 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.\n\nManufacturers 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.\n\nEdge Video Analytics\n\nEdge 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.\n\nFor 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.\n\nCloud Video Analytics\n\nCloud 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.\n\nSending 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.\n\nChoosing an Architecture with Roboflow Deploy\n\nRoboflow offers different deployment options depending on how video analytics will be used.\n\nSelf-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.\n\nRoboflow 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.\n\nThe table below compares the main requirements of each approach.\n\nFactor\n\nEdge processing\n\nCloud processing\n\nResponse time\n\nLocal decisions avoid internet round trips\n\nNetwork transfer adds to response time\n\nInternet connection\n\nOffline with the required setup and licensing\n\nRequires a connection to the hosted service\n\nBandwidth\n\nUses less internet bandwidth because video is processed locally\n\nRequires bandwidth to send images or video to the cloud\n\nHardware\n\nFactory manages local computing equipment\n\nHosted provider manages the computing infrastructure\n\nA 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.\n\nConclusion and Next Steps\n\nVideo 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.\n\nTo 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.", "url": "https://wpnews.pro/news/how-to-run-video-analytics-for-manufacturing", "canonical_source": "https://roboflow.com/blog/run-video-analytics-for-manufacturing", "published_at": "2026-11-12 03:32:35+00:00", "updated_at": "2026-11-12 03:49:56.046123+00:00", "lang": "en", "topics": ["computer-vision", "ai-tools", "ai-products", "ai-infrastructure"], "entities": ["Roboflow", "Roboflow Workflows", "Roboflow Inference"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/how-to-run-video-analytics-for-manufacturing", "markdown": "https://wpnews.pro/news/how-to-run-video-analytics-for-manufacturing.md", "text": "https://wpnews.pro/news/how-to-run-video-analytics-for-manufacturing.txt", "jsonld": "https://wpnews.pro/news/how-to-run-video-analytics-for-manufacturing.jsonld"}}