WO2019154383A1 - 刀具检测方法及装置 - Google Patents

刀具检测方法及装置 Download PDF

Info

Publication number
WO2019154383A1
WO2019154383A1 PCT/CN2019/074658 CN2019074658W WO2019154383A1 WO 2019154383 A1 WO2019154383 A1 WO 2019154383A1 CN 2019074658 W CN2019074658 W CN 2019074658W WO 2019154383 A1 WO2019154383 A1 WO 2019154383A1
Authority
WO
WIPO (PCT)
Prior art keywords
tool
image
network
region
automatic
Prior art date
Application number
PCT/CN2019/074658
Other languages
English (en)
French (fr)
Inventor
李元景
李荐民
张丽
顾建平
戴诗语
秦峰
徐斌
Original Assignee
同方威视技术股份有限公司
清华大学
同方威视科技江苏有限公司
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 同方威视技术股份有限公司, 清华大学, 同方威视科技江苏有限公司 filed Critical 同方威视技术股份有限公司
Priority to EP19750746.0A priority Critical patent/EP3696725A4/en
Publication of WO2019154383A1 publication Critical patent/WO2019154383A1/zh
Priority to IL271806A priority patent/IL271806A/en

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
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/82Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • G06F18/2413Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on distances to training or reference patterns
    • 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/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/24Aligning, centring, orientation detection or correction of the image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/25Determination of region of interest [ROI] or a volume of interest [VOI]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/255Detecting or recognising potential candidate objects based on visual cues, e.g. shapes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/764Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements

Definitions

  • the present disclosure relates to the field of security inspection technology, and in particular to a tool detection method and apparatus, an electronic device, and a computer readable medium.
  • the tool is a device with direct lethality and destructive power.
  • the illegal carrying of knives has potential dangers and social hidden dangers, which will directly affect social stability and the safety of people's lives and property.
  • the illegal tooling that flows into the market and society, on the one hand, provides some premeditated criminals with extremely harmful criminal tools, which increases social instability; on the other hand, it will intensify and expand social conflicts. .
  • the increasing number of injuries has reflected that the relevant testing methods are not in place, giving criminals a chance.
  • Radiation imaging is a technique that uses high-energy rays to penetrate an object to observe the inside of the object, reflecting the shape of the hidden tool in the vehicle/container.
  • the radiation imaging inspection system has implemented the vehicle/container fluoroscopy function, it still relies heavily on manual inspection tasks. Dangerous goods and prohibited items vary widely.
  • the tool has a small target relative to the vehicle/container, and the probability of occurrence is low.
  • the artificial experience is uneven, and the work of checking the pictures one by one is huge. It is very likely that the tool will be identified for a long time. Visual fatigue, it is inevitable that misdetection or even missed inspection will occur.
  • the present application discloses a tool detecting method and apparatus capable of automatically detecting whether a tool exists in a radiation image and a position when the tool exists.
  • a tool detection method including: acquiring a tool image database including a tool image, wherein a tool position is marked on a tool image; and the tool image database is trained by PVANET to obtain an automatic tool detection model. And inputting the radiation image to be detected to the automatic tool detection model to obtain a detection result, the detection result including whether there is a tool in the radiation image and a tool position when the tool is present.
  • the acquiring a tool image database including the tool image includes: collecting tool images of different numbers and different kinds of placement forms; normalizing the tool image; and extracting the normalized tool The region of interest of the image at which the tool location is labeled.
  • the normalizing the tool image comprises: scaling the original tool image resolution according to the physical parameters of the scanning device that acquires the tool image; and performing grayscale stretching on the scaled tool image.
  • the tool automatic detection model is obtained, including: extracting features of the tool image; and suggesting network and convolution according to the characteristics of the tool image and the region of interest of the tool image.
  • a neural network is used to establish the automatic tool detection model.
  • extracting features of the tool image includes extracting features of the tool image using a ReLU, an Inception module, and a HyperNet module.
  • the tool automatic detection model is established according to the feature of the tool image and the region of interest training region suggestion network and the convolutional neural network of the tool image, including: training the region suggestion network and the institute by using an alternate training manner Deconvolution neural network.
  • training the regional suggestion network and the convolutional neural network in an alternate training manner comprises: initializing the regional suggestion network and a bias and weight matrix of the convolutional neural network; a region establishing a network extraction candidate region; performing positive and negative sample calibration on the candidate region; combining the calibrated candidate region with the initialized convolutional neural network, fine-tuning the convolutional neural network, the region suggesting network and the convolution
  • the neural network does not share the convolutional layer;
  • the convolutional layer of the regional suggestion network is initialized using the trained convolutional neural network convolutional layer parameters, and the regional suggestion network is continued to be trained, and the regional suggestion network and the convolutional neural network share the convolution Layer; keep the shared convolution layer unchanged, continue to fine-tune the convolutional neural network, update the offset and weight matrix until convergence, and establish the automatic tool detection model.
  • the extraction candidate region employs an anchor mechanism for target object detection in the region suggestion network
  • 42 anchors of varying size are used.
  • obtaining the detection result of the tool comprises: normalizing the radiation image; and inputting the normalized radiation image to The tool automatically detects the model and obtains the detection result of the tool.
  • obtaining the detection result of the tool comprises: generating a candidate region of the radiation image according to the normalized processed radiation image; The candidate region of the radiation image performs tool classification; when the confidence of the tool in the candidate region is greater than a preset threshold, determining that a tool exists in the candidate region, and calibrating the tool; filtering all candidate regions in which the tool exists, Filter the overlap box to get the tool position.
  • a tool detecting apparatus comprising: a training data acquiring module for acquiring a tool image database including a tool image, wherein a tool position is marked on a tool image; and a model training module for adopting PVANET Performing training on the tool image database to obtain an automatic tool detection model; and an automatic tool detection module for inputting a radiation image to be detected to the automatic tool detection model to obtain a detection result, the detection result including the radiation image Whether there is a tool in it and the tool position when the tool is present.
  • an electronic device includes: one or more processors; storage means for storing one or more programs; and when the one or more programs are The processor executes such that the one or more processors implement the method as described in any of the above embodiments.
  • a computer readable medium having stored thereon is a computer program, wherein the program is executed by a processor to implement the method of any of the above embodiments.
  • a tool detection method and apparatus, an electronic device, and a computer readable medium disclosed in some embodiments of the present disclosure acquire a tool image database including a tool image, wherein a tool position is marked on a tool image; and the tool image database is used by PVANET Training is performed to obtain an automatic tool detection model; the radiation image to be detected is input to the automatic tool detection model, which can automatically detect whether there is a tool in the radiation image and the position when the tool exists, thereby improving the accuracy and detection of the tool detection. speed.
  • FIG. 1 illustrates a flow chart of a tool detecting method according to an example embodiment of the present disclosure
  • FIG. 2 shows a schematic diagram of a typical tool image in accordance with an example embodiment of the present disclosure
  • FIG. 3 illustrates a flowchart of a tool detecting method according to another example embodiment of the present disclosure
  • FIG. 4 is a schematic diagram showing a process of establishing a tool automatic detection model according to an exemplary embodiment of the present disclosure
  • FIG. 5 illustrates a schematic diagram of an Inception module in accordance with an example embodiment of the present disclosure
  • FIG. 6 illustrates a schematic diagram of multi-scale hop layer feature extraction according to an example embodiment of the present disclosure
  • FIG. 7 illustrates a flowchart of a tool detecting method according to an example embodiment of the present disclosure
  • FIG. 8 illustrates a schematic diagram of a tool detection result according to an example embodiment of the present disclosure
  • FIG. 9 illustrates a schematic diagram of a tool detecting device according to an example embodiment of the present disclosure
  • FIG. 10 illustrates a schematic diagram of an electronic device in accordance with an example embodiment of the present disclosure
  • FIG. 11 shows a schematic diagram of a computer readable storage medium in accordance with an example embodiment of the present disclosure.
  • the tool detecting method provided by the embodiments of the present disclosure can automatically apply the tool based on deep learning on the basis of radiation imaging, and can be applied to automatic detection of a vehicle/container carrying tool.
  • the tool detecting method provided by the embodiment of the present disclosure automatically detects whether there is a tool in the radiation image to be detected by using a radiation imaging method during the inspection. If there is a tool, the position of the tool in the corresponding radiation image is given, which assists in manually determining whether there is a case of illegally carrying the tool.
  • FIG. 1 illustrates a flow chart of a tool detection method in accordance with an example embodiment of the present disclosure.
  • the tool detecting method may include the following steps.
  • step S110 a tool image database including a tool image is acquired, wherein the tool position is marked on the tool image.
  • FIG. 2 shows a schematic diagram of a typical tool image in accordance with an example embodiment of the present disclosure.
  • the acquiring a tool image database including the tool image includes: collecting tool images of different numbers and different kinds of placement forms; normalizing the tool image; and extracting normalization processing The region of interest of the tool image in which the tool position is marked.
  • the input data is normalized before the start of the model training, because once the training data and the test data are distributed differently, the generalization ability of the model is greatly reduced; on the other hand, once The distribution of each batch of training data is different (batch gradient is reduced), then the model learns to adapt to different distributions in each iteration, which will greatly reduce the training speed of the network.
  • the normalizing the tool image comprises: scaling the original tool image resolution according to the physical parameters of the scanning device that collects the tool image; performing grayscale drawing on the scaled tool image Stretch.
  • Grayscale stretching also known as contrast stretching, is a grayscale transformation that uses a piecewise linear transformation function to improve the dynamic range of grayscale levels during image processing. You can selectively stretch a segment of gray to improve the output image.
  • the tool detection method provided by the embodiments of the present disclosure is mainly based on the deep learning theory, and is trained by CNN to obtain an automatic tool detection model.
  • the tool detection method mainly includes: ) Establish a tool image database; 2) Establish a tool automatic detection model; 3) Automatic tool detection process.
  • establishing the tool image database may further include image acquisition, image preprocessing, and region of interest extraction.
  • Tool automatic detection mainly includes image preprocessing, judgment and marking of suspect areas. The following describes the creation of a tool image database.
  • a tool image database needs to be created, which may include the following steps.
  • the tool image In this embodiment, a certain number of tool images are collected, so that the tool image database contains tool images of different numbers and different types of placements, and the tool image database is acquired.
  • Figure 1 shows a typical image of the tool.
  • the tool detecting method provided by the embodiment of the present disclosure has generalization ability by enriching the diversity of the tool samples.
  • the acquired tool image is preprocessed. Due to the different scanning devices, the energy/dose of the source is different and the detector size is different, so the obtained tool images are not the same.
  • the acquired tool image is normalized. For example, assuming that the original two-dimensional image signal of the acquired tool is X, according to the physical parameters of the scanning device that collects the original two-dimensional image signal, the X resolution is scaled to, for example, 5 mm/pixel, and the grayscale stretching is performed. Get normalized tool image
  • the tool image obtained by normalizing the above is subjected to Region of Interest (ROI) extraction.
  • ROI Region of Interest
  • the tool position is manually labeled in the tool unit, and the coordinates (x, y, w, h) where the tool is located are given, where w is wide and h is high.
  • x, y are the coordinate positions of the upper left corner of the tool, for example, the upper left corner of the figure is the origin, but the disclosure is not limited thereto.
  • the detection The air portion in the middle is excluded from the inspection process.
  • One purpose is to increase the speed of the operation, and the second is to avoid false alarms in the air.
  • a pixel larger than t a is considered to be air and no detection calculation is performed.
  • step S120 the tool image database is trained using PVANET to obtain a tool automatic detection model.
  • RCNN Region-based Convolutional Networks , region-based convolutional network
  • PVANET lightweight network model PVANET for high-accuracy target detection
  • PVAnet is the target direction of RCNN series, based on Faster-RCNN
  • the Faster-RCNN basic network can use ZF, VGG, Resnet, etc., but the accuracy and speed are difficult to improve at the same time.
  • PVAnet Performance Vs Accuracy, which means to accelerate the performance of the model without losing the meaning of precision.
  • CNN feature extraction + region proposal + region classification (RoI classification, region of interest, region of interest (ROI) is an image region selected from the image, This area is the focus of image analysis. Delineating this area for further processing can reduce processing time and increase accuracy.
  • ROI region of interest
  • ROI region of interest
  • the feature extraction part can be redesigned using the Concatenated rectified linear unit (ReLU), the Inception module, and the multi-scale idea of HyperNet.
  • ReLU Concatenated rectified linear unit
  • the Inception module is used in the sub-network for generating features, and the Inception module is suitable for detection of a small or large target object, and the tool carried by the vehicle/container to be detected in the embodiment of the present disclosure belongs to a small target object.
  • the "small” here is a relative concept, that is, the volume of the tool is a small target object relative to the vehicle/container in which the tool is placed), and the Inception module can improve the performance of the neural network while reducing the classification accuracy. Calculating the amount and speeding up; HyperNet proposes different sampling strategies for different convolutional layers and integrates multi-scale hopping features, which also makes small target objects perform better.
  • the tool image database is trained using PVANET to obtain a tool automatic detection model, including: extracting features of the tool image; and suggesting a network based on the characteristics of the tool image and the region of interest of the tool image.
  • a convolutional neural network is used to establish the automatic tool detection model.
  • extracting features of the tool image includes extracting features of the tool image using a ReLU, Inception module, and HyperNet (High Level Fusion Network) module.
  • the tool automatic detection model is established according to a feature of the tool image and a region of interest training region suggestion network and a convolutional neural network of the tool image, including: training the region suggestion network in an alternate training manner And the convolutional neural network.
  • the regional suggestion network and the convolutional neural network are trained in an alternate training manner, comprising: initializing a bias and weight matrix of the regional suggestion network and the convolutional neural network; utilizing Forming, by the region, a network extraction candidate region; performing positive and negative sample calibration on the candidate region; combining the calibrated candidate region with the initialized convolutional neural network, fine-tuning a convolutional neural network, the region suggesting network, and the The convolutional neural network does not share the convolutional layer; the convolutional layer of the regional suggestion network is initialized using the trained convolutional neural network convolutional layer parameters, and the regional suggestion network is continued to be trained, and the regional suggestion network and the convolutional neural network share Convolutional layer; keep the shared convolutional layer unchanged, continue to fine-tune the convolutional neural network, update the bias and weight matrix until convergence, and establish the automatic tool detection model.
  • fine tuning is a term of deep learning, that is, a process of continuing training by using new data.
  • the extraction candidate region employs a anchor mechanism for detecting target objects in the region suggestion network
  • 42 anchors of different area sizes are used.
  • 42 sizes of anchors having different area sizes may range from 60*60 to 1060*580. That is, 42 kinds of anchors contain a minimum size of 60*60 pixels, and the maximum size is 1060*580 pixels, so that the minimum size can meet the needs of small target detection, and can also meet different target sizes through different sizes. demand.
  • the theory of deep learning is used to detect whether the vehicle/container carries the tool. Since the tool carried in the vehicle/container belongs to a small target object, the lightweight network PVANET achieves the goal of optimizing the depth neural network calculation while realizing the high-precision small-target detection task.
  • CNN is used as an example, and the feature of the feature extraction algorithm is improved by using the idea of using cascaded ReLU, Inception module and HyperNet multi-scale in PVANET, so that the designed tool detection method is more suitable for detecting vehicles/containers.
  • Automatic detection of small target objects carrying tools The original separated candidate region extraction is merged with the CNN classification, wherein the candidate region extraction adopts an Anchor mechanism of Region Proposal Networks (RPN) suitable for detection of a small target object, which is different from Faster R-CNN.
  • RPN Region Proposal Networks
  • a cascaded ReLU Concatenated rectified linear unit
  • the Inception module is used in the sub-network that generates the feature, because the Inception module can efficiently capture small target objects in the image, which can satisfy the small target object such as the tool carried in the vehicle/container.
  • the CNN output characteristic should correspond to a small enough receptive field.
  • the neurocentric impulse (various sensory information) is transmitted to the upper center through the centripetal neurons in the receptor, and a neuron responds (
  • the stimulating region that governs is called the neuron's receptive field) to accurately locate the small region of interest, and also avoids parameter redundancy caused by large convolution kernels.
  • the design of the Inception module in this embodiment is shown in Figure 5.
  • the designed Inception module increases the nonlinearity of the input mode, slows the growth of the receptive field of the output features, and enables accurate capture of small targets that carry tools in the vehicle/container. object.
  • HyperNet is used in this embodiment.
  • HyperNet proposes different sampling strategies for different convolutional layers and integrates the hopping features to make the small target object perform better.
  • the final layer and the two intermediate layers are integrated (the last is the last The layer size is 2 times and 4 times), and the 2 times layer is used as the reference standard layer.
  • Figure 6 is a schematic diagram of multi-scale layer feature extraction.
  • convolutional layer 3_4 downsampling
  • convolutional layer 4_4 convolutional layer 5_4 (upsampling) are combined into a 512-channel multi-scale output feature as input to the Faster R-CNN model.
  • FIG. 4 illustrates a schematic diagram of a process of establishing a tool automatic detection model according to an example embodiment of the present disclosure.
  • the automatic tool detection model establishment process in this embodiment is an end-to-end detection method, which can simultaneously achieve target detection and target positioning.
  • the embodiment provides a process for establishing a tool automatic detection model, which includes the following steps.
  • the training samples are preprocessed, then the CNN features (by the cascade ReLU+Inception module+HyperNet layer feature extraction) and the region of interest are extracted, the RPN network is trained according to the extracted CNN features and the region of interest, and then the candidate regions are extracted to perform CNN.
  • the network is detected, updated until convergence, and the model is established. This includes reverse tuning of the training RPN network and the CNN detection network.
  • ReLU is mainly used for convolution of the first few layers, and the original convolutional layer (conv layer) is reversed, scaled and drifted, which can reduce the output channel by half, and then obtain the corresponding output channel by taking the negative. Increase the speed by a factor of two. Adding scale changes and offsets allows the slope and activation threshold of each channel to be different from their opposite channels. In this way, that is to say, under half of the parameters, it is possible to implement twice the filter of different parameters. Inception is a good solution for both small and large targets, mainly by controlling the size of the convolution kernel.
  • HyperNet mainly combines convolution feature layers of different scales to perform multi-scale target detection.
  • a regional suggestion method is adopted.
  • RPN network By using an RPN network, candidate region extraction is combined with CNN classification, that is, two modules: an RPN module and a CNN detection module, to implement an end-to-end vehicle/container carrying tool. Detection.
  • the RPN module is different from the use of nine anchors of different sizes and sizes in the Faster R-CNN, and the use of 42 multi-scale and multi-width anchors makes it more suitable for small target objects in vehicles/containers.
  • This embodiment gives an example of an alternate training mode.
  • the specific training process of the alternate training mode is as follows:
  • the first step is to initialize.
  • the input image is scaled to a size within 600 pixels of the short side, and the pre-training model is used to initialize the weights in the RPN network and the CNN detection network.
  • the initial offsets of the visible layer and the hidden layer are a, b, initial weight matrix.
  • the increment of the offset and weight matrix is ⁇ a, ⁇ b, ⁇ W.
  • the candidate region is extracted.
  • the n*n sliding window is used to generate fully connected features of length m dimension, combined with the region of interest in each sliding window, using different scales and image verticals.
  • Wide ratio generation candidate area At the same time, a full-join layer of two branches is generated on this layer feature: a rectangular frame classification layer and a rectangular frame regression layer, and there are 2*k and 4*k candidate regions on the two different layers respectively.
  • k is set to 300, and sorted by the overlapped area of all the extracted candidate areas with the actually labeled rectangular frame, and filtered, that is, filtered, 300 candidate areas are obtained.
  • the present disclosure is not limited to this.
  • the third step is the calibration of positive and negative samples.
  • the candidate region is subjected to positive and negative sample calibration.
  • the calibration rule may be: when the rectangular frame of the candidate region overlaps with the true value is greater than 0.7, it is considered as a positive sample, and when the candidate region is rectangular The overlap of the true values is less than 0.3, which is calibrated as a negative sample, and the remaining is discarded, and is not used for training.
  • the candidate region obtained in the third step is combined with the CNN detection network obtained in the first step, and the CNN detection network is fine-tuned.
  • the two networks that is, the RPN network and the CNN detection network do not share the convolutional layer data.
  • the fourth step of the trained CNN detection network is used to initialize the RPN network and train.
  • the convolutional layer data is fixed, and only the part of the network layer belonging to the RPN is fine-tuned.
  • the two networks, the RPN network and the CNN detection network share the convolutional layer.
  • is the learning rate, which can be set to 0.0001, but different training stages are different, and it is also related to the batch size.
  • the embodiment in the process of training the neural network, as the depth of the network increases, the embodiment also adopts 1) adding residual structures in the Inception module to stably detect the second half of the deep neural network framework; 2) Add Batch normalization before all ReLU activation; 3) Effectively train based on plateau detection to dynamically control learning rate.
  • step S130 the radiation image to be detected is input to the tool automatic detection model, and a detection result is obtained, the detection result including whether there is a tool in the radiation image and a tool position when the tool is present.
  • obtaining the detection result of the tool includes: normalizing the radiation image; and normalizing the radiation image Input to the tool automatic detection model to obtain the detection result of the tool.
  • obtaining the detection result of the tool comprises: generating a candidate region of the radiation image according to the normalized processed radiation image; The candidate region of the radiation image performs tool classification; when the confidence of the tool in the candidate region is greater than a preset threshold, determining that a tool exists in the candidate region, and calibrating the tool; and performing candidate regions of all existing tools Filter and filter out the overlapping frames to get the tool position.
  • the preset threshold of the confidence level of the tool can generally be set to 0.6-0.8.
  • NMS non-maximum suppression
  • the test process is actually a subset of the tool automatic detection model establishment process.
  • By classifying the generated candidate regions it is possible to determine whether there is a tool in the region, and at the same time, the specific position of the tool in the candidate region is regressed, and the regression method is adopted. Regularized regression is performed on the position of the real target rectangular frame and the predicted position of the target rectangular frame region.
  • Figure 8 shows the inspection diagram marked in the form of a rectangular frame. Where p is the probability of the tool and 0.8 is the threshold.
  • the tool detecting method provided by the embodiment of the present disclosure is an automatic detecting method for a vehicle/container carrying tool based on deep learning, which can be applied to automatic detection of contraband in a radiation image, and can simultaneously achieve target detection and target positioning.
  • the object is automatically detected by deep learning, which solves the problem that the target size of the tool is smaller than the size of the container, which leads to missed detection, and the method of expanding the sample set overcomes the difficulty of convergence due to the lack of training samples. It can automatically and accurately detect whether there is a tool in the container radiation image. If there is a tool, it gives the position of the tool in the image, which assists in manually judging whether there is an illegal carrying case.
  • the performance of the tool detecting method provided by the embodiment is also a task that must be considered.
  • the detection method must have a low false positive rate and a false negative rate, and must meet the requirements of real-time detection.
  • the false detection rate of the tool detection method provided by this embodiment is less than 0.5%, the false negative rate is less than 10%, and the calculation is completed within 1 second, which satisfies the above application requirements.
  • FIG. 3 illustrates a flow chart of a tool detection method in accordance with another example embodiment of the present disclosure.
  • the tool detecting method provided in this embodiment may include the following steps.
  • step S210 a radiation image is acquired.
  • step S220 the radiation image is preprocessed.
  • model training process and the tool automatic detection process are regarded as a similar process, and it is necessary to first obtain the radiation image of the vehicle/container, and then normalize the radiation image, if the radiation image is used for The model training process is used as training data. If the radiation image is used in the automatic tool detection process, the pre-processed radiation image is input into the trained tool automatic detection model for detection.
  • step S230 a tool automatic detection model/automatic detection is established.
  • the tool detection method provided by the embodiment of the present invention performs tool detection on the radiation image obtained by scanning, which can avoid the problem of detecting loopholes in traditional methods and poor effect of manual judgment, and is of great significance for combating illegal carrying of a knife, and has been practical. Verification has good performance and is very practical.
  • FIG. 7 illustrates a flow chart of a tool detection method in accordance with an example embodiment of the present disclosure.
  • the tool detecting method in this embodiment includes the following steps.
  • step S131 a radiation image to be detected is acquired.
  • step S132 the radiation image to be detected is preprocessed.
  • step S133 the pre-processed radiation image is input to the tool automatic detection model.
  • step S134 it is determined whether the tool is detected in the radiation image by the tool automatic detection model; when the tool is detected, the process proceeds to step S135; and when the tool is not detected, the process proceeds to step S136.
  • step S135 the radiation image of the detected tool is marked to remind the manual confirmation.
  • step S136 the radiation image of the tool is not detected, that is, it is not marked.
  • the tool automatic detection first preprocesses the collected tool radiation image.
  • the preprocessing method can refer to the normalization processing method in the above tool automatic detection model, which will not be described in detail herein.
  • the obtained radiation image preprocessed by the tool is input into the automatic tool detection model, a candidate area is generated in the input image, and the tool is classified into the candidate area. If the confidence of the tool in the area is greater than a preset threshold, the tool is considered to exist in the area.
  • the rectangular frame calibration is performed, and finally all the candidate regions existing in the tool are filtered to obtain the final tool position.
  • FIG. 9 shows a schematic structural view of a tool detecting device according to an exemplary embodiment of the present disclosure.
  • the tool detecting device 100 may include a training data acquiring module 110, a model training module 120, and a tool automatic detecting module 130.
  • the training data acquisition module 110 can be used to acquire a tool image database including a tool image, wherein the tool image is marked on the tool image.
  • the model training module 120 can be used to train the tool image database with PVANET to obtain a tool automatic detection model.
  • the tool automatic detection module 130 may be configured to input a radiation image to be detected to the tool automatic detection model to obtain a detection result, the detection result including whether a tool exists in the radiation image and a tool position when a tool exists.
  • the training data acquisition module 110 may include an image acquisition sub-module, a first normalization sub-module, and a region of interest extraction sub-module.
  • the image acquisition sub-module can be used to collect tool images of various placements in different numbers and types.
  • the first normalization sub-module can be used to normalize the tool image.
  • the region of interest extraction sub-module may be used to extract a region of interest of the normalized processed tool image, and mark the tool location in the region of interest.
  • the first normalization sub-module may include a scaling unit and a stretching unit.
  • the scaling unit can be used to scale the original tool image resolution according to the physical parameters of the scanning device that collects the tool image.
  • the stretching unit can be used to perform grayscale stretching on the scaled tool image.
  • the model training module 120 can include a feature extraction sub-module and a model building sub-module.
  • the feature extraction sub-module can be used to extract features of the tool image.
  • the model building sub-module may be configured to establish the tool automatic detection model according to a feature of the tool image and a region of interest training region suggestion network and a convolutional neural network of the tool image.
  • the feature extraction sub-module may include a feature extraction unit.
  • the feature extraction unit may be configured to extract features of the tool image using the ReLU, the Inception module, and the HyperNet module.
  • the model building sub-module may include a network training unit.
  • the network training unit may be configured to train the regional suggestion network and the convolutional neural network in an alternate training manner.
  • the network training unit may include an initialization subunit, a candidate region extraction subunit, a sample target stator unit, a first fine adjustment subunit, a region suggestion network training subunit, and a second fine adjustment subunit.
  • the initialization subunit may be configured to initialize the regional suggestion network and the offset and weight matrix of the convolutional neural network.
  • the candidate region extraction subunit may be configured to establish a network extraction candidate region by using the region.
  • the sample target stator unit can be used to perform positive and negative sample calibration on the candidate region.
  • the first fine tuning sub-unit may be configured to combine the calibrated candidate region with the initialized convolutional neural network to fine tune the convolutional neural network, the regional suggestion network and the convolutional neural network not sharing the convolutional layer.
  • the area suggesting network training subunit may be configured to initialize a convolution layer of the area suggestion network using the trained convolutional neural network convolutional layer parameters, and continue to train the area suggestion network, the area suggestion network and the convolutional neural network Shared convolutional layer.
  • the second fine-tuning sub-unit may be configured to keep the shared convolution layer unchanged, continue to fine-tune the convolutional neural network, update the offset and weight matrix until convergence, and establish the automatic tool detection model.
  • the extraction candidate region employs an anchor mechanism for target object detection in the region suggestion network
  • 42 anchors of varying size are used.
  • the tool automatic detection module 130 may include a second normalization sub-module and a detection sub-module.
  • the second normalization sub-module can be used to normalize the radiation image.
  • the detecting submodule may be configured to input the normalized processed radiation image to the automatic tool detection model to obtain a detection result of the tool.
  • the detection sub-module may include a candidate area extraction unit, a tool classification unit, a tool calibration unit, and a position acquisition unit.
  • the candidate region extracting unit may be configured to generate a candidate region of the radiation image according to the normalized processed radiation image.
  • the tool classification unit may be configured to perform tool classification on candidate regions of the radiation image.
  • the tool calibration unit may be configured to determine that a tool exists in the candidate area when the confidence of the tool in the candidate area is greater than a preset threshold, and calibrate the tool.
  • the position obtaining unit may be configured to filter all candidate regions in which the tool exists, filter out the overlapping frames, and obtain a tool position.
  • FIG. 10 is a block diagram of an electronic device, according to an exemplary embodiment.
  • FIG. 10 An electronic device 200 according to this embodiment of the present invention will be described below with reference to FIG. 10 is merely an example and should not impose any limitation on the function and scope of use of the embodiments of the present invention.
  • electronic device 200 is embodied in the form of a general purpose computing device.
  • the components of the electronic device 200 may include, but are not limited to, at least one processing unit 210, at least one storage unit 220, a bus 230 connecting different system components (including the storage unit 220 and the processing unit 210), a display unit 240, and the like.
  • the storage unit stores program code, and the program code may be executed by the processing unit 210, such that the processing unit 210 performs various exemplary embodiments according to the present invention described in the electronic recipe flow processing method section of the present specification.
  • the processing unit 210 can perform the steps as shown in FIG.
  • the storage unit 220 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 2201 and/or a cache storage unit 2202, and may further include a read only storage unit (ROM) 2203.
  • RAM random access storage unit
  • ROM read only storage unit
  • the storage unit 220 may also include a program/utility 2204 having a set (at least one) of the program modules 2205, including but not limited to: an operating system, one or more applications, other program modules, and programs. Data, each of these examples or some combination may include an implementation of a network environment.
  • Bus 230 may be representative of one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local area using any of a variety of bus structures. bus.
  • the electronic device 200 can also communicate with one or more external devices 300 (eg, a keyboard, pointing device, Bluetooth device, etc.), and can also communicate with one or more devices that enable the user to interact with the electronic device 200, and/or with Any device (eg, router, modem, etc.) that enables the electronic device 200 to communicate with one or more other computing devices. This communication can take place via an input/output (I/O) interface 250.
  • electronic device 200 can also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and/or a public network, such as the Internet) via network adapter 260.
  • Network adapter 260 can communicate with other modules of electronic device 200 via bus 230.
  • the example embodiments described herein may be implemented by software or by software in combination with necessary hardware. Therefore, the technical solution according to an embodiment of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network.
  • a non-volatile storage medium which may be a CD-ROM, a USB flash drive, a mobile hard disk, etc.
  • a number of instructions are included to cause a computing device (which may be a personal computer, server, or network device, etc.) to perform the above described tool detection method in accordance with an embodiment of the present disclosure.
  • FIG. 11 is a schematic diagram of a computer readable medium according to an exemplary embodiment.
  • a program product 400 for implementing the above method which may employ a portable compact disk read only memory (CD-ROM) and includes program code, and may be in a terminal device, is illustrated in accordance with an embodiment of the present invention.
  • CD-ROM portable compact disk read only memory
  • the program product of the present invention is not limited thereto, and in the present document, the readable storage medium may be any tangible medium containing or storing a program that can be used by or in connection with an instruction execution system, apparatus or device.
  • the program product can employ any combination of one or more readable media.
  • the readable medium can be a readable signal medium or a readable storage medium.
  • the readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples (non-exhaustive lists) of readable storage media include: electrical connections with one or more wires, portable disks, hard disks, random access memory (RAM), read only memory (ROM), erasable Programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the foregoing.
  • the computer readable storage medium can include a data signal that is propagated in a baseband or as part of a carrier, in which readable program code is carried. Such propagated data signals can take a variety of forms including, but not limited to, electromagnetic signals, optical signals, or any suitable combination of the foregoing.
  • the readable storage medium can also be any readable medium other than a readable storage medium that can transmit, propagate or transport a program for use by or in connection with an instruction execution system, apparatus or device.
  • Program code embodied on a readable storage medium may be transmitted by any suitable medium, including but not limited to wireless, wireline, optical cable, RF, etc., or any suitable combination of the foregoing.
  • Program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C++, etc., including conventional procedural Programming language—such as the "C" language or a similar programming language.
  • the program code can execute entirely on the user computing device, partially on the user device, as a stand-alone software package, partially on the remote computing device on the user computing device, or entirely on the remote computing device or server. Execute on.
  • the remote computing device can be connected to the user computing device via any kind of network, including a local area network (LAN) or wide area network (WAN), or can be connected to an external computing device (eg, provided using an Internet service) Businesses are connected via the Internet).
  • LAN local area network
  • WAN wide area network
  • Businesses are connected via the Internet.
  • the computer readable medium carries one or more programs that, when executed by one of the devices, cause the computer readable medium to perform a function of acquiring a tool image database including a tool image, wherein the tool image is Marking the tool position; training the tool image database with PVANET to obtain a tool automatic detection model; inputting the radiation image to be detected to the tool automatic detection model to obtain a detection result, the detection result including the radiation image Whether there is a tool in it and the tool position when the tool is present.
  • modules may be distributed in the device according to the description of the embodiments, or may be correspondingly changed in one or more devices different from the embodiment.
  • the modules of the above embodiments may be combined into one module, or may be further split into multiple sub-modules.
  • the exemplary embodiments described herein may be implemented by software, or may be implemented by software in combination with necessary hardware. Therefore, the technical solution according to the embodiment of the present invention may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network.
  • a non-volatile storage medium which may be a CD-ROM, a USB flash drive, a mobile hard disk, etc.
  • a number of instructions are included to cause a computing device (which may be a personal computer, server, mobile terminal, or network device, etc.) to perform a method in accordance with an embodiment of the present invention.

Landscapes

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

Abstract

本申请涉及一种刀具检测方法及装置,属于安全检查技术领域。该刀具检测方法包括:获取包括刀具图像的刀具图像数据库,其中刀具图像上标注出刀具位置;采用PVANET对所述刀具图像数据库进行训练,获得刀具自动检测模型;将待检测的辐射图像输入至所述刀具自动检测模型,获得检测结果,所述检测结果包括所述辐射图像中是否存在刀具以及当存在刀具时的刀具位置。根据本申请的刀具检测方法及装置、电子设备和计算机可读介质,能够检测辐射图像中是否存在刀具以及到刀具存在时的位置。

Description

刀具检测方法及装置
本公开要求申请日为2018年2月6日、申请号为CN201810117890.2、发明创造名称为《刀具检测方法及装置》的发明专利申请的优先权。
技术领域
本公开涉及安全检查技术领域,具体而言,涉及一种刀具检测方法及装置、电子设备和计算机可读介质。
背景技术
刀具是具有直接杀伤力、破坏力的器械。违法携带刀具行为具有潜在的危险性和社会隐患性,将会直接影响社会安定和人民群众生命财产安全。非法流入市场和社会的管制刀具,一方面,给部分有预谋的犯罪分子提供了危害性极大的犯罪工具,增加了社会的不稳定性;另一方面,会使得社会矛盾激烈化、扩大化。一旦违法携带刀具者与他人发生矛盾冲突,事态发展极有可能失去控制。所以,刀具检测是安全检查领域一项重要的任务,对有效打击违法携带刀具行为有着重要意义。其伤害事件日益增多反映出相关检测手段不到位,给犯罪分子可乘之机。
目前,各国警方都采用安全检查技术对危险物品、违禁物品进行有针对性的安全检查来预防和打击犯罪恐怖活动,其中,辐射成像是在车辆/集装箱安全检查任务上最常用的技术之一。
辐射成像是一种利用高能射线穿透物体观察物体内部的技术,可以反映出车辆/集装箱中隐藏刀具的形状。虽然当前已有辐射成像检查***实现了车辆/集装箱透视检查功能,但依旧严重依赖人工执行检查任务。而危险物品、违禁物品千差万别,刀具相对于车辆/集装箱目标较小,出现概率较低,再加上人工经验参差不齐,逐一检查图片工作量巨大,长时间辨认小目标刀具,极可能会造成视觉上疲劳,难免会发生错检甚至漏检的情况。
现有的利用计算机技术进行辅助检测的技术主要依靠传统人工设计的特征,使用诸如HAAR特征、SURF((Speed Up Robust Features,)特征、LBP(Local Binary Pattern,局部二值模式)特征等特征算子进行识别。而传统特征提取很难设计出一个很好的特征,即便是采用多种特征结合的方式也难以做到特征通用,在面对复杂多变的背景时算法甚至可能失效。因此,提高刀具检测的自动化程度和检测速度也成为关注的重点。
因此,需要一种新的刀具检测方法及装置。
在所述背景技术部分公开的上述信息仅用于加强对本公开的背景的理解,因此它可以包括不构成对本领域普通技术人员已知的现有技术的信息。
发明内容
本申请公开一种刀具检测方法及装置,能够自动检测辐射图像中是否存在刀具以及当刀具存在时的位置。
本公开的其他特性和优点将通过下面的详细描述变得显然,或部分地通过本公开的实践而习得。
根据本公开的一方面,提供一种刀具检测方法,包括:获取包括刀具图像的刀具图像数据库,其中刀具图像上标注出刀具位置;采用PVANET对所述刀具图像数据库进行训练,获得刀具自动检测模型;将待检测的辐射图像输入至所述刀具自动检测模型,获得检测结果,所述检测结果包括所述辐射图像中是否存在刀具以及当存在刀具时的刀具位置。
根据一些实施例,其中获取包括刀具图像的刀具图像数据库,包括:采集不同数量、不同种类下各种摆放形式的刀具图像;对刀具图像进行归一化处理;提取归一化处理后的刀具图像的感兴趣区域,在所述感兴趣区域标注刀具位置。
根据一些实施例,其中对刀具图像进行归一化处理,包括:根据采集刀具图像的扫描设备的物理参数,对原始的刀具图像分辨率进行缩放;对缩放后的刀具图像进行灰度拉伸。
根据一些实施例,其中采用PVANET对所述刀具图像数据库进行训练,获得刀具自动检测模型,包括:提取刀具图像的特征;根据刀具图像的特征和刀具图像的感兴趣区域训练区域建议网络和卷积神经网络,建立所述刀具自动检测模型。
根据一些实施例,其中提取刀具图像的特征,包括:采用ReLU、Inception模块和HyperNet模块提取刀具图像的特征。
根据一些实施例,其中根据刀具图像的特征和刀具图像的感兴趣区域训练区域建议网络和卷积神经网络,建立所述刀具自动检测模型,包括:采用交替训练方式训练所述区域建议网络和所述卷积神经网络。
根据一些实施例,其中采用交替训练方式训练所述区域建议网络和所述卷积神经网络,包括:初始化所述区域建议网络和所述卷积神经网络的偏置和权值矩阵;利用所述区域建立网络提取候选区域;对所述候选区域进行正负样本标定;对标定后的候选区域与初始化后的卷积神经网络结合,微调卷积神经网络,所述区域建议网络和所述卷积神经网络不共享卷积层;利用训练好的卷积神经网络卷积层参数初始化区域建议网络的卷积层,继续训练区域建议网络,所述区域建议网络和所述卷积神经网络共享卷积层;保持共享卷积层不变,继续微调卷积神经网络,更新偏置和权值矩阵直至收敛,建立所述刀具自动检测模型。
根据一些实施例,其中提取候选区域采用区域建议网络中的目标物体检测的锚机制,使用42种面积尺寸各异的锚。
根据一些实施例,其中将待检测的辐射图像输入至所述刀具自动检测模型,获得刀具的检测结果包括:对所述辐射图像进行归一化处理;将归一化处理后的辐射图像输入至所述刀具自动检测模型,获得刀具的检测结果。
根据一些实施例,其中将归一化处理后的辐射图像输入至所述刀具自动检测模型,获得刀具的检测结果包括:根据归一化处理后的辐射图像生成辐射图像的候选区域;对所述辐射图像的候选区域进行刀具分类;当候选区域中的刀具的置信度大于预设阈值时,判定所述候选区域中存在刀具,对所述刀具进行标定;将所有存在刀具的候选区域进行过滤,滤除重叠框,获得刀具位置。
根据本公开的另一方面,提供一种刀具检测装置,包括:训练数据获取模块,用于获取包括刀具图像的刀具图像数据库,其中刀具图像上标注出刀具位置;模型训练模块,用于采用PVANET对所述刀具图像数据库进行训练,获得刀具自动检测模型;刀具自动检测模块,用于将待检测的辐射图像输入至所述刀具自动检测模型,获得检测结果,所述检测结果包括所述辐射图像中是否存在刀具以及当存在刀具时的刀具位置。
根据本公开的再一方面,提供一种电子设备,包括:一个或多个处理器;存储装置,用于存储一个或多个程序;当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如上述实施例中任一所述的方法。
根据本公开的再一方面,提供一种计算机可读介质,其上存储有计算机程序,其特征在于,所述程序被处理器执行时实现如上述实施例中任一所述的方法。
根据本公开某些实施例中公开的刀具检测方法及装置、电子设备和计算机可读介质,获取包括刀具图像的刀具图像数据库,其中刀具图像上标注出刀具位置;采用PVANET对所述刀具图像数据库进行训练,获得刀具自动检测模型;将待检测的辐射图像输入至所述刀具自动检测模型,能够自动检测辐射图像中是否存在刀具以及当刀具存在时的位置,提高了刀具检测的准确性和检测速度。
本公开的其他特性和优点将通过下面的详细描述变得显然,或部分地通过本公开的实践而习得。
附图说明
通过参照附图详细描述其示例实施方式,本公开的上述和其它特征及优点将变得更加明显。
图1示出根据本公开一示例实施方式的刀具检测方法的流程图;
图2示出根据本公开一示例实施方式的典型刀具图像的示意图;
图3示出根据本公开另一示例实施方式的刀具检测方法的流程图;
图4示出根据本公开一示例实施方式的刀具自动检测模型的建立过程的示意图;
图5示出根据本公开一示例实施方式的Inception模块的示意图;
图6示出根据本公开一示例实施方式的多尺度跃层特征提取的示意图;
图7示出根据本公开一示例实施方式的刀具检测方法的流程图;
图8示出根据本公开一示例实施方式的刀具检测结果的示意图;
图9示出根据本公开一示例实施方式的刀具检测装置的示意图;
图10示出根据本公开一示例实施方式的电子设备的示意图;
图11示出根据本公开一示例实施方式的计算机可读存储介质的示意图。
具体实施方式
现在将参考附图更全面地描述示例实施例。然而,示例实施例能够以多种形式实施,且不应被理解为限于在此阐述的实施例;相反,提供这些实施例使得本公开将全面和完整,并将示例实施例的构思全面地传达给本领域的技术人员。在图中相同的附图标记表示相同或类似的部分,因而将省略对它们的重复描述。
此外,所描述的特征、结构或特性可以以任何合适的方式结合在一个或更多实施例中。在下面的描述中,提供许多具体细节从而给出对本公开的实施例的充分理解。然而,本领域技术人员将意识到,可以实践本公开的技术方案而没有所述特定细节中的一个或更多,或者可以采用其它的方法、组元、材料、装置、步骤等。在其它情况下,不详细示出或描述公知结构、方法、装置、实现、材料或者操作以避免模糊本公开的各方面。
在违禁品检测中,刀具检测是较薄弱的环节,目前在车辆/集装箱违法携带刀具这一领域,还没有较好的解决方案。本公开实施方式提供的刀具检测方法,在辐射成像的基础上,基于深度学习进行刀具的自动检测,可以将其应用于车辆/集装箱携带刀具自动检测中,当然,本公开对其应用场景并不作限定。本公开实施方式提供的刀具检测方法,在检查过程中,使用辐射成像手段,自动检测待检测的辐射图像中是否有刀具。如果存在刀具,则给出刀具在相应的辐射图像中的位置,以此辅助人工判断是否存在违法携带刀具的案情。
图1示出根据本公开一示例实施方式的刀具检测方法的流程图。
如图1所示,该刀具检测方法可以包括以下步骤。
在步骤S110中,获取包括刀具图像的刀具图像数据库,其中刀具图像上标注出刀具位置。
图2示出根据本公开一示例实施方式的典型刀具图像的示意图。
在示例性实施例中,其中获取包括刀具图像的刀具图像数据库,包括:采集不同数量、不同种类下各种摆放形式的刀具图像;对刀具图像进行归一化处理;提取归一化处理后的刀具图像的感兴趣区域,在所述感兴趣区域标注刀具位置。
本发明实施例中,在模型训练开始前,对输入数据做一个归一化处理,这是因为一旦训练数据与测试数据的分布不同,那么模型的泛化能力也大大降低;另外一方面,一旦每批训练数据的分布各不相同(batch梯度下降),那么模型在每次迭代都去学习适应不同的分布,这样将会大大降低网络的训练速度。
在示例性实施例中,其中对刀具图像进行归一化处理,包括:根据采集刀具图像的扫描设备的物理参数,对原始的刀具图像分辨率进行缩放;对缩放后的刀具图像进行灰度拉伸。
灰度拉伸又叫对比度拉伸,它是一种灰度变换,可以使用分段线性变换函数,从而提高图像处理时灰度级的动态范围。可以有选择的拉伸某段灰度区间以改善输出图像。
为了能够自动检测车辆/集装箱辐射图像中的刀具位置,本公开实施方式提供的刀具检测方法主要是基于深度学习理论,利用CNN进行训练,以获得刀具自动检测模型,该刀具检测方法主要包括:1)建立刀具图像数据库;2)建立刀具自动检测模型;3)刀具自动检测过程。
其中,建立刀具图像数据库可以进一步包括图像获取、图像预处理以及感兴趣区域提取。刀具自动检测主要包括图像预处理、判决以及对嫌疑区域标记。下面对建立刀具图像数据库进行说明。
在刀具自动检测模型建立之前,需要建立刀具图像数据库,可以包括以下步骤。
首先,获取刀具图像。本实施例中,采集一定数量的刀具图像,使刀具图像数据库包含不同数量、不同种类下各个摆放形式的刀具图像,获取刀具图像数据库
Figure PCTCN2019074658-appb-000001
图一为刀具典型图像。本实施例中通过丰富刀具样本的多样性,使得本公开实施方式提供的刀具检测方法具有泛化能力。
接着,对获取的刀具图像进行预处理。由于不同的扫描设备,其射线源的能量/剂量不同,探测器尺寸不同,所以得到的刀具图像不尽相同。为减少个体差异,保证算法有效性,对获取的刀具图像进行归一化处理。例如,假设获取的刀具的原始二维图像信号为X,按照采集该原始二维图像信号的扫描设备的物理参数,将X分辨率缩放到例如5mm/像素,并进行灰度拉伸,即可得到归一化的刀具图像
Figure PCTCN2019074658-appb-000002
然后,对上述进行归一化处理后的刀具图像进行感兴趣区域(ROI,Region Of Interest)提取。本实施例中,在扫描得到的灰度图像中,以刀具为单位,手工标注刀具位置,给出刀具所处的坐标(x,y,w,h),其中w为宽,h为高,x,y分别为刀具左上角的坐标位置,这里例如以图左上角为原点,但本公开并不限定于此。
本发明实施例中,检测
Figure PCTCN2019074658-appb-000003
中的空气部分,排除在检测过程之外。其目的一则是提高运算速度,二则避免在空气中出现误报。统计
Figure PCTCN2019074658-appb-000004
的直方图,在直方图中计算最亮峰值a,并拟合以其为中心的空气正态分布(a,σ a),则设定阈值为t a=a-3*σ a
Figure PCTCN2019074658-appb-000005
中大于t a的像素被认为是空气,不进行检测计算。
在步骤S120中,采用PVANET对所述刀具图像数据库进行训练,获得刀具自动检测模型。
随着计算机计算速度、网络速度、内存容量以及数据规模的各个方面指数增长,深度学习理论得到巨大突破,特别是区域建议方法的出现,产生大量物体检测算法,如:RCNN(Region-based Convolutional Networks,基于区域的卷积网络)算法、Fast R-CNN算法、Faster R-CNN算法以及实现高精确度目标检测的轻量级网络模型PVANET(PVAnet是RCNN系列目标方向,基于Faster-RCNN进行改进,Faster-RCNN基础网络可以使用ZF、VGG、Resnet等,但精度与速度难以同时提高。PVAnet的含义应该为:Performance  Vs Accuracy,意为加速模型性能,同时不丢失精度的含义。)。PVANET在“CNN特征提取(CNN feature extraction)+区域建议(region proposal)+感兴趣区域分类(RoI classification,RoI classification,region of interest,感兴趣区域(ROI)是从图像中选择的一个图像区域,这个区域是图像分析所关注的重点。圈定该区域以便进行进一步处理,可以减少处理时间,增加精度。机器视觉、图像处理中,从被处理的图像以方框、圆、椭圆、不规则多边形等方式勾勒出需要处理的区域,称为感兴趣区域,ROI。在Halcon、OpenCV、Matlab等机器视觉软件上常用到各种算子(Operator)和函数来求得感兴趣区域ROI,并进行图像的下一步处理)”目标检测结构基础上,可以使用串级的ReLU(Concatenated rectified linear unit)、Inception模块和HyperNet的多尺度思想等,对特征提取部分进行重新设计。
其中,在生成特征的子网络中使用了Inception模块,该Inception模块适用于较小或者较大目标物体的检测,而本公开实施例中需检测的车辆/集装箱携带的刀具正是属于小目标物体(这里的“小”是一个相对概念,即刀具的体积相对放置该刀具的车辆/集装箱而言,是一个小目标物体),而且Inception模块在保证分类准确率的同时能提高神经网络性能,减少计算量,加快速度;而HyperNet为不同卷积层提出了不同的采样策略并整合得到多尺度的跃层特征,也使得小目标物体检测表现更加出色。
在示例性实施例中,其中采用PVANET对所述刀具图像数据库进行训练,获得刀具自动检测模型,包括:提取刀具图像的特征;根据刀具图像的特征和刀具图像的感兴趣区域训练区域建议网络和卷积神经网络,建立所述刀具自动检测模型。
在示例性实施例中,其中提取刀具图像的特征,包括:采用ReLU、Inception模块和HyperNet(高层融合网络)模块提取刀具图像的特征。
在示例性实施例中,其中根据刀具图像的特征和刀具图像的感兴趣区域训练区域建议网络和卷积神经网络,建立所述刀具自动检测模型,包括:采用交替训练方式训练所述区域建议网络和所述卷积神经网络。
在示例性实施例中,其中采用交替训练方式训练所述区域建议网络和所述卷积神经网络,包括:初始化所述区域建议网络和所述卷积神经网络的偏置和权值矩阵;利用所述区域建立网络提取候选区域;对所述候选区域进行正负样本标定;对标定后的候选区域与初始化后的卷积神经网络结合,微调卷积神经网络,所述区域建议网络和所述卷积神经网络不共享卷积层;利用训练好的卷积神经网络卷积层参数初始化区域建议网络的卷积层,继续训练区域建议网络,所述区域建议网络和所述卷积神经网络共享卷积层;保持共享卷积层不变,继续微调卷积神经网络,更新偏置和权值矩阵直至收敛,建立所述刀具自动检测模型。
需要说明的是,本实施例中,微调是深度学习的术语,即利用新数据进行参数继续训练的过程。
在示例性实施例中,其中提取候选区域采用区域建议网络中的目标物体检测的锚机 制,使用42种面积尺寸各异的锚(anchor)。
本实施例中,42种面积尺寸各异的锚的尺寸范围可以是60*60至1060*580。即42种anchor包含最小尺寸为60*60个像素点,最大尺寸为1060*580个像素点,这样最小尺寸可以满足对于小目标检出的需求,通过不同尺寸亦可满足不同目标尺寸检出的需求。
在本实施例中,使用深度学习的理论来进行车辆/集装箱是否携带刀具的检测。由于车辆/集装箱中携带刀具属于小目标物体,轻量级网络PVANET在实现了高精确度小目标检测任务的同时,达到优化深度神经网络计算的目标。
本实施例中以CNN为实施例,使用PVANET中采用串级ReLU、Inception模块以及HyperNet多尺度等的思想,对特征提取算法部分进行改进,使得设计出的刀具检测方法更加适合检测车辆/集装箱中携带刀具的小目标物体的自动检测。将原本分离的候选区域提取与CNN分类融合在一起,其中候选区域提取采用的是区域建议网络(Region Proposal Networks,RPN)中适用于较小目标物体的检测的Anchor机制,不同于Faster R-CNN使用9种面积尺寸各异的anchor,本实施例中一共使用了42种面积尺寸各异的anchor,最终实现端到端的深度神经网络进行车辆/集装箱是否携带刀具的检测。
在本实施例中,在CNN训练初期阶段使用了串级的ReLU(Concatenated rectified linear unit,修正线性单元),在保证不损失精度的前提下,减少了计算量。在生成特征的子网络中使用Inception模块,因为Inception模块可以高效的捕获图像中的小目标物体,可满足为了捕获车辆/集装箱中携带的刀具这一类小目标物体。CNN输出特征应该对应于足够小的感受野(receptive field,感受器受刺激兴奋时,通过感受器官中的向心神经元将神经冲动(各种感觉信息)传到上位中枢,一个神经元所反应(支配)的刺激区域就叫做神经元的感受野)来精确定位小的感兴趣区域的要求,也避免了大卷积核造成的参数冗余问题。
本实施例中Inception模块设计如图5所示,设计的Inception模块增加了输入模式的非线性,减慢了输出特征的感受野的增长,使得可以精确地捕获车辆/集装箱中携带刀具的小目标物体。
由于直接连接所有抽象层会产生需大量计算的冗余信息(redundant information),同时为了帮助随后的区域建议网络和分类网络检测车辆/集装箱中携带刀具的小目标物体,本实施例中采用了HyperNet跃层特征的多尺度思想,HyperNet为不同卷积层提出了不同的采样策略并整合得到跃层特征,使小目标物体检测表现更加出色,综合了最后一层和两个中间层(分别是最后一层尺度的2倍和4倍),并将2倍层作为参考标准层,图6为多尺度跃层特征提取的示意图。这里将卷积层3_4(下采样),卷积层4_4、卷积层5_4(上采样)结合为512通道的多尺度输出特征作为Faster R-CNN模型的输入。
图4示出根据本公开一示例实施方式的刀具自动检测模型的建立过程的示意图。本实施例中的刀具自动检测模型建立过程是端到端的检测方法,可以同时实现目标检测和目标定位。
如图4所示,本实施例提供了一种刀具自动检测模型的建立过程,包括以下步骤。
首先预处理训练样本,然后提取CNN特征(通过串级ReLU+Inception模块+HyperNet跃层特征提取)和感兴趣区域,根据提取的CNN特征和感兴趣区域训练RPN网络,接着提取候选区域,进行CNN检测网络,更新直至收敛,模型建立。其中包括对训练RPN网络和CNN检测网络的反向微调。
其中ReLU主要用于卷积前几层,将原本的卷积层(conv层),做了一个取反、尺度变化和漂移,能够降低输出通道一半,然后通过取负得到对应的输出通道,可以提高速度一倍。加入尺度变化和偏移能够允许每一个通道的斜率和激活阈值与它们相反通道的不同。这样,也就是说,在一半的参数下,能够实现两倍的不同参数的filter。Inception对于小目标和大目标都可以很好的解决,主要是通过控制卷积核尺寸来实验的。HyperNet主要是将不同尺度的卷积特征层结合起来,可以进行多尺度目标检测。
本实施例中采用的是区域建议方法,通过使用RPN网络,将候选区域提取同CNN分类结合在一起,即由两大模块:RPN模块和CNN检测模块组成,实现端到端的车辆/集装箱携带刀具检测。其中,RPN模块不同于Faster R-CNN中使用9种面积尺寸各异的anchor,而改用42种多尺度多长宽比的anchor,使得更适用于车辆/集装箱中携带刀具的小目标物体检测。训练方式有两种,其一是交替训练方式,其二为融合训练方式,融合训练方式同交替训练方式的区别在于,在反向回归过程中,两个网络共享层要将RPN网络损失与CNN检测网络损失结合在一起。
本实施例给出了交替训练方式的实例,交替训练方式的具体训练过程如下:
第一步,初始化。首先将输入图像缩放到短边600像素以内的尺寸,利用预训练模型对RPN网络和CNN检测网络中的权重进行初始化,其中可见层和隐藏层的初始偏置为a,b,初始权值矩阵为W,偏置和权值矩阵的增量为Δa,Δb,ΔW。采用预训练模型初始化RPN网络和CNN检测网络的优点在于该模型在一定程度上接近最优,比随机初始化更省时间以及资源。
第二步,提取候选区域。在CNN检测网络的最后一层所提取的特征图上,利用n*n的滑动窗口生成长度为m维度的全连接特征,在每一个滑窗中同感兴趣区域结合,利用不同的尺度和图像纵宽比生成候选区域
Figure PCTCN2019074658-appb-000006
同时在这层特征上产生两个分支的全连接层:矩形框分类层和矩形框回归层,在这两个不同的层之上分别有2*k和4*k个候选区域。
本实施例中将k设置为300,通过与真实标注的矩形框同所有提取的候选区域重叠面积进行排序,滤出即过滤后获得300个候选区域。但本公开并不限定于此。
第三步,正负样本标定。在第二步提取候选区域后,要对候选区域进行正负样本标定,标定规则可以为:当候选区域的矩形框同真实值重叠部分大于0.7,认为其为正样本,当候选区域矩形框同真实值的重叠部分小于0.3,标定其为负样本,剩余丢弃,不进行训练使用。
需要说明的是,上述的0.7和0.3仅用于举例说明,在不同的应用场合可以根据情况 调整。
第四步,将第三步得到的候选区域同第一步所得的CNN检测网络结合,微调CNN检测网络,在这一步,两个网络即RPN网络和CNN检测网络不共享卷积层数据。
第五步,利用第四步训练好的CNN检测网络初始化RPN网络并训练,在这步固定卷积层数据,仅仅微调属于RPN那部分网络层。在这一步,两个网络即RPN网络和CNN检测网络共享卷积层。
第六步,保持共享卷积层不变,继续微调CNN检测网络,更新偏置和权值矩阵:
Figure PCTCN2019074658-appb-000007
直至收敛,建立最终的检测模型。
上述公式中η为学习率,这里可以设为0.0001,但不同训练阶段不一样,跟batch大小也有关系。
此外,在训练神经网络的过程中,随着网络深度的增加,本实施例还采取了1)在Inception模块中增加残差结构(residual structures)以稳定自动检测深度神经网络框架的后半部分;2)在所有的ReLU激活前增加Batch normalization;3)基于plateau detection动态地控制学习率等方式进行有效地训练。
尽管随机梯度下降法对于训练深度网络简单高效,但是它需要人为的去选择参数,比如学习率、参数初始化、权重衰减系数、Drop out比例等。这些参数的选择对训练结果至关重要,以至于很多时间都浪费在这些的调参上。Batch Normalization可以选择比较大的初始学习率,让训练速度提高,因为这个算法收敛很快。也不用去处理过拟合中drop out、L2正则项参数的选择问题,采用Batch Normalization后,可以移除这两项参数,或者可以选择更小的L2正则约束参数,因为Batch Normalization具有提高网络泛化能力的特性。也不需要使用局部响应归一化层,因为BN本身就是一个归一化网络层。还可以把训练数据彻底打乱(防止每批训练的时候,某一个样本都经常被挑选到)。
在步骤S130中,将待检测的辐射图像输入至所述刀具自动检测模型,获得检测结果,所述检测结果包括所述辐射图像中是否存在刀具以及当存在刀具时的刀具位置。
在示例性实施例中,其中将待检测的辐射图像输入至所述刀具自动检测模型,获得刀具的检测结果包括:对所述辐射图像进行归一化处理;将归一化处理后的辐射图像输入至所述刀具自动检测模型,获得刀具的检测结果。
在示例性实施例中,其中将归一化处理后的辐射图像输入至所述刀具自动检测模型,获得刀具的检测结果包括:根据归一化处理后的辐射图像生成辐射图像的候选区域;对所述辐射图像的候选区域进行刀具分类;当候选区域中的刀具的置信度大于预设阈值时,判定所述候选区域中存在刀具,对所述刀具进行标定;将所有存在刀具的候选区域进行过滤,滤除重叠框,获得刀具位置。
本实施例中,刀具的置信度的所述预设阈值一般可以设置为0.6-0.8。
本实施例中,有些RPN建议框和其他建议框大量重叠,为了减少冗余,采用非极大值抑制(non-maximum suppression,NMS)。NMS不会影响最终的检测准确率,但是大幅地减少了建议框的数量。
测试过程实际上是刀具自动检测模型建立过程的一个子集,对产生的候选区域进行分类,即可判断出该区域是否存在刀具,同时对该候选区域存在刀具的具***置进行回归,回归方法通过真实目标矩形框位置与预测获得的目标矩形框区域位置插值进行正则化回归。
确定刀具所在的坐标,图8给出以矩形框形式标注的检测示意图。其中p是刀具的概率,0.8是阈值。
本公开实施方式提供的刀具检测方法,是一种基于深度学习的车辆/集装箱携带刀具的自动检测方法,可以应用于辐射图像中的违禁品自动检测,可以同时实现目标检测和目标定位。在辐射成像基础上,采用深度学习的物体自动检测,解决了刀具目标尺寸相对于集装箱尺寸较小导致漏检等问题,并且以扩充样本集方式克服因训练样本少,导致神经网络无法收敛等难点,能够自动精准检测集装箱辐射图像中是否有刀具,如果存在刀具,则给出刀具在图像中的位置,以此辅助人工判断是否存在违法携带刀具案情。
为达到辅助人工的目的,本实施例提供的刀具检测方法的性能也是必须考虑的任务。检测方法必须有较低的误报率和漏报率,另外必须满足实时检测的要求。本实施例提供的刀具检测方法误报率小于0.5%,漏报率小于10%,且在1秒内完成计算,满足上述应用需求。
图3示出根据本公开另一示例实施方式的刀具检测方法的流程图。
如图3所示,本实施例提供的刀具检测方法可以包括以下步骤。
在步骤S210中,获取辐射图像。
在步骤S220中,对所述辐射图像进行预处理。
需要说明的是,这里是将模型训练过程和刀具自动检测过程看成一个类似过程,均需要首先获取车辆/集装箱的辐射图像,然后对辐射图像进行归一化预处理,如果该辐射图像用于模型训练过程,则将其作为训练数据,如果该辐射图像用于刀具自动检测过程,则将预处理后的辐射图像输入至已经训练好的刀具自动检测模型中进行检测。
在步骤S230中,建立刀具自动检测模型/自动检测。
本公开实施方式提供的刀具检测方法,对扫描获得的辐射图像进行刀具检测,可以避免传统方式的检测漏洞以及人工判图效果较差的问题,对于打击违法携带刀具有重要意义,且已经过实际验证有较好的性能,具有很强的实用性。
图7示出根据本公开一示例实施方式的刀具检测方法的流程图。
如图7所示,本实施例中的刀具检测方法包括以下步骤。
在步骤S131中,获取待检测的辐射图像。
在步骤S132中,对待检测的所述辐射图像进行预处理。
在步骤S133中,将预处理后的所述辐射图像输入至刀具自动检测模型。
在步骤S134中,通过所述刀具自动检测模型判断所述辐射图像中是否检测到刀具;当检测到刀具时,进入步骤S135;当没有检测到刀具时,进入步骤S136。
在步骤S135中,将检测到刀具的辐射图像进行标注提醒人工确认。
在步骤S136中,将未检测到刀具的辐射图像丢弃,即不用对其进行标注。
本实施例中,刀具自动检测首先对采集到的刀具辐射图像进行预处理,预处理的方式可以参照上述刀具自动检测模型中的归一化处理方法,在此不再详述。将所得的刀具预处理后的辐射图像输入刀具自动检测模型中,在输入图像中生成候选区域,对候选区域进行刀具分类,如果该区域刀具的置信度大于预设阈值,则认为该区域存在刀具,同时进行矩形框标定,最后将所有存在刀具的候选区域进行过滤,得到最终的刀具位置。
图9示出根据本公开一示例实施方式的刀具检测装置的结构示意图。
如图9所示,该刀具检测装置100可以包括训练数据获取模块110、模型训练模块120以及刀具自动检测模块130。
训练数据获取模块110可以用于获取包括刀具图像的刀具图像数据库,其中刀具图像上标注出刀具位置。
模型训练模块120可以用于采用PVANET对所述刀具图像数据库进行训练,获得刀具自动检测模型。
刀具自动检测模块130可以用于将待检测的辐射图像输入至所述刀具自动检测模型,获得检测结果,所述检测结果包括所述辐射图像中是否存在刀具以及当存在刀具时的刀具位置。
在示例性实施例中,训练数据获取模块110可以包括图像采集子模块、第一归一化子模块和感兴趣区域提取子模块。其中,所述图像采集子模块可以用于采集不同数量、不同种类下各种摆放形式的刀具图像。所述第一归一化子模块可以用于对刀具图像进行归一化处理。所述感兴趣区域提取子模块可以用于提取归一化处理后的刀具图像的感兴趣区域,在所述感兴趣区域标注刀具位置。
在示例性实施例中,所述第一归一化子模块可以包括缩放单元和拉伸单元。其中,所述缩放单元可以用于根据采集刀具图像的扫描设备的物理参数,对原始的刀具图像分辨率进行缩放。所述拉伸单元可以用于对缩放后的刀具图像进行灰度拉伸。
在示例性实施例中,模型训练模块120可以包括特征提取子模块和模型建立子模块。其中,所述特征提取子模块可以用于提取刀具图像的特征。所述模型建立子模块可以用于根据刀具图像的特征和刀具图像的感兴趣区域训练区域建议网络和卷积神经网络,建立所述刀具自动检测模型。
在示例性实施例中,所述特征提取子模块可以包括特征提取单元。所述特征提取单元可以用于采用ReLU、Inception模块和HyperNet模块提取刀具图像的特征。
在示例性实施例中,所述模型建立子模块可以包括网络训练单元。其中所述网络训练单元可以用于采用交替训练方式训练所述区域建议网络和所述卷积神经网络。
在示例性实施例中,所述网络训练单元可以包括初始化子单元、候选区域提取子单元、样本标定子单元、第一微调子单元、区域建议网络训练子单元以及第二微调子单元。其中所述初始化子单元可以用于初始化所述区域建议网络和所述卷积神经网络的偏置和权值矩阵。所述候选区域提取子单元可以用于利用所述区域建立网络提取候选区域。所述样本标定子单元可以用于对所述候选区域进行正负样本标定。所述第一微调子单元可以用于对标定后的候选区域与初始化后的卷积神经网络结合,微调卷积神经网络,所述区域建议网络和所述卷积神经网络不共享卷积层。所述区域建议网络训练子单元可以用于利用训练好的卷积神经网络卷积层参数初始化区域建议网络的卷积层,继续训练区域建议网络,所述区域建议网络和所述卷积神经网络共享卷积层。所述第二微调子单元可以用于保持共享卷积层不变,继续微调卷积神经网络,更新偏置和权值矩阵直至收敛,建立所述刀具自动检测模型。
在示例性实施例中,其中提取候选区域采用区域建议网络中的目标物体检测的锚机制,使用42种面积尺寸各异的锚。
在示例性实施例中,刀具自动检测模块130可以包括第二归一化子模块和检测子模块。其中,所述第二归一化子模块可以用于对所述辐射图像进行归一化处理。所述检测子模块可以用于将归一化处理后的辐射图像输入至所述刀具自动检测模型,获得刀具的检测结果。
在示例性实施例中,所述检测子模块可以包括候选区域提取单元、刀具分类单元、刀具标定单元和位置获取单元。其中,所述候选区域提取单元可以用于根据归一化处理后的辐射图像生成辐射图像的候选区域。所述刀具分类单元可以用于对所述辐射图像的候选区域进行刀具分类。所述刀具标定单元可以用于当候选区域中的刀具的置信度大于预设阈值时,判定所述候选区域中存在刀具,对所述刀具进行标定。所述位置获取单元可以用于将所有存在刀具的候选区域进行过滤,滤除重叠框,获得刀具位置。
本发明实施例中的刀具检测装置的各个组成模块和/或单元的具体实现可以参考上述发明实施例中的刀具检测方法,在此不再赘述。
图10是根据一示例性实施例示出的一种电子设备的框图。
下面参照图10来描述根据本发明的这种实施方式的电子设备200。图10显示的电子设备200仅仅是一个示例,不应对本发明实施例的功能和使用范围带来任何限制。
如图10所示,电子设备200以通用计算设备的形式表现。电子设备200的组件可以包括但不限于:至少一个处理单元210、至少一个存储单元220、连接不同***组件(包括存储单元220和处理单元210)的总线230、显示单元240等。
其中,所述存储单元存储有程序代码,所述程序代码可以被所述处理单元210执行,使得所述处理单元210执行本说明书上述电子处方流转处理方法部分中描述的根据本发 明各种示例性实施方式的步骤。例如,所述处理单元210可以执行如图1中所示的步骤。
所述存储单元220可以包括易失性存储单元形式的可读介质,例如随机存取存储单元(RAM)2201和/或高速缓存存储单元2202,还可以进一步包括只读存储单元(ROM)2203。
所述存储单元220还可以包括具有一组(至少一个)程序模块2205的程序/实用工具2204,这样的程序模块2205包括但不限于:操作***、一个或者多个应用程序、其它程序模块以及程序数据,这些示例中的每一个或某种组合中可能包括网络环境的实现。
总线230可以为表示几类总线结构中的一种或多种,包括存储单元总线或者存储单元控制器、***总线、图形加速端口、处理单元或者使用多种总线结构中的任意总线结构的局域总线。
电子设备200也可以与一个或多个外部设备300(例如键盘、指向设备、蓝牙设备等)通信,还可与一个或者多个使得用户能与该电子设备200交互的设备通信,和/或与使得该电子设备200能与一个或多个其它计算设备进行通信的任何设备(例如路由器、调制解调器等等)通信。这种通信可以通过输入/输出(I/O)接口250进行。并且,电子设备200还可以通过网络适配器260与一个或者多个网络(例如局域网(LAN),广域网(WAN)和/或公共网络,例如因特网)通信。网络适配器260可以通过总线230与电子设备200的其它模块通信。应当明白,尽管图中未示出,可以结合电子设备200使用其它硬件和/或软件模块,包括但不限于:微代码、设备驱动器、冗余处理单元、外部磁盘驱动阵列、RAID***、磁带驱动器以及数据备份存储***等。
通过以上的实施方式的描述,本领域的技术人员易于理解,这里描述的示例实施方式可以通过软件实现,也可以通过软件结合必要的硬件的方式来实现。因此,根据本公开实施方式的技术方案可以以软件产品的形式体现出来,该软件产品可以存储在一个非易失性存储介质(可以是CD-ROM,U盘,移动硬盘等)中或网络上,包括若干指令以使得一台计算设备(可以是个人计算机、服务器、或者网络设备等)执行根据本公开实施方式的上述刀具检测方法。
图11是根据一示例性实施例示出的一种计算机可读介质示意图。
参考图11所示,描述了根据本发明的实施方式的用于实现上述方法的程序产品400,其可以采用便携式紧凑盘只读存储器(CD-ROM)并包括程序代码,并可以在终端设备,例如个人电脑上运行。然而,本发明的程序产品不限于此,在本文件中,可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行***、装置或者器件使用或者与其结合使用。
所述程序产品可以采用一个或多个可读介质的任意组合。可读介质可以是可读信号介质或者可读存储介质。可读存储介质例如可以为但不限于电、磁、光、电磁、红外线、或半导体的***、装置或器件,或者任意以上的组合。可读存储介质的更具体的例子(非穷举的列表)包括:具有一个或多个导线的电连接、便携式盘、硬盘、随机存取存储器(RAM)、 只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。
所述计算机可读存储介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了可读程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。可读存储介质还可以是可读存储介质以外的任何可读介质,该可读介质可以发送、传播或者传输用于由指令执行***、装置或者器件使用或者与其结合使用的程序。可读存储介质上包含的程序代码可以用任何适当的介质传输,包括但不限于无线、有线、光缆、RF等等,或者上述的任意合适的组合。
可以以一种或多种程序设计语言的任意组合来编写用于执行本发明操作的程序代码,所述程序设计语言包括面向对象的程序设计语言—诸如Java、C++等,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算设备上执行、部分地在用户设备上执行、作为一个独立的软件包执行、部分在用户计算设备上部分在远程计算设备上执行、或者完全在远程计算设备或服务器上执行。在涉及远程计算设备的情形中,远程计算设备可以通过任意种类的网络,包括局域网(LAN)或广域网(WAN),连接到用户计算设备,或者,可以连接到外部计算设备(例如利用因特网服务提供商来通过因特网连接)。
上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被一个该设备执行时,使得该计算机可读介质实现如下功能:获取包括刀具图像的刀具图像数据库,其中刀具图像上标注出刀具位置;采用PVANET对所述刀具图像数据库进行训练,获得刀具自动检测模型;将待检测的辐射图像输入至所述刀具自动检测模型,获得检测结果,所述检测结果包括所述辐射图像中是否存在刀具以及当存在刀具时的刀具位置。
本领域技术人员可以理解上述各模块可以按照实施例的描述分布于装置中,也可以进行相应变化唯一不同于本实施例的一个或多个装置中。上述实施例的模块可以合并为一个模块,也可以进一步拆分成多个子模块。
通过以上的实施例的描述,本领域的技术人员易于理解,这里描述的示例实施例可以通过软件实现,也可以通过软件结合必要的硬件的方式来实现。因此,根据本发明实施例的技术方案可以以软件产品的形式体现出来,该软件产品可以存储在一个非易失性存储介质(可以是CD-ROM,U盘,移动硬盘等)中或网络上,包括若干指令以使得一台计算设备(可以是个人计算机、服务器、移动终端、或者网络设备等)执行根据本发明实施例的方法。
通过以上的详细描述,本领域的技术人员易于理解,根据本发明实施例的***和方法具有以下优点中的一个或多个。
以上具体地示出和描述了本公开的示例性实施例。应该理解,本公开不限于所公开的实施例,相反,本公开意图涵盖包含在所附权利要求的精神和范围内的各种修改和等效布置。

Claims (13)

  1. 一种刀具检测方法,包括:
    获取包括刀具图像的刀具图像数据库,其中刀具图像上标注出刀具位置;
    采用PVANET对所述刀具图像数据库进行训练,获得刀具自动检测模型;
    将待检测的辐射图像输入至所述刀具自动检测模型,获得检测结果,所述检测结果包括所述辐射图像中是否存在刀具以及当存在刀具时的刀具位置。
  2. 如权利要求1所述的方法,其中获取包括刀具图像的刀具图像数据库,包括:
    采集不同数量、不同种类下各种摆放形式的刀具图像;
    对刀具图像进行归一化处理;
    提取归一化处理后的刀具图像的感兴趣区域,在所述感兴趣区域标注刀具位置。
  3. 如权利要求2所述的方法,其中对刀具图像进行归一化处理,包括:
    按照采集刀具图像的扫描设备的物理参数,对原始的刀具图像分辨率进行缩放;
    对缩放后的刀具图像进行灰度拉伸。
  4. 如权利要求2或3所述的方法,其中采用PVANET对所述刀具图像数据库进行训练,获得刀具自动检测模型,包括:
    提取刀具图像的特征;
    根据刀具图像的特征和刀具图像的感兴趣区域训练区域建议网络和卷积神经网络,建立所述刀具自动检测模型。
  5. 如权利要求4所述的方法,其中提取刀具图像的特征,包括:
    采用ReLU、Inception模块和HyperNet模块提取刀具图像的特征。
  6. 如权利要求4所述的方法,其中根据刀具图像的特征和刀具图像的感兴趣区域训练区域建议网络和卷积神经网络,建立所述刀具自动检测模型,包括:
    采用交替训练方式训练所述区域建议网络和所述卷积神经网络。
  7. 如权利要求6所述的方法,其中采用交替训练方式训练所述区域建议网络和所述卷积神经网络,包括:
    初始化所述区域建议网络和所述卷积神经网络的偏置和权值矩阵;
    利用所述区域建立网络提取候选区域;
    对所述候选区域进行正负样本标定;
    对标定后的候选区域与初始化后的卷积神经网络结合,微调卷积神经网络,所述区域建议网络和所述卷积神经网络不共享卷积层;
    利用训练好的卷积神经网络卷积层参数初始化区域建议网络的卷积层,继续训练区域建议网络,所述区域建议网络和所述卷积神经网络共享卷积层;
    保持共享卷积层不变,继续微调卷积神经网络,更新偏置和权值矩阵直至收敛,建立所述刀具自动检测模型。
  8. 如权利要求7所述的方法,其中提取候选区域采用区域建议网络中的目标物体检 测的锚机制,使用42种面积尺寸各异的锚。
  9. 如权利要求7所述的方法,其中将待检测的辐射图像输入至所述刀具自动检测模型,获得刀具的检测结果包括:
    对所述辐射图像进行归一化处理;
    将归一化处理后的辐射图像输入至所述刀具自动检测模型,获得刀具的检测结果。
  10. 如权利要求9所述的方法,其中将归一化处理后的辐射图像输入至所述刀具自动检测模型,获得刀具的检测结果包括:
    根据归一化处理后的辐射图像生成辐射图像的候选区域;
    对所述辐射图像的候选区域进行刀具分类;
    当候选区域中的刀具的置信度大于预设阈值时,判定所述候选区域中存在刀具,对所述刀具进行标定;
    将所有存在刀具的候选区域进行过滤,滤除重叠框,获得刀具位置。
  11. 一种刀具检测装置,包括:
    训练数据获取模块,用于获取包括刀具图像的刀具图像数据库,其中刀具图像上标注出刀具位置;
    模型训练模块,用于采用PVANET对所述刀具图像数据库进行训练,获得刀具自动检测模型;
    刀具自动检测模块,用于将待检测的辐射图像输入至所述刀具自动检测模型,获得检测结果,所述检测结果包括所述辐射图像中是否存在刀具以及当存在刀具时的刀具位置。
  12. 一种电子设备,包括:
    一个或多个处理器;
    存储装置,用于存储一个或多个程序;
    当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如权利要求1-10中任一所述的方法。
  13. 一种计算机可读介质,其上存储有计算机程序,所述程序被处理器执行时实现如权利要求1-10中任一所述的方法。
PCT/CN2019/074658 2018-02-06 2019-02-02 刀具检测方法及装置 WO2019154383A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP19750746.0A EP3696725A4 (en) 2018-02-06 2019-02-02 TOOL DETECTION PROCESS AND DEVICE
IL271806A IL271806A (en) 2018-02-06 2020-01-02 Method and device for detecting cutting tools

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810117890.2 2018-02-06
CN201810117890.2A CN110119734A (zh) 2018-02-06 2018-02-06 刀具检测方法及装置

Publications (1)

Publication Number Publication Date
WO2019154383A1 true WO2019154383A1 (zh) 2019-08-15

Family

ID=67519407

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/074658 WO2019154383A1 (zh) 2018-02-06 2019-02-02 刀具检测方法及装置

Country Status (4)

Country Link
EP (1) EP3696725A4 (zh)
CN (1) CN110119734A (zh)
IL (1) IL271806A (zh)
WO (1) WO2019154383A1 (zh)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110598716A (zh) * 2019-09-09 2019-12-20 北京文安智能技术股份有限公司 一种人员属性识别方法、装置及***
CN110909656A (zh) * 2019-11-18 2020-03-24 中电海康集团有限公司 一种雷达与摄像机融合的行人检测方法和***
CN111539938A (zh) * 2020-04-26 2020-08-14 中冶赛迪重庆信息技术有限公司 一种轧带钢带头曲度检测方法、***、介质及电子终端
CN111626208A (zh) * 2020-05-27 2020-09-04 北京百度网讯科技有限公司 用于检测小目标的方法和装置
CN112967187A (zh) * 2021-02-25 2021-06-15 深圳海翼智新科技有限公司 用于目标检测的方法和装置
CN116475815A (zh) * 2023-05-17 2023-07-25 广州里工实业有限公司 一种数控机床的自动换刀方法、***、装置及存储介质

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110956225B (zh) * 2020-02-25 2020-05-29 浙江啄云智能科技有限公司 一种违禁品检测方法及***、一种计算设备及存储介质
CN111901576A (zh) * 2020-08-28 2020-11-06 北京宜通华瑞科技有限公司 工具监控装置、终端及***
CN116229195B (zh) * 2022-04-29 2024-05-17 同方威视技术股份有限公司 用于在线训练辐射图像识别模型的方法、辐射图像识别方法和装置

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140177946A1 (en) * 2012-12-21 2014-06-26 Electronics and Telecommunicatidons Research Institute Human detection apparatus and method
CN106485268A (zh) * 2016-09-27 2017-03-08 东软集团股份有限公司 一种图像识别方法及装置
CN107607562A (zh) * 2017-09-11 2018-01-19 北京匠数科技有限公司 一种违禁物品识别设备及方法、x光行李安检***

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050058242A1 (en) * 2003-09-15 2005-03-17 Peschmann Kristian R. Methods and systems for the rapid detection of concealed objects
CN206192923U (zh) * 2016-10-27 2017-05-24 中云智慧(北京)科技有限公司 一种基于云计算的x射线违禁品检测***

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140177946A1 (en) * 2012-12-21 2014-06-26 Electronics and Telecommunicatidons Research Institute Human detection apparatus and method
CN106485268A (zh) * 2016-09-27 2017-03-08 东软集团股份有限公司 一种图像识别方法及装置
CN107607562A (zh) * 2017-09-11 2018-01-19 北京匠数科技有限公司 一种违禁物品识别设备及方法、x光行李安检***

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
HONG, SANGHOON: "PVANet: Lightweight Deep Neural Networks for Real-time Object Detection", THE 1ST INTERNATIONAL WORKSHOP ON EFFICIENT METHODS FOR DEEP NEURAL NETWOR- KS, 31 December 2016 (2016-12-31), XP055562288 *
See also references of EP3696725A4

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110598716A (zh) * 2019-09-09 2019-12-20 北京文安智能技术股份有限公司 一种人员属性识别方法、装置及***
CN110909656A (zh) * 2019-11-18 2020-03-24 中电海康集团有限公司 一种雷达与摄像机融合的行人检测方法和***
CN110909656B (zh) * 2019-11-18 2023-10-13 中电海康集团有限公司 一种雷达与摄像机融合的行人检测方法和***
CN111539938A (zh) * 2020-04-26 2020-08-14 中冶赛迪重庆信息技术有限公司 一种轧带钢带头曲度检测方法、***、介质及电子终端
CN111539938B (zh) * 2020-04-26 2022-12-16 中冶赛迪信息技术(重庆)有限公司 一种轧带钢带头曲度检测方法、***、介质及电子终端
CN111626208A (zh) * 2020-05-27 2020-09-04 北京百度网讯科技有限公司 用于检测小目标的方法和装置
CN112967187A (zh) * 2021-02-25 2021-06-15 深圳海翼智新科技有限公司 用于目标检测的方法和装置
CN112967187B (zh) * 2021-02-25 2024-05-31 深圳海翼智新科技有限公司 用于目标检测的方法和装置
CN116475815A (zh) * 2023-05-17 2023-07-25 广州里工实业有限公司 一种数控机床的自动换刀方法、***、装置及存储介质
CN116475815B (zh) * 2023-05-17 2023-12-15 广州里工实业有限公司 一种数控机床的自动换刀方法、***、装置及存储介质

Also Published As

Publication number Publication date
CN110119734A (zh) 2019-08-13
IL271806A (en) 2020-02-27
EP3696725A1 (en) 2020-08-19
EP3696725A4 (en) 2021-07-14

Similar Documents

Publication Publication Date Title
WO2019154383A1 (zh) 刀具检测方法及装置
CN108764202B (zh) 机场异物识别方法、装置、计算机设备及存储介质
CN109086656B (zh) 机场异物检测方法、装置、计算机设备及存储介质
EP3349048B1 (en) Inspection devices and methods for detecting a firearm in a luggage
US20180196158A1 (en) Inspection devices and methods for detecting a firearm
CN108875732B (zh) 模型训练与实例分割方法、装置和***及存储介质
EP4035064B1 (en) Object detection based on pixel differences
US9767371B2 (en) Systems and methods for identifying traffic control devices and testing the retroreflectivity of the same
US10013615B2 (en) Inspection methods and devices
US20200051017A1 (en) Systems and methods for image processing
US9911055B2 (en) Method and system for detection and classification of license plates
CN110807429A (zh) 基于tiny-YOLOv3的施工安全检测方法及***
CN109325490B (zh) 基于深度学习和rpca的太赫兹图像目标识别方法
US10504007B2 (en) Determination of population density using convoluted neural networks
CN104504686A (zh) 一种采用局部自适应阈值分割的高光谱图像异常探测方法
Ben Gharsallah et al. Weld Inspection Based on Radiography Image Segmentation with Level Set Active Contour Guided Off‐Center Saliency Map
CN110910445B (zh) 一种物件尺寸检测方法、装置、检测设备及存储介质
KR102105954B1 (ko) 사고위험 감지시스템 및 감지방법
EP3493157A1 (en) Method and system for visual change detection using multi-scale analysis
CN111523558A (zh) 一种基于电子围网的船只遮挡检测方法、装置及电子设备
WO2017101514A1 (zh) 检查货物的方法、***和装置
US20200193610A1 (en) Curvilinear object segmentation with noise priors
Kowkabi et al. Hybrid preprocessing algorithm for endmember extraction using clustering, over-segmentation, and local entropy criterion
CN114219936A (zh) 目标检测方法、电子设备、存储介质和计算机程序产品
CN113537017A (zh) 基于级联型回归修正的光学遥感图像飞机检测方法和装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19750746

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2019750746

Country of ref document: EP

Effective date: 20200511

NENP Non-entry into the national phase

Ref country code: DE