[go: up one dir, main page]

CN112884085A - Method, system and equipment for detecting and identifying contraband based on X-ray image - Google Patents

Method, system and equipment for detecting and identifying contraband based on X-ray image Download PDF

Info

Publication number
CN112884085A
CN112884085A CN202110360744.4A CN202110360744A CN112884085A CN 112884085 A CN112884085 A CN 112884085A CN 202110360744 A CN202110360744 A CN 202110360744A CN 112884085 A CN112884085 A CN 112884085A
Authority
CN
China
Prior art keywords
contraband
image set
detection
training
preset
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110360744.4A
Other languages
Chinese (zh)
Inventor
刘杰
张树武
郑阳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Institute of Automation of Chinese Academy of Science
Original Assignee
Institute of Automation of Chinese Academy of Science
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Institute of Automation of Chinese Academy of Science filed Critical Institute of Automation of Chinese Academy of Science
Priority to CN202110360744.4A priority Critical patent/CN112884085A/en
Publication of CN112884085A publication Critical patent/CN112884085A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/25Fusion techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V2201/00Indexing scheme relating to image or video recognition or understanding
    • G06V2201/07Target detection

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Physics & Mathematics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • General Engineering & Computer Science (AREA)
  • Evolutionary Computation (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Computational Linguistics (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Quality & Reliability (AREA)
  • Image Analysis (AREA)

Abstract

本发明属于计算机视觉目标检测与识别领域,具体涉及了一种基于X光图像的违禁物品检测识别的方法、系统及设备。所述方法包括:根据预设违禁品细化类别信息确定目标图像集;对所述目标图像集进行数据源扩充预处理得到训练图像集;将所述训练图像集输入至检测识别训练模型进行训练以得到检测识别网络模型;将待检测X光图像输入至所述检测识别网络模型得到待检测X光图像中各检测区域的置信度检测值;将在预设置信区间的置信度检测值对应的检测区域确定为违禁品区域。本发明大大提高了检测准确率。

Figure 202110360744

The invention belongs to the field of computer vision target detection and recognition, and in particular relates to a method, system and device for detecting and identifying prohibited items based on X-ray images. The method includes: determining a target image set according to preset refined category information of contraband; performing data source expansion preprocessing on the target image set to obtain a training image set; inputting the training image set into a detection and recognition training model for training In order to obtain the detection and recognition network model; input the X-ray image to be detected into the detection and recognition network model to obtain the confidence detection value of each detection area in the X-ray image to be detected; The detection area is determined to be a contraband area. The invention greatly improves the detection accuracy.

Figure 202110360744

Description

基于X光图像的违禁物品检测识别方法、系统及设备X-ray image-based detection and identification method, system and device for prohibited items

技术领域technical field

本发明属于计算机视觉目标检测与识别技术领域,具体涉及了一种基于X光图像的违禁物品检测识别的方法、系统及设备。The invention belongs to the technical field of computer vision target detection and identification, and particularly relates to a method, system and device for detecting and identifying prohibited items based on X-ray images.

背景技术Background technique

行李的安全检查是公安安全防御的一道非常重要的防线,通过对行李的透视扫描,可以及时发现藏匿在行李中的安全隐患。长期以来,在公共场所的枪支刀具等违禁物品的检测识别问题上,大多是利用肉眼对X光安检图像里面的违禁物品进行检测识别。由于行李中的物品摆放密集且存在重叠等不同情况,给安检的工作带来了一定的困难,并且安检人员长期在一个高压的环境中很容易出现错检、漏检现象的发生。即使是专业素质过硬的安检人员也难免发生一些失误,从而造成严重的安全隐患问题。因此,有必要构造一套智能检测识别系统辅助安检人员的工作,提高工作效率。Luggage security inspection is a very important line of defense for public security. Through perspective scanning of luggage, hidden safety hazards can be discovered in time. For a long time, in the detection and identification of prohibited items such as guns and knives in public places, most of the prohibited items in X-ray security inspection images are detected and identified with the naked eye. Due to the dense arrangement and overlapping of the items in the luggage, it brings certain difficulties to the security inspection work, and the security personnel are prone to wrong inspections and missed inspections in a high-pressure environment for a long time. Even the security inspectors with excellent professional quality will inevitably make some mistakes, which will cause serious hidden safety problems. Therefore, it is necessary to construct a set of intelligent detection and identification system to assist the work of security inspectors and improve work efficiency.

目前,现有技术中一般都以高性能图像处理器作为基础,采用人工智能深度学习算法对X光安检图像进行智能检测。At present, the prior art is generally based on a high-performance image processor, and an artificial intelligence deep learning algorithm is used to intelligently detect X-ray security images.

但是,由于不同的X光机厂商的机器穿透能力不同,所拍摄的X光图像数据在表现形式上和特征分布上会存在一定的偏差。同时违禁物品在不同的X光图像中也会呈现不同的大小和形状,进一步增加了检测与识别的难度,进而导致检测与识别准确率较低。However, due to the different penetration capabilities of different X-ray machine manufacturers, there will be certain deviations in the expression and feature distribution of the captured X-ray image data. At the same time, contraband items will show different sizes and shapes in different X-ray images, which further increases the difficulty of detection and identification, resulting in low detection and identification accuracy.

发明内容SUMMARY OF THE INVENTION

为了解决现有技术中的上述问题,即检测识别准确率低的问题,第一方面本发明提供了一种基于X光图像的违禁品检测识别的方法,包括以下步骤:In order to solve the above-mentioned problems in the prior art, that is, the problem of low detection and identification accuracy, in a first aspect, the present invention provides a method for detecting and identifying contraband based on X-ray images, comprising the following steps:

根据预设违禁品细化类别信息确定目标图像集;Determine the target image set according to the refined category information of the preset contraband;

对所述目标图像集进行数据源扩充预处理得到训练图像集;Performing data source expansion preprocessing on the target image set to obtain a training image set;

将所述训练图像集输入至检测识别训练模型进行训练以得到检测识别网络模型;Inputting the training image set to a detection and recognition training model for training to obtain a detection and recognition network model;

将待检测X光图像输入至所述检测识别网络模型得到待检测X光图像中各检测区域的置信度检测值;Inputting the X-ray image to be detected into the detection and identification network model to obtain the confidence detection value of each detection area in the X-ray image to be detected;

将在预设置信区间的置信度检测值对应的检测区域确定为违禁品区域。The detection area corresponding to the confidence detection value in the preset confidence interval is determined as the contraband area.

可选地,所述根据预设违禁品细化类别信息确定目标图像集包括:Optionally, the determining of the target image set according to the preset refined category information of contraband includes:

获取违禁品图像集;Get a collection of contraband images;

在所述违禁品图像集中筛选与预设违禁品细化类别信息一致的图像作为目标图像集。The images that are consistent with the preset refined category information of contraband are selected from the contraband image set as the target image set.

可选地,所述获取违禁品图像集包括:Optionally, the obtaining a set of images of contraband includes:

获取第一违禁品图像集;Get the first set of contraband images;

和/或获取第二违禁品图像集;所述第一违禁品图像集为含有违禁品的X光图像集;所述第二违禁品图像集为违禁品单独图像集;and/or acquiring a second set of images of contraband; the first set of images of contraband is an X-ray image set containing contraband; the second set of images of contraband is a set of separate images of contraband;

所述在所述违禁品图像集中筛选与预设违禁品细化类别信息一致的图像作为目标图像集包括:The selection of images consistent with the preset refined category information of contraband in the contraband image set as the target image set includes:

在所述第一违禁品图像集中筛选与预设违禁品细化类别信息一致的图像作为目标图像集;In the first contraband image set, select images consistent with the preset contraband refined category information as the target image set;

和/或在所述第二违禁品图像集中筛选与预设违禁品细化类别信息一致的图像作为目标图像集。And/or selecting images consistent with preset refined category information of contraband in the second contraband image set as a target image set.

可选地,所述对所述目标图像集进行数据源扩充预处理得到训练图像集包括:Optionally, performing data source expansion preprocessing on the target image set to obtain a training image set includes:

对在第一违禁品图像集中筛选的目标图像集进行第一预处理得到训练图像集;Perform first preprocessing on the target image set screened in the first contraband image set to obtain a training image set;

和/或对在第二违禁品图像集中筛选的目标图像集进行第二预处理得到训练图像集。And/or performing second preprocessing on the target image set screened in the second contraband image set to obtain a training image set.

可选地,所述第一预处理的过程为:Optionally, the process of the first preprocessing is:

对目标图像集中的每个目标图像的色调、亮度和饱和度随机进行不同程度处理得到若干个第一中间图像;The hue, brightness and saturation of each target image in the target image set are randomly processed to different degrees to obtain several first intermediate images;

对所述若干个第一中间图像分别进行随机裁剪得到训练图像集。A training image set is obtained by randomly cropping the several first intermediate images respectively.

可选地,所述第二预处理的过程为:Optionally, the process of the second preprocessing is:

对目标图像集中的每个目标图像进行旋转和仿射变换操作得到第二中间图像;Performing rotation and affine transformation operations on each target image in the target image set to obtain a second intermediate image;

将所述第二中间图像按照预设融合规则与不含违禁品的X光图像进行融合以得到训练图像集。The second intermediate image is fused with the X-ray image that does not contain contraband according to a preset fusion rule to obtain a training image set.

可选地,在将在预设置信区间的置信度检测值对应的检测区域确定为违禁品区域之后,所述方法还包括:Optionally, after determining the detection area corresponding to the confidence detection value in the preset confidence interval as the contraband area, the method further includes:

将违禁品区域对应的置信度检测值与预设检测值进行比较;Compare the confidence detection value corresponding to the contraband area with the preset detection value;

保留高于或等于预设检测值的置信度检测值以及对应的检测区域;Retain the confidence detection value higher than or equal to the preset detection value and the corresponding detection area;

将低于预设检测值的置信度检测值对应的检测区域图像输入到卷积神经网络分类模型中以便进一步进行违禁品类别判定;其中预设检测值是预设置信区间内的任意一个数值。The detection area image corresponding to the confidence detection value lower than the preset detection value is input into the convolutional neural network classification model to further determine the category of contraband; the preset detection value is any value within the preset confidence interval.

可选地,所述卷积神经网络分类模型的构建过程为:Optionally, the construction process of the convolutional neural network classification model is:

获取第三违禁品图像集和不含违禁品的X光图像;其中,所述第三违禁品图像集和第二违禁品图像集相同;Obtaining a third set of images of contraband and X-ray images that do not contain contraband; wherein, the set of images of the third and second images of contraband are the same;

随机截取所述不含违禁品的X光图像的部分区域图像;randomly intercepting part of the image of the X-ray image that does not contain contraband;

将所述第三违禁品图像集和不含违禁品的X光图像的部分区域图像进行第三预处理得到分类训练图像集;The third preprocessing is performed on the third contraband image set and the partial area image of the X-ray image that does not contain contraband to obtain a classification training image set;

将所述分类训练图像集输入到分类训练模型中进行训练以得到卷积神经网络分类模型。The classification training image set is input into a classification training model for training to obtain a convolutional neural network classification model.

本发明的另一方面,提出了一种基于X光图像的违禁品检测识别的系统,包括:Another aspect of the present invention provides a system for detecting and identifying contraband based on X-ray images, including:

第一确定单元,用于根据预设违禁品细化类别信息确定目标图像集;a first determining unit, configured to determine a target image set according to the preset refined category information of contraband;

数据扩充单元,用于对所述目标图像集进行数据源扩充预处理得到训练图像集;a data expansion unit for performing data source expansion preprocessing on the target image set to obtain a training image set;

训练单元,用于将所述训练图像集输入至检测识别训练模型进行训练以得到检测识别网络模型;A training unit for inputting the training image set into a detection and recognition training model for training to obtain a detection and recognition network model;

检测识别单元,用于将待检测X光图像输入至所述检测识别网络模型得到待检测X光图像中各检测区域的置信度检测值;a detection and identification unit, configured to input the X-ray image to be detected into the detection and identification network model to obtain the confidence detection value of each detection area in the X-ray image to be detected;

第二确定单元,用于将在预设置信区间的置信度检测值对应的检测区域确定为违禁品区域。The second determination unit is configured to determine the detection area corresponding to the confidence detection value in the preset confidence interval as the contraband area.

本发明的第三方面,提出了一种设备,包括:In a third aspect of the present invention, a device is provided, comprising:

至少一个处理器;以及at least one processor; and

与至少一个所述处理器通信连接的存储器;其中,a memory communicatively coupled to at least one of the processors; wherein,

所述存储器存储有可被所述处理器执行的指令,所述指令用于被所述处理器执行以实现第一方面任一项所述的基于X光图像的违禁品检测识别的方法。The memory stores instructions executable by the processor, and the instructions are used to be executed by the processor to implement the method for detecting and identifying contraband based on an X-ray image according to any one of the first aspects.

本发明的第四方面,提出了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机指令,所述计算机指令用于被所述计算机执行以实现第一方面任一项所述的基于X光图像的违禁品检测识别的方法。In a fourth aspect of the present invention, a computer-readable storage medium is provided, where the computer-readable storage medium stores computer instructions, and the computer instructions are used to be executed by the computer to implement any one of the first aspects. A method for detection and identification of contraband based on X-ray images.

本发明的有益效果:本发明通过根据预设违禁品细化类别信息来确定目标图像集,能够得到更详细分类定义的目标图像集,避免同类违禁品中由于个体差异影响检测识别效果,并对目标图像集进行数据扩充预处理使得训练图像集的数据更加多样化,进而使训练得到的检测识别网络模型的检测识别准确率得到有效提高。Beneficial effects of the present invention: the present invention determines the target image set by refining the category information of the preset contraband, and can obtain the target image set with more detailed classification and definition, avoids the influence of the detection and recognition effect due to individual differences in the same contraband, and provides The target image set is subjected to data expansion preprocessing to make the data of the training image set more diverse, thereby effectively improving the detection and recognition accuracy of the trained detection and recognition network model.

附图说明Description of drawings

通过阅读参照以下附图所作的对非限制性实施例所作的详细描述,本申请的其它特征、目的和优点将会变得更明显:Other features, objects and advantages of the present application will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings:

图1是本申请实施例的基于X光图像的违禁品检测识别方法的示意图;1 is a schematic diagram of a method for detecting and identifying contraband based on an X-ray image according to an embodiment of the present application;

图2是本申请含有违禁品的X光图像集以及经过第一预处理后的结果示意图;Fig. 2 is the X-ray image set containing contraband in the present application and the schematic diagram of the result after the first preprocessing;

图3是本申请违禁品单独图像集以及经过第二预处理后的结果示意图;Fig. 3 is the individual image set of contraband of the present application and the schematic diagram of the result after the second preprocessing;

图4是本申请待检测X光图像经过检测识别网络模型后的部分检测结果;4 is a partial detection result of the X-ray image to be detected in the present application after the detection and identification network model;

图5是本申请又一实施例的基于X光图像的违禁品检测识别方法的示意图;5 is a schematic diagram of a method for detecting and identifying contraband based on an X-ray image according to another embodiment of the present application;

图6是本申请的基于X光图像的违禁品检测识别系统的结构示意图;6 is a schematic structural diagram of the X-ray image-based contraband detection and identification system of the present application;

图7是用于实现本申请方法、系统、设备实施例的服务器的计算机系统的结构示意图。FIG. 7 is a schematic structural diagram of a computer system for implementing a server according to embodiments of the method, system, and device of the present application.

具体实施方式Detailed ways

下面结合附图和实施例对本申请作进一步的详细说明。可以理解的是,此处所描述的具体实施例仅用于解释相关发明,而非对该发明的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与有关发明相关的部分。The present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the related invention, but not to limit the invention. In addition, it should be noted that, for the convenience of description, only the parts related to the related invention are shown in the drawings.

需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。下面将参考附图并结合实施例来详细说明本申请。It should be noted that the embodiments in the present application and the features of the embodiments may be combined with each other in the case of no conflict. The present application will be described in detail below with reference to the accompanying drawings and in conjunction with the embodiments.

本发明提供一种基于X光图像的违禁品检测识别方法,本方法包括:The present invention provides a method for detecting and identifying contraband based on X-ray images, the method comprising:

根据预设违禁品细化类别信息确定目标图像集;Determine the target image set according to the refined category information of the preset contraband;

对所述目标图像集进行数据源扩充预处理得到训练图像集;Performing data source expansion preprocessing on the target image set to obtain a training image set;

将所述训练图像集输入至检测识别训练模型进行训练以得到检测识别网络模型;Inputting the training image set to a detection and recognition training model for training to obtain a detection and recognition network model;

将待检测X光图像输入至所述检测识别网络模型得到待检测X光图像中各检测区域的置信度检测值;Inputting the X-ray image to be detected into the detection and identification network model to obtain the confidence detection value of each detection area in the X-ray image to be detected;

将在预设置信区间的置信度检测值对应的检测区域确定为违禁品区域。The detection area corresponding to the confidence detection value in the preset confidence interval is determined as the contraband area.

为了更清晰地对本发明基于X光图像的违禁品检测识别的方法进行说明,下面结合图1对本发明实施例中各步骤展开详述,在本实施例中主要以枪支和刀具两类违禁品进行说明,当然本实施例的方法还可以应用于其他能够通过外观直接、明显判断违禁类别的违禁品。In order to more clearly describe the method of the present invention for detecting and identifying contraband based on X-ray images, each step in the embodiment of the present invention will be described in detail below with reference to FIG. Note that, of course, the method of this embodiment can also be applied to other contrabands whose categories can be directly and clearly determined by their appearance.

本发明第一实施例的基于X光图像的违禁品检测识别的方法,包括步骤S101-步骤S105,各步骤详细描述如下:The method for detecting and identifying contraband based on X-ray images according to the first embodiment of the present invention includes steps S101 to S105, and each step is described in detail as follows:

S101、根据预设违禁品细化类别信息确定目标图像集。S101. Determine a target image set according to preset refined category information of contraband.

在本申请实施例中,预设违禁品细化类别信息是指对违禁品的详细分类信息,例如包括违禁品的类别名称、形状、大小、颜色等信息。目标图像集是需要进行检测的违禁品的相关图像的集合。In the embodiment of the present application, the preset refined category information of contraband refers to detailed classification information of contraband, for example, including information such as category name, shape, size, color, and the like of contraband. The target image set is a collection of relevant images of contraband that needs to be detected.

可选地,所述根据预设违禁品细化类别信息确定目标图像集包括:Optionally, the determining of the target image set according to the preset refined category information of contraband includes:

获取违禁品图像集。Get a collection of contraband images.

在该步骤中,首先明确获取违禁品图像集的类别,根据类别去网络上获取违禁品图像集。In this step, the category of the contraband image set is firstly obtained, and the contraband image set is obtained from the Internet according to the category.

具体来说,首先根据检测识别要求,确定要检测的违禁品详细类别。例如检测识别要求是需要检测枪支和刀具,根据枪支和刀具的大小、形状来进行详细分类,例如枪支可以分为手枪、冲锋枪和长枪等,刀具可以分为长短刀和菜刀等。Specifically, first, according to the detection and identification requirements, the detailed categories of contraband to be detected are determined. For example, the detection and identification requirement is to detect firearms and knives, and classify them in detail according to their size and shape. For example, firearms can be divided into pistols, submachine guns and long guns, and knives can be divided into long and short knives and kitchen knives.

通过对违禁品进行细化分类,能够有效避免同类别的违禁品,如枪支由于形状和大小的不同对检测识别结果带来的影响。By subdividing the classification of contraband, it can effectively avoid the influence of the same category of contraband, such as guns, on the detection and recognition results due to different shapes and sizes.

在所述违禁品图像集中筛选与预设违禁品细化类别信息一致的图像作为目标图像集。The images that are consistent with the preset refined category information of contraband are selected from the contraband image set as the target image set.

在本申请中,获取到违禁品图像集以后,可以通过人工筛选或自动筛选出与预设违禁品细化类别一致的图像作为目标图像集。In the present application, after obtaining the contraband image set, images consistent with the preset refined category of contraband can be manually or automatically screened out as the target image set.

如果是人工筛选,需要通过肉眼进行对比,将预先定义的枪支和刀具的大小和形状与违禁品图像集进行对比,把不符合的剔除。In the case of manual screening, the pre-defined size and shape of firearms and knives need to be compared with the image set of contraband images, and those that do not match are eliminated.

如果是自动筛选,在一个示例中,可以将两者的图像进行重合度对比,例如重合度大于预设重合度就判定为符合,这样可以提高效率。In the case of automatic screening, in an example, the two images can be compared for the degree of coincidence. For example, if the degree of coincidence is greater than the preset degree of coincidence, it is determined to be consistent, which can improve efficiency.

在一个具体的实施例中,所述获取违禁品图像集包括:In a specific embodiment, the obtaining a set of images of contraband includes:

获取第一违禁品图像集;Get the first set of contraband images;

和/或获取第二违禁品图像集;所述第一违禁品图像集为含有违禁品的X光图像集;所述第二违禁品图像集为违禁品单独图像集。and/or acquiring a second set of images of contraband; the first set of images of contraband is an X-ray image set containing contraband; the second set of images of contraband is a set of separate images of contraband.

在本实施例中,第一违禁品图像集从特定专业的网站中下载,第二违禁品图像集可以从网络中利用网络爬虫下载得到,在一个示例中,其过程可以包括如下步骤:In this embodiment, the first set of images of contraband is downloaded from a specific professional website, and the second set of images of contraband can be downloaded from the network using a web crawler. In an example, the process may include the following steps:

第一步,确认爬取图像的目标地址,利用Java语言的Gecco网络爬虫去目标地址发起爬取请求。The first step is to confirm the target address of the crawled image, and use the Java language Gecco web crawler to initiate a crawling request to the target address.

第二步,对于爬取请求返回含有图像连接的网页的源码,利用Jsoup解析器分析网页的结构,解析出每个图像的链接。The second step is to return the source code of the web page containing the image link for the crawling request, use the Jsoup parser to analyze the structure of the web page, and parse the link of each image.

第三步,遍历图像的链接并对链接发起请求,将返回结果写到本地,保存为图像文件。The third step is to traverse the link of the image and initiate a request for the link, write the returned result locally, and save it as an image file.

所述在所述违禁品图像集中筛选与预设违禁品细化类别信息一致的图像作为目标图像集包括:The selection of images consistent with the preset refined category information of contraband in the contraband image set as the target image set includes:

在所述第一违禁品图像集中筛选与预设违禁品细化类别信息一致的图像作为目标图像集;In the first contraband image set, select images consistent with the preset contraband refined category information as the target image set;

和/或在所述第二违禁品图像集中筛选与预设违禁品细化类别信息一致的图像作为目标图像集。And/or selecting images consistent with preset refined category information of contraband in the second contraband image set as a target image set.

在本申请实施例中,违禁品图像集可以分为两类,一类是含有违禁品的X光图像集,一类是违禁品单独图像集。如图2所示,在图2中给出了四组违禁品图像集,上下为一组,下方的图片是含有违禁品的X光图像,上方的是经过数据源扩充预处理后的图像。如图3所示,图3中最左侧一列是枪支和刀具的单独图像。枪支和刀具的单独图像经过数据源扩充预处理后融入到不含违禁品的X光图像中,得到最终的训练图像集。In the embodiment of the present application, the contraband image set can be divided into two categories, one is an X-ray image set containing contraband, and the other is a separate image set of contraband. As shown in Figure 2, four sets of images of contraband are given in Figure 2, the top and bottom are a group, the bottom picture is the X-ray image containing contraband, and the top is the image after data source expansion and preprocessing. As shown in Figure 3, the left-most column in Figure 3 is a separate image of guns and knives. Separate images of guns and knives are preprocessed by data source augmentation and integrated into X-ray images without contraband to obtain the final training image set.

通过采用两类违禁品图像集作为目标图像集,能够大大增加目标图像集的样式,使数据源更加丰富,进而可以提高检测准确率。By using two types of contraband image sets as the target image set, the style of the target image set can be greatly increased, the data source can be more abundant, and the detection accuracy can be improved.

为了进一步使检测识别效果具有较高的泛化性和鲁棒性,对目标图像集需要进一步进行增强处理等操作,以对数据源扩充,满足检测识别训练模型的数据需求。下面给出具体的步骤。In order to further improve the generalization and robustness of the detection and recognition effect, the target image set needs to be further enhanced, so as to expand the data source and meet the data requirements of the detection and recognition training model. The specific steps are given below.

S102、对所述目标图像集进行数据源扩充预处理得到训练图像集。根据上述实施例,具体可以包括如下步骤:S102. Perform data source expansion preprocessing on the target image set to obtain a training image set. According to the above embodiment, the following steps may be specifically included:

对在第一违禁品图像集中筛选的目标图像集进行第一预处理得到训练图像集。所述第一预处理的过程为:A training image set is obtained by performing first preprocessing on the target image set screened in the first contraband image set. The process of the first preprocessing is:

对目标图像集中的每个目标图像的色调、亮度和饱和度等随机进行不同程度的处理得到若干个第一中间图像。The hue, brightness and saturation of each target image in the target image set are randomly processed to different degrees to obtain several first intermediate images.

对所述若干个第一中间图像分别进行随机裁剪得到得到训练图像集。A training image set is obtained by randomly cropping the several first intermediate images respectively.

其中,在第一违禁品图像集中筛选的目标图像,即含有违禁品的X光图像在HSV空间的操作得到第一中间图像的过程如下:The process of obtaining the first intermediate image by operating the target image screened in the first contraband image set, that is, the X-ray image containing contraband in the HSV space, is as follows:

利用OPENCV函数将目标图像由RGB空间转换为HSV空间;Use the OPENCV function to convert the target image from RGB space to HSV space;

分别对目标图像在HSV空间的色调H、饱和度S和明度V的值进行调整,使其与原图的HSV值有着明显的变化;Adjust the values of hue H, saturation S and lightness V of the target image in HSV space respectively, so that they have obvious changes from the HSV value of the original image;

利用OPENCV函数将图像由HSV空间转换为RGB空间,并存储图像。Use the OPENCV function to convert the image from HSV space to RGB space and store the image.

参考图2,给出了含有违禁品的X光图像经过第一预处理后的图像示意,上方的四个图像为分别经过第一预处理后的训练图像。Referring to FIG. 2 , a schematic diagram of an X-ray image containing contraband after the first preprocessing is given, and the upper four images are the training images after the first preprocessing respectively.

通过上述手段,能够使目标图像呈现不同的亮度、大小和色彩,使训练图像集得到扩充,满足检测识别训练模型需求。Through the above-mentioned means, the target image can be rendered with different brightness, size and color, so that the training image set can be expanded to meet the requirements of the detection and recognition training model.

和/或对在第二违禁品图像集中筛选的目标图像集进行第二预处理得到训练图像集。所述第二预处理的过程为:And/or performing second preprocessing on the target image set screened in the second contraband image set to obtain a training image set. The process of the second preprocessing is:

如图3所示,对目标图像集中的每个目标图像(a)进行旋转和仿射变换等操作得到第二中间图像(b)。中间一列的图像为第二中间图像。As shown in FIG. 3 , operations such as rotation and affine transformation are performed on each target image (a) in the target image set to obtain a second intermediate image (b). The image in the middle column is the second intermediate image.

将所述第二中间图像按照预设融合规则与不含违禁品的X光图像进行融合以得到训练图像集(c)。使得同一枪支或刀具在不同的X光图像中呈现不同的大小和形状,实现数据的多样化。The second intermediate image is fused with the X-ray image containing no contraband according to a preset fusion rule to obtain a training image set (c). It makes the same gun or knife show different sizes and shapes in different X-ray images, and realizes the diversification of data.

在该步骤中,预设融合规则可以采用嵌入式规则,将枪支或刀具嵌入到不含违禁品的X光图像中。In this step, the preset fusion rules can employ embedded rules to embed guns or knives into X-ray images that do not contain contraband.

此外,不含违禁品的X光图像的获取可以按照上述示例中第一违禁图像集和第二违禁图像集的获取过程。In addition, the acquisition of the X-ray images that do not contain contraband may follow the acquisition process of the first set of prohibited images and the second set of prohibited images in the above example.

参考图3,给出了枪支和刀具经过旋转、仿射等变换后按照预设融合规则融入到不含有违禁品的X光图像的过程。Referring to Figure 3, the process of integrating guns and knives into an X-ray image without contraband according to preset fusion rules after transformations such as rotation and affine is given.

S103、将所述训练图像集输入至检测识别训练模型进行训练以得到检测识别网络模型。S103. Input the training image set into a detection and recognition training model for training to obtain a detection and recognition network model.

在该步骤中,可以将训练图像集分为五类进行输入,每一类的图像数量大约为4000张,总计20786张。如图2和图3所示。In this step, the training image set can be divided into five categories for input, and the number of images in each category is about 4000, totaling 20786. As shown in Figure 2 and Figure 3.

其中,在训练之前,需要对检测识别训练模型的各项参数进行设置,例如,参数Bathsize大小设置为64,且训练的次数设置为10000次,即64张图片作为一组训练参数,该组图片训练10000次后得到检测识别网络模型的参数。Among them, before training, it is necessary to set various parameters of the detection and recognition training model. For example, the size of the parameter Bathsize is set to 64, and the number of training times is set to 10,000 times, that is, 64 pictures are used as a set of training parameters. After training 10,000 times, the parameters of the detection and recognition network model are obtained.

在本申请实施例中,检测识别训练模型的初始参数是基于现有技术中COCO数据集80个类别中训练得到的参数,枪支、刀具在X光图像中的大小与COCO数据集中80个类别的大小有一定的区别,因此需要对X光图像中的违禁品的大小重新聚类,使得枪支、刀具的大小符合检测识别训练模型中预设框的大小。In the embodiment of the present application, the initial parameters of the detection and recognition training model are based on the parameters trained in the 80 categories of the COCO dataset in the prior art. There is a certain difference in size, so it is necessary to re-cluster the size of the contraband in the X-ray image so that the size of the guns and knives matches the size of the preset frame in the detection and recognition training model.

S104、将待检测X光图像输入至所述检测识别网络模型得到待检测X光图像中各检测区域的置信度检测值。S104 , inputting the X-ray image to be detected into the detection and identification network model to obtain the confidence detection value of each detection area in the X-ray image to be detected.

在一个示例中,可以采用一阶目标检测模型YOLO作为检测识别训练模型,能够提高检测识别效率。In one example, the first-order target detection model YOLO can be used as the detection and recognition training model, which can improve the detection and recognition efficiency.

S105、将在预设置信区间的置信度检测值对应的检测区域确定为违禁品区域。如图4所示,给出了检测结果示意图,图中违禁品区域被框中,能够直观的看出违禁品所在位置。S105. Determine the detection area corresponding to the confidence detection value in the preset confidence interval as the contraband area. As shown in Figure 4, a schematic diagram of the detection results is given. The contraband area in the figure is framed, and the location of the contraband can be visually seen.

在本申请实施例中,置信度也称为可靠度,或置信水平、置信系数,即在抽样对总体参数作出估计时,由于样本的随机性,其结论总是不确定的。因此,采用一种概率的陈述方法,也就是数理统计中的区间估计法,即估计值与总体参数在一定允许的误差范围以内,其相应的概率有多大,这个相应的概率称作置信度。置信区间则是一个概率区间。In the embodiment of the present application, the confidence is also called reliability, or confidence level, confidence coefficient, that is, when sampling to estimate a population parameter, due to the randomness of the sample, the conclusion is always uncertain. Therefore, a probability statement method is adopted, that is, the interval estimation method in mathematical statistics, that is, the estimated value and the overall parameter are within a certain allowable error range, what is the corresponding probability, and this corresponding probability is called confidence. A confidence interval is a probability interval.

在一个示例中,可以根据待检测X光图像中物品的位置确定检测区域,例如待测图像中显示有短刀、牙刷和纸巾,那个可以根据三个物品的位置确定检测区域,并得到三个检测区域的置信度。例如预设置信区间为0.5-1,短刀检测区域的置信度是0.6,牙刷和纸巾检测区域的置信度分别是0.3和0.2,那么就将短刀检测区域确定为违禁品区域。In one example, the detection area can be determined according to the position of the object in the X-ray image to be detected. For example, a short knife, a toothbrush and a paper towel are displayed in the image to be detected. The detection area can be determined according to the position of the three objects, and three detections are obtained. confidence in the area. For example, the preset confidence interval is 0.5-1, the confidence level of the short knife detection area is 0.6, and the confidence levels of the toothbrush and paper towel detection areas are 0.3 and 0.2 respectively, then the short knife detection area is determined as the contraband area.

通过该检测识别网络模型还可以输出违禁品的位置信息,例如空间坐标数据。根据置信度和坐标数据就可以锁定违禁品,通过框中或语音播报等形式进行提示。The detection and recognition network model can also output the location information of contraband, such as spatial coordinate data. According to the confidence and coordinate data, the contraband can be locked and prompted through the box or voice broadcast.

为了提高违禁品的召回率,可以降低预设置信区间的阈值,例如标准的预设置信区间是0.5-1,那么可以调整为0.3-1,这样就可以获得更多的检测结果。但是这样就会把不是违禁品的物品,例如牙刷当做违禁品,影响检测准确率。In order to improve the recall rate of contraband, the threshold of the preset confidence interval can be lowered. For example, the standard preset confidence interval is 0.5-1, then it can be adjusted to 0.3-1, so that more detection results can be obtained. But this will treat items that are not contraband, such as toothbrushes, as contraband, which will affect the detection accuracy.

因此需要对上述实施例的检测结果进行进一步判别。Therefore, it is necessary to further discriminate the detection results of the above embodiments.

如图5所示,在将在预设置信区间的置信度检测值对应的检测区域确定为违禁品区域之后,所述方法还包括:As shown in FIG. 5 , after determining the detection area corresponding to the confidence detection value in the preset confidence interval as the contraband area, the method further includes:

S501、将违禁品区域对应的置信度检测值与预设检测值进行比较。S501. Compare the confidence detection value corresponding to the contraband area with the preset detection value.

S502、保留高于或等于预设检测值的置信度检测值以及对应的检测区域。S502. Retain a confidence detection value higher than or equal to a preset detection value and a corresponding detection area.

S503、将低于预设检测值的置信度检测值对应的检测区域图像输入到卷积神经网络分类模型中以便进一步进行违禁品类别判定。其中预设检测值是预设置信区间内的任意一个数值。S503: Input the detection area image corresponding to the confidence detection value lower than the preset detection value into the convolutional neural network classification model to further determine the category of contraband. The preset detection value is any value within the preset confidence interval.

在上述示例基础上,预设置信区间是0.3-1,检测出牙刷的检测区域的置信度是0.3,短刀的检测区域的置信度是0.6,确认牙刷和短刀为违禁品,在一个示例中,设置预设检测值为0.5,那么就继续保留短刀的检测结果,将低于0.5的牙刷的检测区域图像输入至卷积神经网络分类模型中进行类别判定,如果判别为杂质则将该检测区域排除,否则保留为最终的检测结果。当然在本示例中,按照分类模型,牙刷会被排除出违禁品的类别。On the basis of the above example, the preset confidence interval is 0.3-1, the confidence level of the detection area of the toothbrush is 0.3, and the confidence level of the detection area of the short knife is 0.6, confirming that the toothbrush and the short knife are contraband, in one example, Set the default detection value to 0.5, then continue to retain the detection result of the short knife, input the image of the detection area of the toothbrush below 0.5 into the convolutional neural network classification model for category determination, and exclude the detection area if it is identified as impurity , otherwise it is reserved as the final detection result. Of course in this example, according to the classification model, the toothbrush will be excluded from the category of contraband.

其中,所述卷积神经网络分类模型的构建过程为:Wherein, the construction process of the convolutional neural network classification model is:

获取第三违禁品图像集和不含违禁品的X光图像;其中,所述第三违禁品图像集和第二违禁品图像集相同。都是枪支和刀具等单个违禁品图像,其获取方式也参照上述示例,利用网络爬虫获取。A third set of images of contraband and X-ray images without contraband are acquired; wherein, the set of images of third and second images of contraband are the same. They are all images of single contraband such as guns and knives, and their acquisition methods are also obtained by referring to the above examples and using web crawlers.

随机截取所述不含违禁品的X光图像的部分区域图像。Partial area images of the X-ray images that do not contain contraband are randomly intercepted.

将随机截取的部分作为杂质类别进行存储,以便排除不是违禁品的物品。Random intercepts are stored as impurity categories in order to exclude items that are not contraband.

将所述第三违禁品图像集和不含违禁品的X光图像的部分区域图像进行第三预处理得到分类训练图像集。The third preprocessing is performed on the third contraband image set and the partial area image of the X-ray image that does not contain contraband to obtain a classification training image set.

第三预处理可以包括随机裁剪、仿射变换和颜色调整等操作,进一步加强数据的多样性,使卷积神经网络分类模型具有较好的泛化性。The third preprocessing can include operations such as random cropping, affine transformation, and color adjustment, which further enhances the diversity of data and enables the convolutional neural network classification model to have better generalization.

将所述分类训练图像集输入到分类训练模型中进行训练以得到卷积神经网络分类模型。The classification training image set is input into a classification training model for training to obtain a convolutional neural network classification model.

在一个示例中,可以采用深度学习网络模型VGG16作为主干网络,Focal Loss函数作为损失函数,构造分类训练模型。In an example, the deep learning network model VGG16 can be used as the backbone network, and the Focal Loss function can be used as the loss function to construct a classification training model.

基于同样的发明构思,本申请第二实施例提供一种基于X光图像的违禁品检测识别的系统,如图6所示,包括:Based on the same inventive concept, the second embodiment of the present application provides a system for detecting and identifying contraband based on X-ray images, as shown in FIG. 6 , including:

第一确定单元610,用于根据预设违禁品细化类别信息确定目标图像集;a first determining unit 610, configured to determine a target image set according to preset refined category information of contraband;

数据扩充单元620,用于对所述目标图像集进行数据源扩充预处理得到训练图像集;a data expansion unit 620, configured to perform data source expansion preprocessing on the target image set to obtain a training image set;

训练单元630,用于将所述训练图像集输入至检测识别训练模型进行训练以得到检测识别网络模型;A training unit 630, configured to input the training image set into a detection and recognition training model for training to obtain a detection and recognition network model;

检测单元640,用于将待检测X光图像输入至所述检测识别网络模型得到待检测X光图像中各检测区域的置信度检测值;A detection unit 640, configured to input the X-ray image to be detected into the detection and identification network model to obtain the confidence detection value of each detection area in the X-ray image to be detected;

第二确定单元650,用于将在预设置信区间的置信度检测值对应的检测区域确定为违禁品区域。The second determining unit 650 is configured to determine the detection area corresponding to the confidence detection value within the preset confidence interval as the contraband area.

所属技术领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统的具体工作过程及有关说明,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and brevity of description, for the specific working process and related description of the system described above, reference may be made to the corresponding process in the foregoing method embodiments, which will not be repeated here.

需要说明的是,上述实施例提供的基于X光图像的违禁品检测识别系统,仅以上述各功能模块的划分进行举例说明,在实际应用中,可以根据需要而将上述功能分配由不同的功能模块来完成,即将本发明实施例中的模块或者步骤再分解或者组合,例如,上述实施例的模块可以合并为一个模块,也可以进一步拆分成多个子模块,以完成以上描述的全部或者部分功能。对于本发明实施例中涉及的模块、步骤的名称,仅仅是为了区分各个模块或者步骤,不视为对本发明的不当限定。It should be noted that, the X-ray image-based contraband detection and identification system provided in the above-mentioned embodiments is only illustrated by the division of the above-mentioned functional modules. module, that is, the modules or steps in the embodiments of the present invention are decomposed or combined. For example, the modules in the above embodiments can be combined into one module, or can be further split into multiple sub-modules to complete all or part of the above description. Function. The names of the modules and steps involved in the embodiments of the present invention are only for distinguishing each module or step, and should not be regarded as an improper limitation of the present invention.

基于同样的发明构思,本发明第三实施例的一种设备,包括:Based on the same inventive concept, a device according to the third embodiment of the present invention includes:

至少一个处理器;以及at least one processor; and

与至少一个所述处理器通信连接的存储器;其中,a memory communicatively coupled to at least one of the processors; wherein,

所述存储器存储有可被所述处理器执行的指令,所述指令用于被所述处理器执行以实现第一实施例所述的基于X光图像的违禁品检测识别的方法。The memory stores instructions executable by the processor, and the instructions are used to be executed by the processor to implement the method for detecting and identifying contraband based on an X-ray image described in the first embodiment.

本发明第四实施例的一种计算机可读存储介质,所述计算机可读存储介质存储有计算机指令,所述计算机指令用于被所述计算机执行以实现第一实施例所述的基于X光图像的违禁品检测识别的方法。A computer-readable storage medium according to a fourth embodiment of the present invention, the computer-readable storage medium stores computer instructions, and the computer instructions are used to be executed by the computer to implement the X-ray-based method described in the first embodiment. A method for image detection and identification of contraband.

所属技术领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的存储装置、处理装置的具体工作过程及有关说明,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process and relevant description of the storage device and processing device described above can refer to the corresponding process in the foregoing method embodiments, which is not repeated here. Repeat.

下面参考图7,其示出了用于实现本申请方法、系统、设备实施例的服务器的计算机系统的结构示意图。图7示出的服务器仅仅是一个示例,不应对本申请实施例的功能和使用范围带来任何限制。Referring to FIG. 7 below, it shows a schematic structural diagram of a computer system for implementing a server of the method, system, and device embodiments of the present application. The server shown in FIG. 7 is only an example, and should not impose any limitations on the functions and scope of use of the embodiments of the present application.

如图7所示,计算机系统包括中央处理单元(CPU,Central Processing Unit)701,其可以根据存储在只读存储器(ROM,Read Only Memory)702中的程序或者从存储部分708加载到随机访问存储器(RAM,Random Access Memory)703中的程序而执行各种适当的动作和处理。在RAM 703中,还存储有系统操作所需的各种程序和数据。CPU701、ROM 702以及RAM703通过总线704彼此相连。输入/输出(I/O,Input/Output)接口705也连接至总线704。As shown in FIG. 7 , the computer system includes a central processing unit (CPU, Central Processing Unit) 701, which can be loaded into a random access memory according to a program stored in a read only memory (ROM, Read Only Memory) 702 or from a storage part 708 A program in (RAM, Random Access Memory) 703 executes various appropriate operations and processes. In the RAM 703, various programs and data necessary for system operation are also stored. The CPU 701 , the ROM 702 and the RAM 703 are connected to each other through a bus 704 . An input/output (I/O, Input/Output) interface 705 is also connected to the bus 704 .

以下部件连接至I/O接口705:包括键盘、鼠标等的输入部分706;包括诸如阴极射线管(CRT,Cathode Ray Tube)、液晶显示器(LCD,Liquid Crystal Display)等以及扬声器等的输出部分707;包括硬盘等的存储部分708;以及包括诸如LAN(局域网,Local AreaNetwork)卡、调制解调器等的网络接口卡的通信部分709。通信部分709经由诸如因特网的网络执行通信处理。驱动器710也根据需要连接至I/O接口705。可拆卸介质711,诸如磁盘、光盘、磁光盘、半导体存储器等等,根据需要安装在驱动器710上,以便于从其上读出的计算机程序根据需要被安装入存储部分708。The following components are connected to the I/O interface 705: an input section 706 including a keyboard, a mouse, etc.; an output section 707 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc. ; a storage section 708 including a hard disk and the like; and a communication section 709 including a network interface card such as a LAN (Local Area Network) card, a modem, and the like. The communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I/O interface 705 as needed. A removable medium 711, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is mounted on the drive 710 as needed so that a computer program read therefrom is installed into the storage section 708 as needed.

特别地,根据本公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信部分709从网络上被下载和安装,和/或从可拆卸介质711被安装。在该计算机程序被中央处理单元(CPU)701执行时,执行本申请的方法中限定的上述功能。需要说明的是,本申请上述的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本申请中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本申请中,计算机可读的信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读的信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:无线、电线、光缆、RF等等,或者上述的任意合适的组合。In particular, according to embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the method illustrated in the flowchart. In such an embodiment, the computer program may be downloaded and installed from the network via the communication portion 709 and/or installed from the removable medium 711 . When the computer program is executed by the central processing unit (CPU) 701, the above-mentioned functions defined in the method of the present application are performed. It should be noted that the computer-readable medium mentioned above in the present application may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the above two. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or a combination of any of the above. More specific examples of computer readable storage media may include, but are not limited to, electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), erasable Programmable read only memory (EPROM or flash memory), fiber optics, portable compact disk read only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing. In this application, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this application, however, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code therein. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. A computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device . Program code embodied on a computer readable medium may be transmitted using any suitable medium including, but not limited to, wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

可以以一种或多种程序设计语言或其组合来编写用于执行本申请的操作的计算机程序代码,上述程序设计语言包括面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括局域网(LAN)或广域网(WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。Computer program code for performing the operations of the present application may be written in one or more programming languages, including object-oriented programming languages—such as Java, Smalltalk, C++, but also conventional Procedural programming language - such as the "C" language or similar programming language. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (eg, using an Internet service provider through Internet connection).

附图中的流程图和框图,图示了按照本申请各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。The flowchart and block diagrams in the Figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code that contains one or more logical functions for implementing the specified functions executable instructions. It should also be noted that, in some alternative implementations, the functions noted in the blocks may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It is also noted that each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented in dedicated hardware-based systems that perform the specified functions or operations , or can be implemented in a combination of dedicated hardware and computer instructions.

术语“第一”、“第二”等是用于区别类似的对象,而不是用于描述或表示特定的顺序或先后次序。The terms "first," "second," etc. are used to distinguish between similar objects, and are not used to describe or indicate a particular order or sequence.

术语“包括”或者任何其它类似用语旨在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备/装置不仅包括那些要素,而且还包括没有明确列出的其它要素,或者还包括这些过程、方法、物品或者设备/装置所固有的要素。The term "comprising" or any other similar term is intended to encompass a non-exclusive inclusion such that a process, method, article or device/means comprising a list of elements includes not only those elements but also other elements not expressly listed, or Also included are elements inherent to these processes, methods, articles or devices/devices.

至此,已经结合附图所示的优选实施方式描述了本发明的技术方案,但是,本领域技术人员容易理解的是,本发明的保护范围显然不局限于这些具体实施方式。在不偏离本发明的原理的前提下,本领域技术人员可以对相关技术特征做出等同的更改或替换,这些更改或替换之后的技术方案都将落入本发明的保护范围之内。So far, the technical solutions of the present invention have been described with reference to the preferred embodiments shown in the accompanying drawings, however, those skilled in the art can easily understand that the protection scope of the present invention is obviously not limited to these specific embodiments. Without departing from the principle of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will fall within the protection scope of the present invention.

Claims (10)

1. A contraband detection and identification method based on X-ray images is characterized by comprising the following steps:
determining a target image set according to preset contraband refinement category information;
performing data source expansion preprocessing on the target image set to obtain a training image set;
inputting the training image set to a detection and recognition training model for training to obtain a detection and recognition network model;
inputting the X-ray image to be detected into the detection and recognition network model to obtain confidence detection values of all detection areas in the X-ray image to be detected;
and determining a detection area corresponding to the confidence coefficient detection value in the preset confidence interval as a contraband area.
2. The method of claim 1, wherein the determining the target set of images according to the preset contraband refinement category information comprises:
acquiring a contraband image set;
and screening images consistent with preset contraband thinning category information in the contraband image set as a target image set.
3. The method of claim 2, wherein the acquiring the set of images of contraband comprises:
acquiring a first contraband image set;
and/or acquiring a second contraband image set; the first contraband image set is an X-ray image set containing contraband; the second contraband image set is a separate contraband image set;
the step of screening the images consistent with the preset contraband thinning category information in the contraband image set as a target image set comprises the following steps:
screening images consistent with preset contraband thinning category information in the first contraband image set as a target image set;
and/or screening images consistent with preset contraband thinning category information in the second contraband image set to serve as a target image set.
4. The method of claim 3, wherein the pre-processing the target image set by data source expansion to obtain a training image set comprises:
performing first preprocessing on a target image set screened in a first contraband image set to obtain a training image set;
and/or performing second preprocessing on the target image set screened in the second contraband image set to obtain a training image set.
5. The method of claim 4, wherein the first preprocessing is performed by:
processing the hue, brightness and saturation of each target image in the target image set at different degrees randomly to obtain a plurality of first intermediate images;
and respectively carrying out random cutting on the plurality of first intermediate images to obtain a training image set.
6. The method of claim 4, wherein the second preprocessing is performed by:
performing rotation and affine transformation operation on each target image in the target image set to obtain a second intermediate image;
and fusing the second intermediate image with the X-ray image without contraband according to a preset fusion rule to obtain a training image set.
7. The method of claim 1, wherein after determining a detection region corresponding to the confidence detection value at a preset confidence interval as a contraband region, the method further comprises:
comparing a confidence coefficient detection value corresponding to the contraband area with a preset detection value;
reserving a confidence detection value higher than or equal to a preset detection value and a corresponding detection area;
inputting a detection area image corresponding to a confidence coefficient detection value lower than a preset detection value into a convolutional neural network classification model so as to further judge the category of the contraband; wherein the preset detection value is any one value in a preset confidence interval.
8. The method of claim 7, wherein the convolutional neural network classification model is constructed by the following process:
acquiring a third contraband image set and an X-ray image without contraband; wherein the third set of contraband images is the same as the second set of contraband images;
randomly intercepting a partial area image of the X-ray image without the contraband;
performing third preprocessing on the third contraband image set and the partial area image of the X-ray image without the contraband to obtain a classification training image set;
and inputting the classification training image set into a classification training model for training to obtain a convolutional neural network classification model.
9. A system for contraband detection and identification based on X-ray images, comprising:
the first determining unit is used for determining a target image set according to preset contraband refinement category information;
the data expansion unit is used for carrying out data source expansion preprocessing on the target image set to obtain a training image set;
the training unit is used for inputting the training image set to a detection and recognition training model for training to obtain a detection and recognition network model;
the detection and identification unit is used for inputting the X-ray image to be detected into the detection and identification network model to obtain confidence detection values of all detection areas in the X-ray image to be detected;
and the second determining unit is used for determining the detection area corresponding to the confidence detection value in the preset confidence interval as the contraband area.
10. An apparatus, comprising:
at least one processor; and
a memory communicatively coupled to at least one of the processors; wherein,
the memory stores instructions executable by the processor for performing the method for contraband detection and identification based on X-ray images of any of claims 1-8.
CN202110360744.4A 2021-04-02 2021-04-02 Method, system and equipment for detecting and identifying contraband based on X-ray image Pending CN112884085A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110360744.4A CN112884085A (en) 2021-04-02 2021-04-02 Method, system and equipment for detecting and identifying contraband based on X-ray image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110360744.4A CN112884085A (en) 2021-04-02 2021-04-02 Method, system and equipment for detecting and identifying contraband based on X-ray image

Publications (1)

Publication Number Publication Date
CN112884085A true CN112884085A (en) 2021-06-01

Family

ID=76040515

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110360744.4A Pending CN112884085A (en) 2021-04-02 2021-04-02 Method, system and equipment for detecting and identifying contraband based on X-ray image

Country Status (1)

Country Link
CN (1) CN112884085A (en)

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113506283A (en) * 2021-07-26 2021-10-15 浙江大华技术股份有限公司 Image processing method and device, storage medium and electronic device
CN114332543A (en) * 2022-01-10 2022-04-12 成都智元汇信息技术股份有限公司 Multi-template security inspection image identification method, equipment and medium
CN114612764A (en) * 2022-02-16 2022-06-10 厦门瑞为信息技术有限公司 A kind of article detection method, device and readable medium based on millimeter wave image
CN114663711A (en) * 2022-05-17 2022-06-24 北京航空航天大学 X-ray security inspection scene-oriented dangerous goods detection method and device
CN115331092A (en) * 2022-10-11 2022-11-11 成都佳发安泰教育科技股份有限公司 Neural network-based contraband position detection method, device, equipment and medium
CN116958646A (en) * 2023-06-12 2023-10-27 北京声迅电子股份有限公司 Forbidden article detection method based on X-ray image
WO2023207308A1 (en) * 2022-04-29 2023-11-02 同方威视技术股份有限公司 Method and apparatus for online training radiation image recognition model, and radiation image recognition method and apparatus
CN117726882A (en) * 2024-02-07 2024-03-19 杭州宇泛智能科技有限公司 Tower crane object identification method, system and electronic equipment
WO2024114440A1 (en) * 2022-12-01 2024-06-06 同方威视技术股份有限公司 Online training method, security inspection image identification method and apparatus, device, and medium
CN118365990A (en) * 2024-06-19 2024-07-19 浙江啄云智能科技有限公司 Model training method and device applied to contraband detection and electronic equipment
CN118660145A (en) * 2024-08-21 2024-09-17 湖南苏科智能科技有限公司 Security check image conversion method, system, equipment and storage medium
CN118657920A (en) * 2024-08-21 2024-09-17 湖南苏科智能科技有限公司 An object detection method, system, security inspection machine and storage medium
CN114612764B (en) * 2022-02-16 2025-02-25 厦门瑞为信息技术有限公司 Method, device and readable medium for object detection based on millimeter wave images

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108198227A (en) * 2018-03-16 2018-06-22 济南飞象信息科技有限公司 Contraband intelligent identification Method based on X-ray screening machine image
US20180196158A1 (en) * 2017-01-12 2018-07-12 Tsinghua University Inspection devices and methods for detecting a firearm
CN110163179A (en) * 2019-05-29 2019-08-23 浙江啄云智能科技有限公司 A kind of contraband detecting recognition methods, system, equipment and its storage medium based on deep learning
CN110543857A (en) * 2019-09-05 2019-12-06 安徽启新明智科技有限公司 Contraband identification method, device and system based on image analysis and storage medium
CN111310635A (en) * 2020-02-10 2020-06-19 上海应用技术大学 Security inspection contraband identification system and method based on TensorFlow
CN111860510A (en) * 2020-07-29 2020-10-30 浙江大华技术股份有限公司 X-ray image target detection method and device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180196158A1 (en) * 2017-01-12 2018-07-12 Tsinghua University Inspection devices and methods for detecting a firearm
CN108198227A (en) * 2018-03-16 2018-06-22 济南飞象信息科技有限公司 Contraband intelligent identification Method based on X-ray screening machine image
CN110163179A (en) * 2019-05-29 2019-08-23 浙江啄云智能科技有限公司 A kind of contraband detecting recognition methods, system, equipment and its storage medium based on deep learning
CN110543857A (en) * 2019-09-05 2019-12-06 安徽启新明智科技有限公司 Contraband identification method, device and system based on image analysis and storage medium
CN111310635A (en) * 2020-02-10 2020-06-19 上海应用技术大学 Security inspection contraband identification system and method based on TensorFlow
CN111860510A (en) * 2020-07-29 2020-10-30 浙江大华技术股份有限公司 X-ray image target detection method and device

Cited By (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113506283A (en) * 2021-07-26 2021-10-15 浙江大华技术股份有限公司 Image processing method and device, storage medium and electronic device
CN114332543B (en) * 2022-01-10 2023-02-14 成都智元汇信息技术股份有限公司 Multi-template security inspection image identification method, equipment and medium
CN114332543A (en) * 2022-01-10 2022-04-12 成都智元汇信息技术股份有限公司 Multi-template security inspection image identification method, equipment and medium
CN114612764A (en) * 2022-02-16 2022-06-10 厦门瑞为信息技术有限公司 A kind of article detection method, device and readable medium based on millimeter wave image
CN114612764B (en) * 2022-02-16 2025-02-25 厦门瑞为信息技术有限公司 Method, device and readable medium for object detection based on millimeter wave images
WO2023207308A1 (en) * 2022-04-29 2023-11-02 同方威视技术股份有限公司 Method and apparatus for online training radiation image recognition model, and radiation image recognition method and apparatus
CN114663711B (en) * 2022-05-17 2022-08-19 北京航空航天大学 X-ray security inspection scene-oriented dangerous goods detection method and device
CN114663711A (en) * 2022-05-17 2022-06-24 北京航空航天大学 X-ray security inspection scene-oriented dangerous goods detection method and device
CN115331092A (en) * 2022-10-11 2022-11-11 成都佳发安泰教育科技股份有限公司 Neural network-based contraband position detection method, device, equipment and medium
WO2024114440A1 (en) * 2022-12-01 2024-06-06 同方威视技术股份有限公司 Online training method, security inspection image identification method and apparatus, device, and medium
CN116958646A (en) * 2023-06-12 2023-10-27 北京声迅电子股份有限公司 Forbidden article detection method based on X-ray image
CN116958646B (en) * 2023-06-12 2024-01-30 北京声迅电子股份有限公司 Forbidden article detection method based on X-ray image
CN117726882A (en) * 2024-02-07 2024-03-19 杭州宇泛智能科技有限公司 Tower crane object identification method, system and electronic equipment
CN118365990A (en) * 2024-06-19 2024-07-19 浙江啄云智能科技有限公司 Model training method and device applied to contraband detection and electronic equipment
CN118365990B (en) * 2024-06-19 2024-08-30 浙江啄云智能科技有限公司 Model training method and device applied to contraband detection and electronic equipment
CN118660145A (en) * 2024-08-21 2024-09-17 湖南苏科智能科技有限公司 Security check image conversion method, system, equipment and storage medium
CN118657920A (en) * 2024-08-21 2024-09-17 湖南苏科智能科技有限公司 An object detection method, system, security inspection machine and storage medium

Similar Documents

Publication Publication Date Title
CN112884085A (en) Method, system and equipment for detecting and identifying contraband based on X-ray image
CN108303747B (en) Inspection apparatus and method of detecting a gun
US10152650B2 (en) Trademark retrieval method, apparatus and system, and computer storage medium
US10430687B2 (en) Trademark graph element identification method, apparatus and system, and computer storage medium
CN110033040B (en) A flame identification method, system, medium and device
Tao et al. Over-sampling de-occlusion attention network for prohibited items detection in noisy x-ray images
US10726535B2 (en) Automatically generating image datasets for use in image recognition and detection
CN112686258A (en) Physical examination report information structuring method and device, readable storage medium and terminal
CN110986889A (en) High-voltage substation panoramic monitoring method based on remote sensing image technology
EP3438987B1 (en) Tool that analyzes image data and generates and displays a confidence indicator along with a cancer score
CN114782822A (en) Method and device for detecting state of power equipment, electronic equipment and storage medium
CN110119675A (en) A kind of product identification method and apparatus
US8564594B2 (en) Similar shader search apparatus and method using image feature extraction
CN112069907A (en) X-ray machine image recognition method, device and system based on example segmentation
CN108229583A (en) A kind of method and device of the fast Template Matching based on principal direction Differential Characteristics
JP2015023858A (en) Forest phase analyzer, forest phase analysis method and program
CN114898131B (en) Method and system for detecting forbidden articles based on natural guidance and data enhancement
JP2007199865A (en) Image processing algorithm evaluation apparatus, image processing algorithm creation apparatus, image inspection apparatus, method for evaluating image processing algorithm, method for creating image processing algorithm, and method for inspecting image
US10248697B2 (en) Method and system for facilitating interactive review of data
Abdulla et al. Effective and efficient optics inspection approach using machine learning algorithms
CN109558891B (en) Identification model construction method and gastrointestinal disease early warning method based on tongue diagnosis
CA2997335C (en) Automatically generating image datasets for use in image recognition and detection
CN105868681A (en) CCTV channel logo identification method and apparatus
CN115512282B (en) Automatic online testing method and device for target tracking system
CN111784719B (en) Method and device for sensing page hotspot distribution accuracy based on picture analysis situation

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20210601

RJ01 Rejection of invention patent application after publication