摘要

Lens blemish detection is an important link in camera module production. Automatic blemish detection for camera module Lens is a challenging task, owing to sparse defect data, fast product update and low contrast between blemish and background. In this paper, A types of lens blemish detection models of camera module, named SA-LensNet, is developed using global average pooling (GAP) and Self-attention Mechanism, based on neural network visualization. The models developed are based on convolutional neural networks (CNN), and a class activation map (CAM) technique is applied to localize blemish regions without using region-level human annotations based on CNN classification network. The model has accuracy of 99% and recall of 98.7% in the module lenses classification (with and without blemish), localizing exact defect regions of blemish as well. Comparative experiments of several methods show that the proposed model has strong robustness and generalization ability for the detection of blemish.