Computer vision for defect detection
Detect, segment, and measure scratches, cracks, stains, and print defects with Ultralytics YOLO, trained on your own defect images in Ultralytics Platform and licensed for your product.
Trusted by the world's leading organizations
Built for teams that ship defect detection
Ultralytics provides the models, tools, and license. You build your inspection system, from optics to reject gate.
Inspection machine makers
Embed YOLO in the AOI, X-ray, web, and surface inspection machines you sell, and train it on each customer's parts.
Vision integrators
Deliver defect inspection cells for metal, glass, plastics, textiles, and food lines on standard industrial cameras, fully on-premises.
In-house quality teams
Build defect models for your own plants, reuse what one line learns on other lines, and train locally to keep images and weights inside your network.
RapiD Engineering deploys seafood quality control 1 week faster with Ultralytics YOLO
See how RapiD Engineering uses Ultralytics YOLO to automate salmon inspection, detect defects in real time, and save a week of engineering work.

How it works
From defect images to a reject decision at the line.
Capture the flaw
Choose optics, lighting, and image resolution that make your smallest target defect visible, on area-scan, line-scan, X-ray, or thermal cameras.
Label real defects
Upload images to Ultralytics Platform and outline scratches, cracks, and stains with AI-assisted annotation.
Train and set thresholds
Fine-tune YOLO detection or segmentation, then set per-class thresholds that balance escapes against false rejects on a golden set.
Run at the line
Export to TensorRT, OpenVINO, or ONNX, run on the edge PC beside the line, and send pass, fail, or rework to the PLC.
Computer vision tasks for defect detection
Five YOLO tasks in one model family, trained on your defect images and deployed the same way.
Try YOLO26 inference
Drag and drop an image to see real-time object detection
Why teams build on Ultralytics YOLO
Your weights, your images, and your hardware, with no per-image API fees.
Own the model
Keep the trained weights and run them on your lines, plants, or machines under your license, with no hosted service or camera vendor in between.
Any image you capture
Train on area-scan, line-scan, X-ray, thermal, or UV images. YOLO learns what your sensor sees.
Runs beside the line
Export to TensorRT, OpenVINO, ONNX, and more for NVIDIA Jetson, industrial PCs, or CPUs. Images never have to leave the plant.
Two ways to start
Train and deploy on Ultralytics Platform, or add YOLO to your own pipeline.
Ultralytics Platform
Upload defect images from your line, outline flaws with AI-assisted annotation, train a custom YOLO model, and export it for your edge hardware, all in one place.
UploadLabelTrainDeploy
Get startedPython package
Train a segmentation model on crack images, or your own defect images, in a few lines. License YOLO to ship it in your own product.
pip install ultralyticsfrom ultralytics import YOLO
model = YOLO("yolo26n-seg.pt")
# Train on crack images, or your own defect photos
model.train(data="crack-seg.yaml", epochs=100)
results = model("part.jpg") # masks outline the cracks it finds
print(len(results[0].boxes)) # defects found on this partShipping YOLO in a commercial product? An Enterprise License removes AGPL-3.0 obligations.
License YOLOEnterprise-grade security and compliance
Build and deploy with confidence. ISO 27001 certified, SOC 2 attested, with support for HIPAA compliance.
Frequently asked questions
YOLO learns from labeled examples, so collect real defects for each class. Start from pretrained weights with the images you have, label them quickly with AI-assisted annotation in Ultralytics Platform, and add examples as new defects or escapes appear. For scale, RapiD Engineering trained its salmon defect models on more than 20,000 labeled images.
The smallest detectable defect depends on optics, lighting, image resolution, and the trained model. Use representative defects to choose the capture resolution, then evaluate larger model inputs or overlapping windows with high-resolution tiling. Line-scan cameras suit continuous webs such as film, paper, and textiles.
Divide 60,000 by your parts per minute to get a time budget in milliseconds per part, then choose the model size and hardware to fit. Inference latency varies by YOLO26 model, Jetson device, input size, and precision (benchmarks), so include pre- and post-processing when you measure the complete pipeline against your timing budget. Strobed lighting and short exposures keep fast parts sharp.
Validate on a fixed golden set of good and defective parts, and report two numbers per defect class: escape rate and false-reject rate. Set each class's confidence threshold to your trade-off, send the low-confidence band to human review, and retrain on every escape.
It can. Run YOLO as a second pass on the images your AOI rejects and classify each call as a real defect or a false call, then measure how many good parts it keeps out of manual review.
No. You or your integrator build and own the system, including optics, lighting, and reject handling. Ultralytics provides the YOLO models, Ultralytics Platform to train them on your defects, and the commercial license.
Inference runs on your own hardware beside the line, offline if needed, so images never have to leave the plant, and you keep the trained weights. If you train in Ultralytics Platform, choose a US, EU, or AP data region.
Ultralytics YOLO is open source under AGPL-3.0, so you can prototype freely. To ship it in a closed-source inspection machine, or to run it in your own plant systems without open-sourcing them, an Enterprise License removes the AGPL obligations. Enter your work email above to get a quote.
More use cases

Visual inspection

Retail loss prevention

Driver monitoring

Document processing

Inventory management

Queue management
Your vision, realized
Join millions of developers building scalable solutions for smart use cases across industries. Annotate, train, and deploy — all from Ultralytics platform.



