Manufacturing machine vision: detect defects before shipment
The camera sees the surface. The system saves the proof. The operator makes a controversial decision.
Modelled engineering case. Developed by ITTECHE to analyze architecture and solutions. Company, educational data and calculations; the confirmed result of client implementation is not declared.
Add traceable control: associate the frame with the product, highlight the suspicious area and transfer the ambiguous case to the operator. The circuit must remain operational without constant access to the cloud.
Go to demo
From the business task
to a verifiable solution.
The model department produces metal flanges. The operator checks the surface and geometry with limited time per product. Scratches, cracks and processing marks are easily confused; the highlights change after changing the equipment. A simple pass/fail classifier is not enough for this process.
- products in a synthetic sample
- 1 000
- known defective products
- 40
- threshold for comparison
- 3
- inference next to the camera
- Edge
- 01
Fix the product
The sensor starts shooting, and the controller transmits the product and batch identifier. A frame without an identifier is not considered a completed check.
- 02
Check frame quality
Sharpness, exposure and detail position are checked before the model. Light exposure or incomplete detail means re-shooting or manual inspection.
- 03
Show alarm reason
The local model returns the area and signal level of the defect. The operator sees the original frame, the area of attention and the model version.
- 04
Close feedback
The employee's decision and the reason for the revision are included in the party journal. New examples are marked and separately tested before the next training.
How many errors does the threshold hide?
Synthetic sample: 1,000 products, of which 40 are defective and 960 are suitable. Signal levels are preset; the recognition model does not run in the browser. Change the threshold and compare the gaps with the scan load.
- Found defective
- 37 out of 40
- Missed defective ones
- 3 out of 40
- False alarms
- 19 out of 960
- To be checked by the operator
- 56 out of 1,000
Completeness of defect detection: 92.5%. Share of real defects among alarms: 66.1%.
| System Result | Marking defect | Suitable for markings |
|---|---|---|
| Defect signal | 37 | 19 |
| No signal | 3 | 941 |
A high threshold reduces the number of alarms but may miss more defects. The signal in this demonstration is conditional scoring, not probability. The threshold for the line is selected after checking the classes of defects and the cost of errors.
What data did the numbers come from?
Four prepared groups. The signal goes up if the scoring is not below the selected threshold. Completeness = defect found / 40. Proportion of confirmed defects = defect found / all alarms. This is an arithmetic analysis, not a measured model accuracy.
| Scoring | Defective | Fit |
|---|---|---|
| 0.15 | 1 | 893 |
| 0.45 | 2 | 48 |
| 0.65 | 7 | 14 |
| 0.9 | 30 | 5 |
From measurement -
to an explicable action.
- 01
Camera and light
Fixed optics, shutter speed and backlight; image quality control.
- 02
Industrial PC
Preprocessing, local ONNX inference and queue in case of network loss.
- 03
Workplace
Frame, defect area, batch and operator decision in one event.
- 04
MES/magazine
Validated result, model version and idempotent delivery.
Infrastructure, storage and integration periods are clarified during the survey. The event's identifier, time, source data, model version, and decision are saved.
The difficulty lies in the conditions
errors and verification.
Threshold for the cost of error
Overall accuracy increases as you raise fewer alarms. With rare defects, this can hide the growth of missed defects.
- Solution
- Compare the completeness of defect detection, the number of false alarms and the workload of manual inspection. The working threshold is selected by the technologist based on the agreed cost of errors.
- How to check
- Separate inspection by types of defects, shifts and batches. Adjacent frames of the same product are not distributed between training and testing.
Accelerate without losing control
A model that is fast on a workstation may not keep up with the line clock on an industrial PC.
- Solution
- Measure the complete path from the trigger to the result on the target equipment. Include quantization only after comparing errors with the original model.
- How to check
- p95 delays, maximum queue and quality on the same control sample. Acceleration is not assumed in advance.
Drift and equipment failure
A new surface, dust on the lens, or loss of communication will change the input regardless of the quality of the training.
- Solution
- Observe the quality of frames and the percentage of revisions, store model versions and shooting recipes. Transfer the unprocessed product to the manual control provided for by the regulations.
- How to check
- Checking for new batch, exposure, part displacement and MES unavailability. The model does not replace hardware line blocking.
What needs to be confirmed
on real data.
Labeling and independent sampling
The technologist sets classes of defects and borderline examples. Controversial images are dealt with separately. Test batches are fixed until the threshold is adjusted.
Metrics with a clear denominator
Completeness: found defective / all defective. Alarm accuracy: confirmed defect / all alarms. Additionally, passes for each class, the proportion of bad frames and the operator check time are calculated.
Operating in parallel with existing control
The first pilot only records signals and decisions. The transition to influencing the process is discussed after checking the quality and failure regulations. The interactive numbers below are not the results of such a pilot.
Path from survey to transmission
- 01
Optics and problem boundaries
Defect samples, light and camera testing, required tact and cost of each mistake.
- 02
Data and Base Model
Marking protocol, batch division, first model and reproducible stand.
- 03
Pilot next to the line
Local inference without automatic rejection, decision log and failure testing.
- 04
Reception and transfer
Threshold, stopping criteria, model rollback, access rights and operator instructions.
This is a sequence of work, not a promise of a deadline or budget. The assessment comes after checking the source data and integrations.
Where a solution is required
a different approach.
- A conventional surface camera does not detect internal defects. They require a different control method.
- The appearance of the new material requires verification; a confident signal from the model does not guarantee the correctness of the decision.
- Cycle times and sufficiency of accuracy are confirmed on the target line, not by demonstration figures.
Let's start with the data
and acceptance criteria.
For the first discussion the following are useful:
- Samples of suitable products and defects with a technologist’s conclusion.
- Line timing, shooting conditions and material/equipment options.
- Rules for manual verification, access to frames and storage of images.
- MES test interface and acceptance person.