Vision QC for Bottle and Can Defects

Vision QC for Bottle and Can Defects

ISEF Category: Engineering Technology: Statics and Dynamics

Ready to Turn This Idea Into a Real Project?

This guide was put together with the help of AI research tools to give you a solid starting point. But a competitive science fair project lives in the details: refining your research question, fine-tuning your variables, analyzing your data, and presenting your findings like a seasoned scientist.

For next steps tailored to your interests, skill level, and timeline, work one-on-one with a MehtA+ mentor. Learn more about MehtA+ Science & Engineering Research Mentorship →

Subcategory: Industrial Engineering-Processing  ·  Difficulty: Advanced  ·  Setup: School Lab  ·  Time: Full Year

The Hook

A factory can lose money from one bad label or one underfilled bottle. Cameras can catch those errors faster than tired eyes. Your project asks a sharp question, can a small vision system beat human inspectors on real packaging defects?

What Is It?

This project uses computer vision to inspect packaged products. You train a small object detection model, like YOLO-nano, to find defects such as low fill level, crooked labels, missing labels, or damaged packaging. Think of it like teaching a tiny digital inspector what “normal” looks like and then asking it to flag anything off.

The key idea is simple. The system sees an image, looks for patterns, and decides whether the package passes or fails. You then compare those decisions with human inspectors. That lets you measure accuracy, false positives, false negatives, and inspection speed in a clean, practical way.

This topic sits at the intersection of engineering and quality control. It connects to how food, beverage, and personal care companies reduce waste and protect customers.

Why This Is a Good Topic

This makes a strong science fair topic because you can test it with real data and clear scores. You can measure how well the system finds defects, how often it misses them, and how it compares with people doing the same job. The project also connects to manufacturing, where small inspection mistakes can cost time and money. You can learn image labeling, model evaluation, experimental design, and basic statistics without needing a university lab.

Research Questions

  • How does lighting consistency affect defect detection accuracy for fill-level and label checks?
  • What is the effect of camera angle on false negative rates for damaged labels?
  • Does training on one package type transfer to a different package shape or material?
  • To what extent does YOLO-nano outperform human inspectors on speed per item?
  • Which defect type, low fill level, crooked label, missing label, or surface damage, produces the most classification errors?
  • How does adding synthetic image augmentation change precision and recall on unseen packages?

Basic Materials

  • Raspberry Pi or similar single-board computer with power supply.
  • USB webcam or Pi camera module.
  • Assorted soda cans and shampoo bottles for inspection samples.
  • Tape, paper, or removable stickers to create label defects.
  • Digital kitchen scale with 0.1 g accuracy for checking fill-related proxies.
  • Fixed stand or tripod for the camera.
  • Uniform LED desk lamp or light box.
  • Laptop for data labeling and model training.
  • Spreadsheet software for recording ground truth and results.

Advanced Materials

  • Raspberry Pi 4 or 5 with camera interface or USB 3.0 support.
  • Industrial-style USB machine vision camera.
  • Controlled LED lighting rig with diffuser panels.
  • Calibrated reference cards or size targets for image normalization.
  • 3D-printed fixture for repeatable package placement.
  • Laptop or workstation with a GPU for training.
  • OpenCV-compatible capture hardware.
  • NIST-traceable scale or calibrated balance for reference measurements.
  • Multiple package lines or SKUs for transfer testing.
  • Annotation station with dual monitors for labeling review.

Software & Tools

  • Python: Runs image capture, data cleaning, and model evaluation scripts.
  • OpenCV: Handles camera input, cropping, color checks, and image preprocessing.
  • LabelImg: Lets you draw bounding boxes for training images.
  • Ultralytics YOLO: Trains and tests a small object detection model.
  • ImageJ: Measures visible fill height, label alignment, and color change in sample images.
  • Google Sheets: Tracks ground truth labels, predictions, and confusion matrix counts.

Experiment Steps

  1. Define the defect types you will detect, and keep them narrow enough to score by hand.
  2. Collect a balanced image set with the same packaging seen under controlled conditions and known defect states.
  3. Label each image carefully, and decide what counts as a true positive, false positive, and false negative before training.
  4. Build a baseline model, then choose one variable to test first, such as lighting, camera angle, or image augmentation.
  5. Create a fair evaluation plan that compares the model against human inspectors on the same test set.
  6. Analyze precision, recall, F1 score, and inspection speed so you can judge both quality and practicality.

Common Pitfalls

  • Training on only one brand of bottle or can, which makes the model fail on new packaging.
  • Changing the light between image sessions, which shifts color and contrast enough to break consistency.
  • Labeling vague defect boundaries, which creates noisy training data and weak model performance.
  • Testing on images that also appeared in training, which inflates accuracy and hides real errors.
  • Ignoring class imbalance, which lets the model look good while missing rare defects.

What Makes This Competitive

A competitive project would not stop at basic accuracy. You would test whether the system works across different package shapes, lighting setups, and defect types, then report precision, recall, and confusion patterns. Strong projects also compare the model with human inspectors under the same conditions and show where each one fails. If you add a transfer test or a careful error analysis, your work looks much closer to real industrial quality control.

Project Variations

  • Test whether the same vision system can detect fill-level errors in clear plastic bottles versus opaque cans.
  • Compare a color-based rule system with YOLO-nano to see which one handles label defects better.
  • Measure how defect detection changes when you move from single-item inspection to a simple conveyor-style workflow.

Learn More

  • MIT OpenCourseWare: Search for computer vision and machine learning lectures that explain image classification, object detection, and evaluation metrics.
  • NIH PubMed: Search review articles on quality inspection, machine vision, and defect detection in manufacturing.
  • OpenCV Documentation: Find tutorials on image capture, preprocessing, and contour analysis.
  • Ultralytics Documentation: Read the YOLO guides for training, validation, and inference on custom datasets.
  • NIST: Search for measurement quality, calibration, and inspection standards related to manufacturing and metrology.
  • IEEE Xplore: Look for peer-reviewed papers on vision-based quality control and industrial inspection methods.
Shopping Cart