| With the continuous growth of jewelry testing business year by year,jewelry testing organizations have put forward higher requirements for the level of automated operation of the testing business,especially the realization of the jewelry image target automated detection requirements are more urgent.Therefore,in this paper,we propose a lightweight target detection model based on YOLOv5 s for jewelry images,and use it to complete the detection and extraction of jewelry targets in jewelry traceability for realizing jewelry valuation analysis.The main research works are as follows.(1)The construction of jewelry dataset.The research analyzes the process of jewelry detection,and determines the labels of jewelry image datasets supported by the model according to the international jewelry category division screening;applies Python web crawler technology to obtain jewelry image information,and completes the annotation of jewelry images with the help of annotation tools after pre-processing,similarity detection and deweighting and data enhancement strategies for the images.(2)The selection of YOLOv5 model and its activation function.The training performance of YOLOv5 s and YOLOv5 m on the jewelry dataset is tested,and it is found that the difference between their maps at a lower cross-merge ratio threshold is small.Therefore,YOLOv5 s was chosen as the benchmark model;in addition,the detection speed and performance of Si LU,Leaky Re LU and H-Swish activation function on the YOLOv5 s model in the training set were compared,and it was determined that H-Swish activation function replacement was used to improve the performance.(3)The optimization strategy and experimental comparison of YOLOv5s-based jewelry target detection model.Improved CBAM attention is added to Ghost Bottleneck to form the GC module,which takes into account the model complexity reduction and performance improvement;attention mechanism is introduced to add GC and CBAM-H to the backbone and neck network to achieve light weight and key feature extraction;training strategy optimization,the model training phase is improved by using migration learning and nonmaximal value suppression algorithm.The final construction is YOLOv5s-N,an improved jewelry target detection model based on YOLOv5 s.Experiments show that YOLOv5s-N outperforms YOLOv5 s,m AP@.5:.95 is 81.3%,by the way,the detection speed of the module is boosted better to 152.3 FPS,and the number of parameters is reduced by 35.7%,supporting jewelry target detection.(4)The implementation of target detection-based jewelry traceability system.The network is applied to the jewelry traceability system as a jewelry image target detection module,and the detected jewelry is numbered to the jewelry in the jewelry sample library for similarity detection and output all jewelry information above the specified threshold for traceability analysis result output,reflecting the application value of the jewelry target detection algorithm proposed in this paper. |