| Detection of hazardous materials refers to the detection of items or substances in the environment that may clearly endanger human health and safety or cause damage to property.Accurate detection of forbidden objects is important to ensure public safety and promote the harmonious development of society.Traditional forbidden objects detection relies heavily on manual participation and decision making,which has problems such as high labor cost and low detection efficiency.Existing deep learning methods are used in the field of image detection,but deep learning models require a large amount of sample data for training.And the number of samples of forbidden objects inside forbidden objects detection is scarce and difficult to obtain.The use of current deep learning methods for forbidden objects detection may lead to false detection or missed detection situations.Therefore,in this paper,we propose an enhanced prototype-based feature extraction and detection method and a multi-scale adaptive regional attention network detection method using knives and sticks as research objects.The specific research work is as follows:(1)For the problem of few-shot feature extraction difficulties,an augmented prototypebased few-shot knife stick feature extraction and detection method is proposed.First,a basic general prototype is obtained based on the available image information,and based on this prototype,an enhanced prototype based on a regional many-to-many attention mechanism is proposed to improve the feature representation of few-shot images of knife bars.Finally,a region-mixed consistent loss function is designed to maximize the consistency between the enhanced prototype and the common prototype,which facilitates the network to learn invariant object features and improve the efficiency of object detection,thus enhancing the stability of the network.(2)A new multi-scale adaptive regional attention network for few-shot knife and stick detection is proposed for the problem that it is difficult to detect knives and sticks with different scales of samples.First,an involution-based multi-scale generator is proposed,and the generator obtains local features(LRs)for each scale based on the existing images,and the local features can maintain the consistency between known and unknown categories;after that,an adaptive region attention module is designed to select the LRs of the regions with the strongest relevance to the task,while assigning different weights to different LRs,and the features are fusion;finally,a region similarity module is designed to calculate the multiscale similarity between the query image and the support set to optimize the module parameters and make the detection task more accurate.The experimental results of the method in this article on the self-made KS dataset,PASCAL VOC dataset,MS COCO dataset,and three fine-grained small sample datasets(Stanford Dogs,CUB-200,Stanford Cars)show that the detection efficiency of the proposed model and method is nearly 6% better than the existing methods,and the generalization ability of the model and method is strong. |