# Defect Detection for Wear Debris Based on Few-Shot Contrastive Learning
## 2 Related Works  
Object detection has made great progress in recent years. Previous approaches can be broadly divided into two categories: anchor-based and anchor-free approaches. An anchor-based approach incorporates an anchor as prior information, and such approaches can be subdivided into one-stage models and two-stage models. The common one-stage models include YOLO [12], RetinaNet [13], etc. Common two-stage models include Faster RCNN [14], etc. An anchor-free approach replaces anchors with reference points that are obtained through prediction/regression, and common anchor-free models include CentreNet [15], FCOS [16], etc. General detectors fail to establish robust feature representations from limited shots, resulting in the mislabeling of localized objects and a low average precision. Few-shot learning addresses such issues, and several approaches have been studied.  
Over the last few years, few-shot learning has been widely used in the field of object detection. [PERSON] et al. [1] proved that a model that was trained with a base dataset and fine-tuned with a novel dataset could also achieve good accuracy. On this basis, [PERSON] et al. [2] used multi-scale positive samples to adjust the features of the proposal. [PERSON] et al. [3] utilized contrastive learning to constrain the distance of sample pairs in projection space. In this area, [PERSON] et al. [4] firstly proposed a two-branch method that consisted of twin networks that shared weights, where each respective network was fed with a support image and a query. Its detector needed to match image features from two branches. This matching strategy captured the inherent variations between the support and query regardless of their categories. Their two-branch method contained positive and negative pairs, and the learning form used for the sample pairs made the model converge quickly. One of the key issues in this line of research is that of making full use of the information of the support branch. Subsequent works exploited a delicate module [5; 6; 7; 8; 9] or transformer [17; 18] to enhance the feature embedding from the query and support branches.  
In the field of industrial defect detection, a complicated background brings a greater challenge to the model. Wear debris was classified using traditional features, such as the LBP and Tamura coarseness features, by [PERSON] et al. [19]. [PERSON] et al. [20] proposed a hybrid search-tree discriminant technique to conduct an analysis of wear debris. An automatic wear particle detection and classification process was developed in [21] by using a cascade of two convolutional neural networks and a support vector machine (SVM) classifier. [PERSON] et al. [22] proposed a pre-classification and cascade detection framework to detect welding defects. [PERSON] et al. [23] combined traditional features and CNN features to fulfill digit number detection at an industrial site. A few methods implemented few-shot learning for industrial defect detection. [PERSON] et al. [24] added an ECA module and transformer module in order to deal with few-shot defect detection tasks by enhancing the diversity of the defect shapes and scales. [PERSON] et al. [25] applied a two-branch model for defect classification. [PERSON] et al. [26] utilized few-shot learning for defect segmentation.  
Severe sliding is infrequent in production, so the number of severe defects is quite small. It is necessary to conduct a study of few-shot wear debris defect detection.