A pressing plant in Chennai was finding defects late and couldn't say which press or shift they came from. So I built it AI visual inspection that works with a phone or the existing CCTV, photographs every defect, logs it per batch, and lets the supervisor make every reject call.
11 min readPhone / CCTV · Vision model · Supabase · DashboardScreens show sample data
vision.tamrindauto.in/live/line-3
Line 3, seen through the plant's existing CCTV camera. Lime boxes are parts that passed. Red boxes are defects sent to the supervisor. The amber box is a part the model isn't sure about, so a person looks at it. Every flagged part is photographed.
In short
Human inspectors are good but not perfect. Decades of research say they miss a real share of defects, and they miss even more when defects are rare.
Floor Vision points a phone or an existing CCTV camera at the line. A vision model boxes each part, flags scratches, dents and missing weld nuts, and photographs every flag.
The model never scraps a part on its own. The supervisor confirms or releases every reject on their phone, and anything the model is unsure about goes to a person.
Every decision is logged against the batch with its photo, so the quality head sees trends by press, shift and die. Confirmed photos train the next model.
01 — The problemA defect found at the customer's gate
The client is an auto-components plant in Chennai. It stamps small steel parts, such as brackets with a nut welded on, in batches of a few thousand a shift for vehicle makers and larger suppliers. At the end of each line, an inspector picks up parts, turns them under a lamp and drops the bad ones in a red bin.
That works most of the time. The trouble is what it doesn't tell you. A tally sheet says "14 rejects, B shift." It doesn't say that 11 of them were scratches on the same edge, that they started the day a die was changed, or that the inspector was on their seventh hour. And when a bad part slips through, the first anyone hears of it is a customer complaint, with the whole batch held at their gate.
The owner's ask was simple: catch more at the line, and when something goes wrong, show me where it started.
02 — The researchHow often do human inspectors miss defects?
Before building anything, I wanted to know what "good" looks like for a human inspector. The research on this is old and surprisingly consistent:
85%
of defective parts caught by 82 trained inspectors checking precision parts. They also rejected 35% of the good parts.
Solid lab result, often replicated, but not on a factory floor. It explains why a good plant's rare defects are the easy ones to miss.
"AI catches 99% of defects"
Usually unclear
Common on vendor pages
I couldn't trace these to independent studies, so they aren't used here.
The rare-defect finding matters most here. A well-run press line might make one bad part in a hundred, which is exactly when the eye learns to expect "fine."3 And the Sandia result shows the other side: careful inspectors who catch more defects also throw away more good parts.1
What computer vision quality control gets wrong
It would be easy to stop there and say "so use AI." But the research on machine inspection has its own warnings:
Defect photos are scarce. A good plant makes few defects, so there are few examples to learn from, and labelling them takes skilled people's time. Reviews of the field name small and unbalanced datasets as the main reason deep learning is slow to reach real inspection lines.56
New defects are invisible to a model trained on old ones. This is why one widely used research benchmark, MVTec AD, trains only on defect-free images and asks the model to spot anything unusual.4
Light and angle change everything. A 2023 study built a dataset specifically because changes in lighting and viewpoint between training and real use made leading methods struggle.7 A phone on a clamp sees afternoon sun through a skylight very differently from night-shift tube lights.
And the money is real on both sides. The American Society for Quality says quality-related costs can reach 15–20% of sales revenue in many companies, split across prevention, appraisal (inspection), internal failure (scrap and rework) and external failure (returns and claims).8 It's a broad rule of thumb, not a measurement of this plant, but it shows why a defect caught at the press is cheaper than one caught at the customer.
The aim was never a camera that is never wrong. It was a camera that is wrong in ways a supervisor can see and fix.
03 — How it worksDefect detection AI from camera to batch record
There are six steps. Two are the camera and the model, two are a person, and two are the record that makes the whole thing useful:
The pipeline. Each step is a separate part, so the camera, the model or the database can be swapped without rebuilding the rest.
The camera. On two lines, Floor Vision reads the video stream from CCTV cameras the plant already had, mounted above the conveyor. On a third, a mid-range Android phone sits on a clamp at the end station. Both are fixed, with the inspection zone marked on the belt.
The model. A vision model, which is AI that reads images, draws a box around each part and around anything that looks wrong: a scratch, a dent, a burr on a hole, a missing or offset weld nut. Each box gets a confidence score between 0 and 1, which is how sure the model is. The model runs on a small PC beside the line, so video never has to leave the plant.
The routing. The score decides who looks next. A clear pass goes on down the line. A clear defect is pushed to the red bin and sent to the supervisor's phone. Anything in between, the model's "I'm not sure," is held for a person. The thresholds are the plant's, not mine, and they're set per defect type.
If you've used ChatGPT or Gemini to describe a photo, the model part will feel familiar. The difference is that this one is trained on one plant's brackets, under one plant's lights, and it is only allowed to point, never to decide.
04 — Inside a shiftAI quality inspection with a phone camera and CCTV
Back to the hero screen at the top of this page. It's 14:32 on B shift. Seven parts are on the belt. Four are clean, one has a scratch along the top-right edge, one is missing its weld nut, and one has what might be a dent near the slot. The model is confident about the first six. It isn't sure about the seventh.
At the phone station at the end of the line, the operator sees the same uncertainty in plain words:
The model isn't sure. A score of 0.58 is below the line, so the part is held, not rejected. The prompt is in Tamil, the operators' language, with English underneath.
The supervisor decides. Confirm, release, or go and look at the part. The answer is saved with the photo against the batch.
The supervisor's phone buzzes with each reject: the photo, the model's guess and score, and three buttons. Confirm or release with a tap and a reason, or go and check the part in person if the photo isn't clear. Until they decide, the part stays in the red bin.
Every confirmed defect gets its own page:
vision.tamrindauto.in/review/D-2611-14-0087
One defect, fully traced. The full frame, a zoomed crop, similar confirmed scratches from the same press, and a timeline of who decided what and when.
The row of similar scratches is the most useful part. In the sample data, they sit on the same edge, in the same direction, and they started after a die change on press P2. That isn't something a model "knows." It's something a supervisor notices in five seconds when the photos are lined up side by side.
05 — Design decisionsThe choices that make computer vision quality control trustworthy
A model that rejects good parts gets switched off within a week. A model that silently passes bad ones is worse. Most of the work went into making its mistakes visible and cheap.
A
The supervisor confirms every reject
The model can divert a part to the red bin, but only a person can scrap it. This covers false rejects, which the Sandia study shows are a real cost even for careful humans.1 It also keeps the supervisor in an active role. Sandia's researchers warn that automation can turn an inspector into a passive watcher, and vigilance drops when people only monitor.2 Making a decision on each flag keeps them engaged.
B
Low confidence goes to a human look
Below a set score, the model doesn't guess. The part is held and a person looks at it. This is where most new defect types show up first: the model has never seen them, so it is unsure. A defect it can't name is logged as "Other," never ignored.4
C
A photo for every flag, logged per batch
Every flagged part is saved with its photo, defect type, score, decision, who made it and when, in a Supabase database (an online Postgres database). Each record is tied to the batch, the press and the shift. When a customer calls about a batch, the plant can show exactly what was caught, what was released, and why.
D
It retrains only from confirmed examples
The model learns from photos a supervisor confirmed, and also from the rejects they overturned, which teach it what a good part with a harmless mark looks like. Each new version is tested on a held-back set of the plant's own photos before it goes live, and the old one is kept for rollback. It never retrains itself silently.
E
Bad light pauses the check
Because lighting changes hurt vision models so much,7 the system checks exposure and glare every minute. If the picture gets too dark or too bright, it stops passing parts and tells the line to fall back to manual inspection, rather than quietly guessing.
F
Works with a phone or the CCTV you have
No new camera rig to start. A fixed phone or an existing CCTV camera is enough for visible defects on a slow line. Where a defect is too small or a part too shiny, the honest answer is an industrial camera and lighting. A daily manual sample check, where a person inspects a handful of parts the model passed, keeps everyone honest.
06 — The owner's viewThe trend, not just the reject
vision.tamrindauto.in/batches
The quality head's dashboard. Confirmed defect rate per batch against the plant's target, with the jump after a die change marked. Released flags are shown too, so false rejects can't hide.
The owner doesn't want to watch a camera feed. He wants three answers: is quality getting better or worse, where is it coming from, and is the system crying wolf?
The batch chart answers the first. The defect types and the note under the chart answer the second: in the sample data, scratches on one press rose after a die change, which points the tool room at the die before another week of scrap. The "released by supervisor" number answers the third. If it climbs, the model is flagging too many good parts, and everyone can see it.
The pattern underneath is one I keep coming back to: an AI does the tireless first pass, a person makes the call, and every call is logged. In quoting software I built for a CNC job shop, it's the owner approving prices. Here it's a supervisor approving rejects.
07 — ResultsWhat changed
Real numbers coming soon
The screens above use sample data. This section will show the plant's actual figures:
Defects caught at the line vs found by customers
before → after
Share of model flags released by the supervisor
false-reject rate
Defects missed by the model, from manual sample checks
per 1,000 parts
Time from flag to supervisor decision
median
Customer complaints per month
before → after
Quality head's verdict
quote
08 — What's nextWhere this goes from here
Measurement, not just looks: checking hole positions and nut offsets in millimetres against the drawing, using a calibrated camera.
Earlier warnings: alerting the press operator when one defect type starts creeping up, before the batch goes over target.
Customer reports: a one-click batch report with photos for customers who ask for inspection evidence.
Other lines and plants: the same setup for castings, machined parts, packaging or textiles, anywhere, with a new set of confirmed photos.
FAQQuestions people ask
What is AI visual inspection?
It is a camera plus a vision model that looks at each part on a line and flags anything that looks like a defect, such as a scratch, a dent or a missing component. In a careful setup the model only flags. A person confirms each reject, and every flagged part is photographed and logged.
Can you do AI quality inspection with a phone camera?
Yes, for visible surface defects and missing parts on a line slow enough for a clear photo. A phone on a fixed clamp with steady lighting works well as a first station. Very small defects, shiny parts and fast lines usually need an industrial camera and proper lighting.
How accurate is AI defect detection compared with human inspectors?
There is no single number. Research on human inspectors shows they miss a meaningful share of defects, often 15 to 30 percent on complex tasks12. AI models can be more consistent, but their accuracy drops with changes in light, angle or new defect types7, so measure them on your own parts and keep people checking.
How many defect photos do you need to train a model?
It depends on the part and the defect, and defect photos are scarce because good plants make few defects5. A practical start is a few hundred labelled examples per common defect type, with a person confirming every reject and each confirmed photo added over time.
See, J. E. (2015). Visual inspection reliability for precision manufactured parts. Human Factors 57(8), 1427–1442. doi:10.1177/0018720815602389; record at OSTI. Figures (85% of defective items rejected, 35% of acceptable parts rejected, 82 inspectors, 140 parts) from the published abstract. Nuclear-weapons parts; very cautious inspectors.
See, J. E., Drury, C. G., Speed, A., Williams, A. and Khalandi, N. (2017). The role of visual inspection in the 21st century. Sandia National Laboratories, SAND2017-6457C. Source of the "20% to 30%" figure (citing Drury & Fox, Human Reliability in Quality Control, 1975) and of the point that automation can turn inspection into passive monitoring. I couldn't read the 1975 book directly.
Wolfe, J. M., Horowitz, T. S. and Kenner, N. M. (2005). Rare targets are often missed in visual search. Nature 435, 439–440 (author manuscript). Laboratory study with volunteers, not factory inspectors.
Martin, D., Heinzel, S., Kunze von Bischhoffshausen, J. and Kühl, N. (2021). Deep learning strategies for industrial surface defect detection systems. arXiv:2109.11304. Says deep learning is still rarely used in automated inspection, partly because datasets are small and expensive to label. Preprint.
American Society for Quality, Cost of quality (COQ). Quality-related costs "as high as 15 to 20 percent of sales revenue" in many organisations; poor-quality costs of about 10–15% of operations in a thriving company. A widely repeated rule of thumb with no study named on the page.