We are getting more involved in AI enabled services. Apart from enjoying daily life using AI in social mediamatchingand entertainment recommendation, we can make use of AI more actively in product design and manufacturing environment. Recent advance in computer vision integration and established AI models allow a faster and progressive implementation. In this article, I will recommend a practical direction in industrial implementation using simple camera, cloud AI training and deployment from cloud to edge approach.
Defining your main problems.
In any product design we will go through proof-of-concept phase with a number of defects being identified and classified. You may focus on a major defect and a number of minor defects. Similarly, when you migrate your design into initial production, you may encounter higher counts of known defects and also identify new defects. The key is to categorize defects and prepare sufficient defect sample for each defect and create a dataset. As a norm the count from 50 to 200 sample size will be sufficient to train a good AI model for one defect.
“The key is to categorize defects and prepare sufficient defect sample for each defect and create a dataset”
Preparing your dataset
To be agile, we can apply ready to use appropriate AI model for direct training. Not everyone is AI engineer, and we can apply what have been done. CNN, convolution neural network, is usually the best AI technique working with computer vision inputs. Images can be taken by any IP camera with fixed or tuneable focus. What we need to train a model are at 416x416RGB images, which are just no more than 170k pixel level after scaling of incoming images. Of course, the camera can be upgraded to be electronic microscope if tiny bonding pads and wires are the inspection points.It won’t take more than one day for this taking sample images when the right camera is ready. Note that around 20 percent of samples shall be marked as testing dataset which shall not be used to train the AI model.
Tagging your dataset
There can be a set of defect categories for your design or product, and a name shall be given to each category. Usually, a rectangular box shall be assigned to each defect region on the sample image as a result of specifying two coordinates on the given image. Multiple defects of same or different categories of defects can be marked simultaneously. We call this process as “boxing” to define the region and “tagging” to assign the defect category. With this information ready, the dataset is ready to train the AI model.
Train your model
In June 2020, YOLOv5 was released, and this CNN-based model is fast and easy to use.