| The public security problem has drawn increasing attentions since the London Underground train terror attack in 2017 and Brussels terror attacks in 2016.In order to effectively prevent the occurrence of these kind of terrorist attacks,it is key to automatically and efficiently detect and recognize dangerous equipment in crowded public places.For mixed detection of concealed and exposed dangerous equipment,we design a two-stage detection system to conduct the detection and recognition of dangerous equipment in a nature light image or in a THz image by using deep-learning technology.The first-stage classifier is to detect the dangerous equipment in nature images as well as to pick out the terahertz images.When a input image is classified as a THz image by the first-stage classifier,it is transferred to the second-stage classifier for further processing,in which,the sespected dangerous objects in the THz image are located and segmented at first and then the segmented objects are further classified by the second-stage classifier.In the design of the first-stage classifier,firstly,we use the deep convolutional neural network for feature extraction,and then use the feature to train the BP network of different structures,which is used as classifier.Then convolutional neural network and trained BP network are fine-tuned jointly to further improve classifier performance.We design the second-stage classifier,which is composed of three modules: target location,target classification and decision.The target location module is designed in the paper is to locate and segment the dangerous objects in a terahertz image.And then these segmented sub-images will be fed into target classification module one by one for feature extraction and classification.Finally,the decision module integrates location information and category information to give the final decision.For design of the target location module,first,the method based on the level set is used to segment images in gray-domain.Then we implement spatial-domain segmentation algorithm on the basis of gray-domain segmentation to obtain the segmentation of all dangerous equipment in THz image.In the design of the target classification,the same as the first-stage classifier,firstly,we use the deep convolutional neural network for feature extraction,and then use the feature to train the BP network of different structures,which is used as classifier.Then convolutional neural network and trained BP network are fine-tuned jointly to further improve classifier performance.The designed algorithms of the recognition system are implemented with C++ and Caffe framework based on CPU+GPU platform.The algorithms include the level set segmentation algorithm,the spatial-domain segmentation algorithm,the training of the first-stage classifier and so on.Experimental results given in the paper show that,the top-1 recognition accuracy of the first-stage classifier is 85.68%,and the top-1 recognition accuracy of the target classification module is 98.28%.From the experimental results we can see that,the detection method proposed in this paper can detect and recognize the dangerous equipment in the natural image and THz image. |