Skip to content
LexDataLexData
PlatformIndustriesCustomers
DocsThe Field GuideBlogWhy models drift
AboutCareersSecurityContact
Log inStart now
← All posts

Industries · 6 min read

Pipe and tube defect detection with object detection, and a rule that gives every metre a verdict

Pinholes, cracks and pitting boxed on the mill's own tube, a threshold in the rule where the inspector can read it, and the borderline metre reviewed.

Summary

This post follows a length of tube past a camera on the run-out table, from a box on every pinhole, crack and pit to a rule that returns pass, review or fail for each metre. It concludes that the threshold has to live in the rule rather than the model, that a wrong threshold is the usual way a damaged pipe gets a pass, and that the reviewed frames are what the next version trains on. It is for tube mill and pipe yard quality teams.

Rajiya Sultana · Engineering Manager · Sep 26, 2026

Pipe sections with rust marked and a dent flagged, from a customer inspection run

The tube mill runs through the night, and at 4 am the inspector on the run-out table has a torch, a piece of chalk and a length of welded tube every few minutes. She walks it, turns it with the roller, looks along the seam, and chalks a ring around anything she does not like. The chalked lengths go to the repair bay. The others go to the rack and, by Thursday, to a customer who will hydrotest them and send back the ones that weep.

The ring of chalk is the oldest bounding box on the line. A camera on the gantry over the table draws the same ring on every length, at 4 am and at noon, and the interesting question is what happens to the ring afterwards.

Object detection finds the pit, and the rule decides what it means

A pinhole in the seam, a longitudinal crack, a patch of pitting from a coil that sat outside in the rain since March: each is a small dark thing on a bright reflective surface. Object detection is the right tool for finding small things and saying where they are. A box on the pit carries its position along the length and its size in the frame, and that is what the disposition needs.

The model's job ends at the box. Whether a pit of that size at that position makes the tube a reject, a repair or a pass is a decision the mill owns, and the mill's decision changes with the customer, the grade and the wall thickness. Keeping it out of the model is what makes the next section possible.

Each defect class is boxed on the mill's own tube, under the mill's own lights

Pinhole, crack, pitting, scale and an open seam are five classes, and each is a box. Corrosion area is the one that sometimes wants a mask, since a customer spec may limit pitting by area rather than by count, and then the surface defect use case applies: severity is size and location, and only the mask carries the size.

The frames come from the gantry camera, not from a phone held over a sample in the lab, because the lab has diffuse light and the gantry has a sodium lamp and the glare of a wet tube. You type the five classes, Lexi proposes the boxes, and a person checks every one before anything trains on it. The checker's time goes on scale, which is harmless mill scale on one length and the first sign of a lamination on the next, and the guide has to say how to tell them apart at the box.

On the manufacturing lines we run, the class list is written with the inspector at the table, in her words. "Weep" is a class name on one of them.

The threshold belongs in the rule, where the inspector can read it

The rule is a sentence. A crack of any length, or pitting over the limit for this grade within a metre, and the length is a fail. A single pit under the limit, or a box the model was unsure about, and the length is a review. Otherwise a pass. Every metre gets one of those three words, and the words go to the rack tag and the mill's record.

The limit sits in that sentence and nowhere else. When the grade changes at the 6 am shift change, the limit changes and the model does not. When a customer asks why a length shipped, the mill can show the rule as it read on the day and the frames the rule ran on. A threshold buried in a model's training is a threshold nobody can read back.

A wrong threshold is the usual way a damaged pipe gets a pass

The failure that teaches this is quiet. A batch of coil arrives in October with more surface pitting than the mill has seen in months. The model boxes every pit correctly and the pass rate barely moves, because the review limit was tuned to a quarter when pitting was rare. Now the queue is being filled by the ordinary pits while the bad ones sit beneath the same line. Per box the model is right. Per length the mill is shipping damage.

The drift catalog calls this a change in the defect rate, and it names the cheap signal: alert volume against its own history. On the tube line the volume is the review queue. When the queue for a shift doubles or empties, the base rate has moved, the thresholds tuned to the old rate are wrong, and the first thing to check is the rule. The model is the last thing.

My own view is that the review limit should be set from the inspector's shift rather than from the model's numbers. She can look properly at so many frames in eight hours, and the limit that sends her about that many is the limit that gets every one of them looked at. A queue she cannot clear is a queue she starts skimming, and a skimmed queue is chalk on the wrong lengths again.

The reviewed metre is what the next version trains on

A length marked review goes to the inspector with the frame, the box and the rule's reason. She passes it, fails it or corrects the box, and her call is recorded against the frame. Over a week those calls are a labeled set of exactly the cases the model found hardest, from the line it runs on.

LexData takes the tube model through its whole life. You type what to look for, Lexi puts a box on every frame, and a person checks each label before anything trains on it. The model then watches the gantry camera, in the cloud, on your servers, or on a runner beside the recorder at the mill. Frames it is unsure of come back to a person, the corrections retrain it, and the new version replaces the old one with no downtime. The 99%+ accuracy maintained in production that our manufacturing work reports is held that way, by corrections that keep landing, and never by a model that was right on the day it shipped.

Every metre carries a record the customer can ask for

The length that weeps at hydrotest on Thursday has a frame from 4 am on Monday with a box on it, or has no box, and either answer is useful. A box the rule passed is a limit to revisit. No box on a pit the customer found is a frame for the review queue and a label for the next version. Before the camera, the answer to the customer was the inspector's memory of a night she worked three weeks ago.

The record is also what makes the pipe yard's own corrosion inspection possible later, since a length that left the mill with a known map of pits is a length whose pitting can be compared against itself after a year on the rack.

See it on your own footage.

Start with your footage

More in Industries

Industries · 6 min read

AI crop analysis in the greenhouse, catching tomato disease before it spreads down the row

Lesions boxed by disease with a healthy class, a question of the footage about how far a patch spread since last week, and a model that turns with the season.

Rob Hickey · Sep 26, 2026

Industries · 6 min read

Ceramic defect detection for hairline cracks a fixed-rule camera cannot learn

Edge chips, hairline cracks and pinholes on the tile line after the kiln, masks where the area sets the grade, and the new glaze as the day to relabel.

Esdras Ntuyenabo · Sep 26, 2026

Industries · 6 min read

Chocolate box inspection with a camera over the tray line

Each piece boxed by type, a plain check against the box template, damage as its own class, and the new spring assortment as the day the labels go stale.

Stephen Biswas · Sep 26, 2026

LexData
LexData

Product

  • Platform
  • Industries
  • Use cases

Resources

  • Docs
  • The Field Guide
  • Blog
  • Why models drift

Industries

  • Energy & utilities
  • Oil & gas
  • Agriculture
  • Manufacturing
  • Insurance
  • Retail
  • Robotics

Company

  • About
  • Customers
  • Careers
  • Contact

Trust

  • Security
  • Privacy
  • Terms

Stay updated

What we learn running vision models in production.

See everything.
Miss nothing.

Stay updated

What we learn running vision models in production.

Terms of use & Privacy policy

© 2026 LexData Labs · All rights reserved