Stop 21 · Build AI Engineer Portfolio ProjectsProjects · 5/8

Computer Vision App (e.g. Defect Detection)

Part of the AI Engineer Roadmap

In short

Another cats-vs-dogs classifier won't stand out. A model that spots cracks on real parts, with a demo app someone could actually use on a factory line, tells a much better story.

A vision project solving a concrete, real-world classification or detection problem — stronger for a portfolio than another generic image classifier.

The purple blob picks a cracked biscuit off a conveyor belt with tweezers.

Think of it like this

The biscuit factory checker

On a biscuit line, a checker watches hundreds of biscuits roll past and picks out the cracked ones. She must not miss broken ones, but she also can't throw away half the good batch. Your vision model is that checker, and you decide how strict it should be.

Watch it happen

The build plan

Collect
Label
Train
Threshold
Demo app

1/5Use a public defect dataset like MVTec AD, or photograph real items under similar lighting.

The big ideas

What you need to know

A concrete problem

Name who would use it and what a mistake costs. "Spot cracked tiles before packing" beats "image classifier".

Defects are rare

With 98% good parts, a model that says "good" every time gets 98% accuracy. Report recall on defects instead.

Lighting and angles matter

Test on photos taken differently from training. Real factory and phone photos are messier than datasets.

A demo anyone can try

A hosted app with sample images lets a recruiter test it in 30 seconds. That's your best advert.

See it in code

Walk through the code

python
1from ultralytics import YOLO2 3model = YOLO("yolov8n.pt")            # small pretrained detector4model.train(data="defects.yaml", epochs=50, imgsz=640)5 6results = model("new_part.jpg", conf=0.4)  # ignore detections below 40% confidence7for box in results[0].boxes:8    cls = results[0].names[int(box.cls)]9    print(cls, round(float(box.conf), 2), box.xyxy.tolist())

1/3Start from pretrained weights. Training only adapts them to your defect classes.

Fine-tune a small pretrained detector on your labelled defects, then run it on a new photo. defects.yaml lists your image folders and class names.

Save yourself the pain

Common mistakes

Oops

Reporting overall accuracy on a dataset where almost every part is fine.

Do this instead

Report precision and recall for the defect class, plus a confusion matrix. That's what a quality manager cares about.

Oops

Testing only on images from the same batch and camera as training.

Do this instead

Keep a test set from different lighting or a different day. Show how much the score drops.

Your mission

Milestone one: a first detector

~45 min

Quick check

Only 2% of parts are defective. Your model labels every part "good". What's its accuracy?

Go deeper

  1. 1Find or build a dataset for a specific real-world vision problem.
  2. 2Fine-tune a pretrained backbone and deploy the model behind a simple upload-and-predict UI.
  3. 3Report performance honestly, including failure cases on hard examples.

More projects at this stop

Stuck on this topic? Ask an Insider

Get 1:1 guidance from people who've walked this exact path — on the InsideEdge app.

Download
InsideEdge