Image classification with convolutional neural networks (CNNs)

Blob Storage
Container Registry
Data Science Virtual Machines
Kubernetes Service
Machine Learning

Solution Idea

If you'd like to see us expand this article with more information, such as potential use cases, alternative services, implementation considerations, or pricing guidance, let us know with GitHub Feedback!

Lean manufacturing, cost control, and waste reduction are imperative for manufacturing to remain competitive. In circuit-board manufacturing, faulty boards can cost manufacturers money and productivity. Assembly lines rely on human operators to quickly review and validate boards flagged as potentially faulty by assembly-line test machines.

Potential use cases

Use this solution to automate failure detection instead of relying solely on human operators, and help improve the identification of faulty electronic components and boost productivity.

Architecture

Architecture diagram: image classification with convolutional neural networks and Azure Machine Learning. Download an SVG of this architecture.

Components

  • Azure Blob Storage: Data is ingested and stored in Azure Blob Storage.
  • GPU based Azure Data Science Virtual Machine (DSVM): The core development environment is the Azure Ubuntu-based GPU DSVM. The data is pulled from blob onto an Azure virtual hard disk (VHD) attached to the DSVM. On that VHD, the data is processed, the images are featurized using a deep neural network (DNN), and a boosted tree model is trained. DSVM IPython Notebook server is used for solution development.
    • As an alternative to DSVM-based training, for large datasets, you can use ML Services in Azure HDInsight to build a highly scalable training solution.
  • Azure Container Registry: The model and web application are packaged into a Docker image and written to Azure Container Registry.
  • Azure Machine Learning Model Management (MLOps): Azure Machine Learning uses a Machine Learning Operations (MLOps) approach to deploy and manage the final model on a VM, and to scale out using Azure Kubernetes Service to a Kubernetes managed Azure cluster. In the implementation of this solution idea, a predictive web service and a Java ETL (extract, transform, load) service are also written onto the VM, each in its own container.
  • Azure Kubernetes Service (AKS): Deployment for this solution uses Azure Kubernetes Service running a Kubernetes-managed cluster. The containers are deployed from images stored in Azure Container Registry.

Deploy this scenario

The implementation of the solution idea discussed in this article analyzes electronic component images generated by assembly-line cameras in a circuit-board manufacturing plant and detects their error status. The goal is to minimize or remove the need for human intervention.

The solution builds an image classification system using a convolutional neural network (CNN) with 50 hidden layers, pretrained on 350,000 images in an ImageNet dataset to generate visual features of the images by removing the last network layer. These features are then used to train a boosted decision tree to classify the image as "pass" or "fail" and final scoring conducted on edge machines at the plant. The classification performance results are good (time-based cross-validation AUC > 0.90), which indicates the solution is suitable to drastically minimize human intervention for electronic-components failure detection in assembled circuit boards.

Next steps