| In the field of security inspections,preventing the spread of terrorism and the occurrence of violence has always been a major issue.Commonly used X-ray security devices rely on security personnel to observe security images in the monitor to determine whether there are prohibited items.This type of security inspection relies heavily on the professionalism and working conditions of security personnel.The results of the security inspection are closely related to the staff’s experience,energy,and work attitude.There is a big uncertainty.Therefore,the identification technology for contraband has received great attention in the field of security inspection.Based on the theory of X-ray detection technology,this paper uses a variety of methods to study the pattern recognition of guns and tools.The traditional pattern recognition method adopts a method of manually extracting feature values and then classifying them according to feature values using a classifier.In this paper,the contour moment invariant of the object is selected as the feature to be extracted.The iterative threshold method is used to transform the security image into a binarized image.The Canny edge detection operator extracts the edge of the object,connects the edge to the edge,extracts the contour moment invariant features and uses BP neural network to classify.Aiming at the problem that the traditional pattern recognition method has a high false detection rate,this paper designs a gun and tool detection method based on Faster R-CNN.The algorithm is a candidate frame-based target detection algorithm.The RPN network is used to extract candidate frames,and the Fast R-CNN network judges classification and localization,which improves the robustness of feature extraction and the accuracy of detection.In order to realize the requirements of real-time inspection of firearms and tools by ordinary security inspection devices,the YOLO v3-based gun and tool detection methods were designed and implemented.The algorithm is a regression-based target detection algorithm,which can directly return the target category and border at different positions of the image,and improve the detection speed.This paper builds a test data set for guns and tools(PASCAL-Xray)based on the PASCAL VOC 2007 database.The data set is used to train the gun and tool pattern recognition method,and the performance of the method is evaluated to verify the feasibility of the design method.Based on Faster R-CNN,the mAP of the gun and tool detection method reached 83.4%,and the mAP of the YOLO v3 based gun and tool detection method was 80.3%,and the detection accuracy was higher than the traditional pattern recognition method.The YOLO v3-based gun and tool detection method is faster than the Faster R-CNN-based gun and tool detection method,reaching 45.456 frames per second,enabling real-time detection of guns and tools.The experiment proves the feasibility and effectiveness of the latter two types of gun and tool detection methods designed in this paper. |