We propose a novel AI-based few-shot self-supervised learning method for automatic optical inspection image quality assessmentcomponent detection based on only few training images. Our method iteratively learns the feature representations of the components by using self-similarity of these components. With the large number of self-learned representations, the appearance variations of each component are then effectively learned in the AI model for component detectionmeasurement. The computation complexity of our method is significantly lower than that of deep learning methods.