Pipe and Tubes Quality Inspection with Roboflow




SUMMARY
You can catch tube and pipe defects automatically: train Roboflow's RF-DETR on labeled pipe imagery, and it will flag holes, cracks, and ruptures. Connect it to a Roboflow Workflow and every image gets a PASS, REVIEW, or FAIL verdict, with low-confidence detections routed to a person.
Corrosion is one of the most persistent threats to pipeline integrity. PHMSA data attribute about 18 percent of significant pipeline incidents to corrosion, a share climbing past 25 percent in 2024, at an estimated $7 billion a year on transmission lines.
None of that damage shows up overnight. A rupture starts as a crack somebody missed on an earlier pass, and manual inspection doesn't scale to catch it: across long runs of pipework, the same hairline crack that gets flagged one week gets walked past the next.
In this tutorial, you'll train Roboflow's RF-DETR model to detect holes, cracks, and ruptures, then connect it to a Roboflow Workflow that routes each image to a PASS, REVIEW, or FAIL verdict. The model is trained on pipe defect imagery, and the same workflow applies directly to tube inspection.
How It Works: Tube Quality Inspection with RF-DETR and Roboflow Workflows
Here's the workflow I'll walk you through building. Our workflow starts with a single image. It runs through a custom-trained RF-DETR model at a very low confidence threshold, so nothing gets thrown away at the model stage. A separate filter block then applies the real inspection threshold, and a Custom Python block reads what survived and decides the verdict.
The result is an annotated image with high-contrast boxes around every defect, a report overlaid in the corner, and a JSON payload carrying the verdict, the defect count, and the highest confidence score. Every run gets logged to Vision Events.
Why the Threshold Lives in Its Own Block
Most inspection workflows set the confidence threshold on the model block and move on. This one doesn't. The detector runs at 0.01, and the real 0.4 threshold…