Inspiration

Industrial quality control is essential for maintaining product quality, reducing waste, and ensuring customer satisfaction. However, traditional visual inspection can be time-consuming, costly to scale, and susceptible to human error.

SmartInspect-AI was created to explore how artificial intelligence and computer vision can improve industrial inspection by learning normal product patterns and identifying unusual visual features that may indicate defects.

Our vision is to make AI-powered visual inspection more accessible, efficient, and interpretable for manufacturing applications.

What It Does

SmartInspect-AI is an AI-powered industrial anomaly detection system built using the PatchCore approach.

The trained model analyzes product images, compares their visual features against learned representations of normal products, and generates predictions to help identify potential anomalies.

Key capabilities include:

  • Automated Image Inspection: Processes product images through a trained anomaly detection model.
  • PatchCore-Based Detection: Uses deep visual features and a memory bank of normal patterns to identify unusual image regions.
  • Image Classification: Assigns inspection statuses such as NORMAL or DEFECTIVE based on the model's prediction.
  • Anomaly Scoring: Produces numerical scores associated with image predictions.
  • Anomaly Heatmaps: Supports visualizing regions that may contain unusual patterns, helping users interpret potential defects.

The current implementation includes an inference pipeline that processes test images and reports their predicted inspection statuses and scores.

Systematic evaluation on previously unseen images remains a necessary next step for measuring the model's generalization and reliability.

How We Built It

SmartInspect-AI was developed using Python and a modular machine learning workflow.

Technologies

  • Python: Core application logic and inference pipeline.
  • PyTorch: Deep learning operations and feature processing.
  • NumPy: Numerical computation and array manipulation.
  • PatchCore: Feature-based visual anomaly detection.

Workflow

  1. Prepare normal product images for model training.
  2. Extract deep visual representations from image regions.
  3. Build a memory bank of representative normal features.
  4. Load test images into the inference pipeline.
  5. Compare image features against learned normal representations.
  6. Calculate prediction scores and assign inspection statuses.
  7. Generate anomaly visualizations to support the interpretation of unusual patterns.

The project uses a modular code structure to separate model inference, image processing, and supporting utilities, making future improvements easier to implement.

Challenges We Ran Into

1. Project Structure and File Paths

Managing nested directories and relative paths required careful configuration to ensure that scripts could locate the appropriate images, modules, and model resources.

2. Environment and Dependency Management

Configuring the Python environment involved troubleshooting package dependencies, activation settings, and configuration utilities such as PyYAML.

3. Building a Reliable Inference Pipeline

Image preprocessing, data type consistency, and exception handling were important considerations when processing images through the trained model.

4. Interpreting Model Predictions

Anomaly scores and heatmaps can highlight unusual visual patterns, but these patterns do not automatically confirm manufacturing defects. Further testing is necessary to determine how reliably the model identifies meaningful anomalies.

What We Learned

Developing SmartInspect-AI provided practical experience in industrial computer vision, unsupervised anomaly detection, and machine learning engineering.

We explored how PatchCore uses deep visual representations and a memory bank to identify deviations from normal product appearance.

We also strengthened our skills in Python project organization, dependency management, debugging, and inference pipeline development.

One of our most important lessons was that building a trained model is only part of developing a reliable AI system. Testing on unseen images and evaluating predictions are essential steps toward practical deployment.

What's Next for SmartInspect-AI

Our next development goals include:

  • Unseen-Image Testing: Evaluate the model on product images excluded from training.
  • Performance Evaluation: Measure detection performance using appropriate metrics and representative test data.
  • Interactive Dashboard: Develop a Streamlit-based interface for uploading images and viewing inspection results.
  • Visual Anomaly Analysis: Improve heatmap presentation to make unusual regions easier to interpret.
  • Multi-Category Inspection: Explore applications involving bottles, cans, packaged food, and electronic components.
  • Edge Deployment: Investigate efficient inference on resource-constrained industrial devices.

Project Vision

SmartInspect-AI explores how computer vision can support more consistent and scalable industrial quality inspection.

By learning normal product patterns, analyzing test images, and highlighting potential anomalies, the project aims to provide a foundation for AI-assisted inspection that helps human inspectors identify products requiring further review.

Built With

Share this project:

Updates

Submission history