CN115187842A - Target detection method of passive terahertz security inspection image based on mode conversion - Google Patents
Target detection method of passive terahertz security inspection image based on mode conversion Download PDFInfo
- Publication number
- CN115187842A CN115187842A CN202210823984.8A CN202210823984A CN115187842A CN 115187842 A CN115187842 A CN 115187842A CN 202210823984 A CN202210823984 A CN 202210823984A CN 115187842 A CN115187842 A CN 115187842A
- Authority
- CN
- China
- Prior art keywords
- image
- security inspection
- target detection
- passive terahertz
- inspection image
- 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
Links
- 238000007689 inspection Methods 0.000 title claims abstract description 42
- 238000001514 detection method Methods 0.000 title claims abstract description 39
- 238000006243 chemical reaction Methods 0.000 title claims abstract description 22
- 125000004122 cyclic group Chemical group 0.000 claims abstract description 15
- 230000004927 fusion Effects 0.000 claims abstract description 13
- 238000012549 training Methods 0.000 claims abstract description 10
- 230000002457 bidirectional effect Effects 0.000 claims description 14
- 230000004913 activation Effects 0.000 claims description 6
- 238000009826 distribution Methods 0.000 claims description 6
- 238000005457 optimization Methods 0.000 claims description 5
- 230000003042 antagnostic effect Effects 0.000 claims description 4
- 239000000284 extract Substances 0.000 claims description 4
- 238000013507 mapping Methods 0.000 claims description 4
- 238000010606 normalization Methods 0.000 claims description 4
- 238000004519 manufacturing process Methods 0.000 claims description 3
- 239000011159 matrix material Substances 0.000 claims description 3
- 230000007246 mechanism Effects 0.000 claims description 3
- 238000000605 extraction Methods 0.000 claims description 2
- 238000012545 processing Methods 0.000 claims 2
- 230000009466 transformation Effects 0.000 claims 1
- 238000012800 visualization Methods 0.000 claims 1
- 238000000034 method Methods 0.000 abstract description 7
- 231100001261 hazardous Toxicity 0.000 abstract description 3
- 230000002194 synthesizing effect Effects 0.000 abstract 1
- 230000006870 function Effects 0.000 description 10
- 238000010586 diagram Methods 0.000 description 8
- 238000003384 imaging method Methods 0.000 description 5
- 208000037170 Delayed Emergence from Anesthesia Diseases 0.000 description 3
- 238000004364 calculation method Methods 0.000 description 3
- 230000000694 effects Effects 0.000 description 3
- 230000008569 process Effects 0.000 description 2
- 239000000126 substance Substances 0.000 description 2
- ORILYTVJVMAKLC-UHFFFAOYSA-N Adamantane Natural products C1C(C2)CC3CC1CC2C3 ORILYTVJVMAKLC-UHFFFAOYSA-N 0.000 description 1
- 101100465000 Mus musculus Prag1 gene Proteins 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000013527 convolutional neural network Methods 0.000 description 1
- 230000008034 disappearance Effects 0.000 description 1
- 238000011478 gradient descent method Methods 0.000 description 1
- 239000000383 hazardous chemical Substances 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000002372 labelling Methods 0.000 description 1
- 239000000463 material Substances 0.000 description 1
- 239000000203 mixture Substances 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 238000007500 overflow downdraw method Methods 0.000 description 1
- 230000035515 penetration Effects 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
- 238000005070 sampling Methods 0.000 description 1
- 238000001228 spectrum Methods 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/77—Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
- G06V10/80—Fusion, i.e. combining data from various sources at the sensor level, preprocessing level, feature extraction level or classification level
- G06V10/803—Fusion, i.e. combining data from various sources at the sensor level, preprocessing level, feature extraction level or classification level of input or preprocessed data
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01N—INVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
- G01N23/00—Investigating or analysing materials by the use of wave or particle radiation, e.g. X-rays or neutrons, not covered by groups G01N3/00 – G01N17/00, G01N21/00 or G01N22/00
- G01N23/02—Investigating or analysing materials by the use of wave or particle radiation, e.g. X-rays or neutrons, not covered by groups G01N3/00 – G01N17/00, G01N21/00 or G01N22/00 by transmitting the radiation through the material
- G01N23/04—Investigating or analysing materials by the use of wave or particle radiation, e.g. X-rays or neutrons, not covered by groups G01N3/00 – G01N17/00, G01N21/00 or G01N22/00 by transmitting the radiation through the material and forming images of the material
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01V—GEOPHYSICS; GRAVITATIONAL MEASUREMENTS; DETECTING MASSES OR OBJECTS; TAGS
- G01V5/00—Prospecting or detecting by the use of ionising radiation, e.g. of natural or induced radioactivity
- G01V5/20—Detecting prohibited goods, e.g. weapons, explosives, hazardous substances, contraband or smuggled objects
- G01V5/22—Active interrogation, i.e. by irradiating objects or goods using external radiation sources, e.g. using gamma rays or cosmic rays
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
- G06N3/084—Backpropagation, e.g. using gradient descent
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/77—Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
- G06V10/80—Fusion, i.e. combining data from various sources at the sensor level, preprocessing level, feature extraction level or classification level
- G06V10/806—Fusion, i.e. combining data from various sources at the sensor level, preprocessing level, feature extraction level or classification level of extracted features
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/82—Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V20/00—Scenes; Scene-specific elements
- G06V20/50—Context or environment of the image
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V2201/00—Indexing scheme relating to image or video recognition or understanding
- G06V2201/05—Recognition of patterns representing particular kinds of hidden objects, e.g. weapons, explosives, drugs
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V2201/00—Indexing scheme relating to image or video recognition or understanding
- G06V2201/07—Target detection
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Health & Medical Sciences (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Evolutionary Computation (AREA)
- General Health & Medical Sciences (AREA)
- Computing Systems (AREA)
- Multimedia (AREA)
- Artificial Intelligence (AREA)
- Software Systems (AREA)
- Databases & Information Systems (AREA)
- Life Sciences & Earth Sciences (AREA)
- Medical Informatics (AREA)
- Chemical & Material Sciences (AREA)
- Computational Linguistics (AREA)
- Analytical Chemistry (AREA)
- Biochemistry (AREA)
- Immunology (AREA)
- Biomedical Technology (AREA)
- Biophysics (AREA)
- Pathology (AREA)
- Data Mining & Analysis (AREA)
- Molecular Biology (AREA)
- General Engineering & Computer Science (AREA)
- Mathematical Physics (AREA)
- High Energy & Nuclear Physics (AREA)
- General Life Sciences & Earth Sciences (AREA)
- Geophysics (AREA)
- Analysing Materials By The Use Of Radiation (AREA)
Abstract
The invention discloses a target detection method of a passive terahertz security inspection image based on mode conversion, which comprises the following steps: the method comprises the steps of carrying out image fusion on a hazardous article image and a passive terahertz human body image under an X ray, carrying out modal style conversion on unpaired data by using a cyclic generation countermeasure network, generating a passive terahertz security inspection image which is highly similar to a real image, expanding the number and the types of data sets by synthesizing the image, then training an improved YOLOv5 target detection network by using the data sets, learning characteristics of multiple types of hazardous articles, and finally detecting the real passive terahertz security inspection image by using the trained target detection network.
Description
Technical Field
The invention relates to the technical field of target detection, in particular to a target detection method of a passive terahertz security inspection image based on mode conversion.
Background
Terahertz (THz) waves are electromagnetic waves with a frequency within a range of 0.1-10THz (with a wavelength of 3000-30 μm), have good substance penetration characteristics for articles, and have substance fingerprint spectrum identification characteristics, so that the terahertz waves are applied to imaging. The terahertz wave single photon has low energy, only a few milli-electron volts is far lower than X-rays, and the material characteristics cannot be damaged due to ionization, so that the terahertz wave imaging is good in safety when used for human body security inspection and can be applied to security inspection in large-scale occasions with dense crowds.
Disclosure of Invention
The invention provides a target detection method of a passive terahertz security inspection image based on mode conversion, which can solve the problems of few samples and unbalanced samples in the target detection training process of the passive terahertz security inspection image in the prior art, and improve the detection precision and the generalization.
In order to achieve the purpose, the invention provides the following technical scheme: the target detection method of the passive terahertz security inspection image based on mode conversion comprises the following steps:
s1, carrying out image fusion on an acquired dangerous article image under X-ray and a passive terahertz human body image;
s2, constructing a cyclic generation countermeasure network, performing modal style conversion of unpaired data, and generating a passive terahertz security inspection image;
s3, selecting and marking passive terahertz security inspection images generated based on different kinds of articles to manufacture a passive terahertz security inspection image dataset;
s4, training an improved YOLOv5 target detection network by utilizing a passive terahertz security inspection image data set;
and S5, detecting a real passive terahertz security check image through the trained target detection network.
Preferably, in step S1, the dangerous goods image under the X-ray is processed and converted into a grayscale image, a mask of the processed image is established, an effective region with goods is extracted, a random position conforming to two-dimensional normal distribution is generated according to the goods position statistics in the real data set, a superimposed region generated by the terahertz human body image is extracted, and the two images are fused according to the mask of the X-ray image:
Img add [i,j]=Img 1 [i,j]*mask[i,j]+Img 2 [i,j]*(1-mask[i,j]);
wherein Img add For superimposing pictures, mask is the mask of the X-ray image, img 1 And Img 2 Respectively representing areas to be fused extracted from an X-ray image and a passive terahertz human body image; will Img add Covering the corresponding area of the original terahertz human body picture.
Preferably, the image of the dangerous goods under the X-ray is processed: and carrying out data set annotation on the dangerous goods image, then rotating the X-ray dangerous goods image to obtain object images at different angles, and then zooming the image according to a certain proportion.
Preferably, the contrast enhancement is performed on the grayscale picture through histogram orthography, and the enhanced image is as follows:wherein I is an image gray matrix, I max Is the maximum gray level of I min Is the minimum gray level in I.
Preferably, in step (ii)In S2, the cyclic generation countermeasure network comprises two generators and two discriminators, wherein the generated passive terahertz security inspection image is recorded as an X domain, a real terahertz picture is recorded as a Y domain, and the generator for converting the X domain picture into the Y domain picture is recorded as a G XY G for converting Y-domain picture into X-domain picture YX The decision device for identifying the X domain picture is D X The decision device for discriminating the Y-domain picture is D Y (ii) a The cyclic generation countermeasure network simultaneously establishes the mappings of X → Y and Y → X.
Preferably, the loss function during the cycle-generated antagonistic network conversion is:
wherein,as a function of the penalty incurred during the X → Y cycleIs the antagonistic loss function during the Y → X cycle, λ cyc 、λ idt Is a coefficient of proportionality that is,in order to be a function of the cyclic consistency loss,loss of diversity;
preferably, the generator comprises an encoder, a converter and a decoder, wherein the encoder extracts a feature vector from an input image, and performs convolution, normalization and activation operations, the converter converts the feature vector of a source domain into a feature vector of a target domain, and the decoder restores low-level features from the feature vector to generate an image; the discriminator is used for extracting the features from the image and judging whether the features are close to the image features of a certain domain.
Preferably, in step S3, the number and types of data sets are continuously expanded by the passive terahertz security inspection image generated in step S5.
Preferably, in step S4, a YOLOv5 target detection network is built and improved, wherein an attention mechanism module CBAM for fusing channel attention and spatial attention is added at the tail end of a backhaul network of the YOLOv5 target detection network, a key position in an output feature map is concerned, and a feature extraction module adopts a bidirectional feature fusion method: and (3) weighting a bidirectional feature pyramid network BiFPN, and realizing bidirectional fusion of features by adopting bidirectional cross scale connection and weighted feature fusion.
Compared with the prior art, the invention has the following beneficial effects: according to the method, the acquired dangerous goods image under the X ray and the passive terahertz human body image are overlapped and fused by using mask operation, and a synthetic terahertz security inspection image which accords with terahertz imaging characteristics and is close to a real image is generated by using a cyclic countermeasure generation network for mode conversion, wherein the cyclic countermeasure generation network simultaneously trains two generators, and simultaneously establishes X → Y and Y → X mapping, so that a group of pictures with different contents and structures can be trained, and the method gets rid of the problem that the existing method is difficult to restrict the generated image and the input image to keep the contents and the structural consistency, and the structural alignment of a source picture and a target picture is required, namely the limitation of a paired data set is required; based on the passive terahertz security check images generated by different types of articles, terahertz security check image data sets with rich types and high definition are manufactured, the detection precision and the range of the detected articles can be effectively improved, the problems of few samples and unbalanced samples in the target detection training process of the passive terahertz security check images are solved, the detection precision and the generalization are improved, and the detection requirements on multiple types of dangerous articles under the actual security check scene are met.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the principles of the invention and not to limit the invention.
In the drawings:
FIG. 1 is a flow chart of a method of object detection of the present invention;
FIG. 2 is a diagram showing statistical results of the positions and sizes of anchors of hazardous materials in a terahertz image according to the present invention;
FIG. 3 is a block diagram of the loop countermeasure generation network of the present invention;
FIG. 4 is an effect graph and a real classmate graph of the synthesized terahertz picture of the invention;
FIG. 5 is a block diagram of the convolution block attention module of the present invention;
FIG. 6 is a schematic diagram of a weighted bidirectional feature pyramid network according to the present invention;
fig. 7 is a schematic structural diagram of the object detection effect of the present invention.
Detailed Description
The preferred embodiments of the present invention will be described in conjunction with the accompanying drawings, and it should be understood that they are presented herein only to illustrate and explain the present invention and not to limit the present invention.
Example (b): as shown in fig. 1, the target detection method of the passive terahertz security inspection image based on the mode conversion includes the following steps:
s1, carrying out image fusion on an acquired dangerous article image under X-ray and a passive terahertz human body image;
collecting X-ray security inspection images, classifying pictures according to article types, and collecting X-ray images of a knife, a gun, scissors and a lighter which are white backgrounds in a specific embodiment and have the size of 256 × 256;
according to whether dangerous goods are carried or not, obtaining two types of danger and safety, labeling data sets of pictures of the dangerous goods by using labelImg software, wherein the pictures are in a PASCAL VOC format, contain labels and position information of target goods and are divided into a pistol, a large-sized pistol, a stick tool and a mobile phone; as shown in fig. 2, the relative size and relative position of the anchor box (anchor box) with respect to the whole picture are counted;
rotating the X-ray dangerous goods picture to obtain object pictures at different angles, and filling the missing backgroundFilling white; scaling the picture according to a certain proportion, wherein the proportion is selected by referring to the relative size of the anchor frame and the actual size of the object which are counted, and the proportion is generally set to be [0.3,0.42 ]]A random number in between; converting the processed picture from an RGB picture into a gray picture; in consideration of the difference between X-ray imaging and terahertz imaging, contrast enhancement operation is carried out on pictures of objects such as a lighter; performing contrast enhancement by adopting histogram orthogonalization; the enhanced images are:wherein I is an image gray matrix, I max Is the maximum gray level of I min Is the minimum gray level in I;
establishing a mask of the processed image, extracting an effective area with the article, for example, setting the effective area to be 1 and the ineffective area to be 0, and setting the area with the gray value greater than 210 to be 0 in a specific embodiment; selecting a target coverage area in the terahertz human body image, referring to the obtained anchor frame center relative position statistical result, regarding the anchor frame center position as two-dimensional normal distribution, establishing a coordinate system by taking the lower left corner of the terahertz image as an original point, and describing the distribution of the anchor frame center position as follows: (ii) a
In this example, take μ 1 =0.58,μ 2 =0.42,σ 1 =σ 2 Generating a random number which is in accordance with the distribution as an anchor frame central point, and re-fetching points when a coverage area corresponding to the fetched points exceeds the picture range; extracting the position of the corresponding region of the background human body image, fusing the two images according to the mask of the X-ray image, img add [i,j]=Img 1 [i,j]*mask[i,j]+Img 2 [i,j]*(1-mask[i,j]) (ii) a Wherein Img add For superimposed pictures, mask is the mask of the X-ray image, img 1 And Img 2 Respectively representing areas to be fused extracted from an X-ray image and a passive terahertz human body image; will Img add Covering original terahertz human bodyA corresponding region of the picture;
s2, constructing a loop to generate a confrontation network, and performing modal style conversion on unpaired data to generate a passive terahertz security inspection image;
referring to fig. 3, the loop generation countermeasure network includes two generators and two discriminators, and for a common GAN to discriminate a picture generated by the generator from a target picture, it is difficult to constrain that a generated image and an input image maintain content and structural consistency, so that structural alignment of a source picture and a target picture is required, that is, a paired data set is required, and the loop generation countermeasure network gets rid of this limitation, where the generator includes an encoder, a converter, and a decoder, the encoder extracts a feature vector from the input image, the encoder used in this embodiment is composed of three layers of convolutional neural networks, performs convolution, normalization, and activation operations, and the encoder output is 256 × 64; the converter converts the feature vector of the source domain into the feature vector of the target domain, the embodiment adopts 9 residual blocks, the gradient disappearance can be weakened by using the residual blocks, the network depth can be adjusted in a self-adaptive manner, and the output of the residual blocks is 256 × 64; the decoder recovers low-level features from the feature vector, and the low-level features are composed of two layers of deconvolution layers and one layer of convolution network, and the output is 3 × 256. The activation function of the last convolution layer in the generator adopts Tanh, and the rest adopts ReLU; the discriminator extracts features from the image and judges whether the features are close to the image features of a certain domain. In this embodiment, a five-layer convolutional network is used to perform convolution, normalization, and activation operations, and the activation function uses leakyreu.
In a specific embodiment, the synchronization step S1 generates 1200 synthesized terahertz security images, which are taken as a source domain image set and denoted as X; selecting 1200 passive terahertz images containing dangerous goods as a target domain image set and recording the images as Y; the generator for converting X domain picture into Y domain picture is marked as G XY G for converting Y-domain picture into X-domain picture YX The decision device for identifying the X domain picture is D X The decision device for discriminating the Y-domain picture is D Y (ii) a Circularly generating an antagonistic network and simultaneously establishing mapping of X → Y and Y → X;
in the forward loop, X-domain picture X is input,through G XY GeneratingWill be provided withInput decision device D Y Identify and calculate the challenge loss, willInput generator G YX To obtainX andthe content distribution therein is aligned for calculating the cyclic consistency loss for constraining the output picture to be identical to the input picture content; in the reverse loop, the Y-domain picture Y is input, via the generator G YX GeneratingWill be provided withInput decision device D X Make decision to calculate the countermeasure lossInput generator G XY Generatingy andare aligned, their cycle consistency loss is calculated, and the training effect is shown with reference to FIG. 4;
wherein the loss function is composed of the countermeasuresLoss of cyclic consistencyidentity loss composition; the countermeasures loss describes the quality of a discrimination result in one-way propagation, and least square loss is used and is expressed as:
loss of cyclic consistencyComparing the input image with the images generated by the two generators, describing the consistency between the generated images and the content of the original image, which is an important point in the cyclic generation countermeasure network, and ensuring that the source domain picture and the synthesized picture are aligned in structure and similar in content in training, in this embodiment, L1 loss is used, which is helpful for recovering the low frequency part of the image, and is represented as:
adding Identity lossFor describing the continuity of the image, the generated image is brought close to the input image, and is represented as:
the overall loss function is expressed as:
wherein,as a function of the penalty loss on the fly,for the penalty function in the reverse cycle, λ cyc 、λ idt Is a scaling factor.
according to the loss calculation result, parameters are optimized by adopting a gradient descent method, the learning rate in a specific embodiment is initially 0.0002, and after a half round number training, the linear reduction is 0; wherein, the generators and the discriminators both use Adam optimizers with better convergence performance, the two generators are adopted for optimization at the same time, the discriminators separately optimize the optimization strategy, and the momentum is beta 1 =0.5,β 2 =0.999。
S3, selecting and marking passive terahertz security inspection images generated based on different kinds of articles to manufacture a passive terahertz security inspection image data set;
in a specific embodiment, 1000 synthetic terahertz security inspection images are generated and divided into four types of handguns, knives, sharp scissors and lighters, and are labeled by LabelImg to be manufactured into a passive terahertz security inspection image data set; including the tag and location information of the hazardous item in the picture.
S4, training an improved YOLOv5 target detection network by utilizing a passive terahertz security inspection image data set;
building and improving a YOLOv5 target detection network, wherein the YOLOv5 consists of an input end, a backbone, a nic and a pre-measuring head, and the input end adopts a data enhancement mode such as Mosaic, cutout, copy-paste and the like to perform self-adaptive anchor frame calculation and self-adaptive picture scaling operation on input data; the backhaul uses CSPDarknet, and consists of three CSP modules and one SPP module, as shown in fig. 5, an attention mechanism module CBAM for fusing channel attention and space attention is added at the tail end of the backhaul, the key position in an output characteristic diagram is concerned, the nack adopts a characteristic pyramid FPN + PAN structure, the FPN is from top to bottom, the characteristic information of a high layer is transmitted and fused in an up-sampling mode, the PAN is formed by adding a pyramid from bottom to top behind the FPN to perform secondary fusion on the characteristics, and the positioning characteristics of a bottom layer are transmitted to the upper layer; in this embodiment, a more efficient bidirectional feature fusion mode is adopted: the weighted bidirectional feature pyramid network BiFPN adopts bidirectional cross scale connection and weighted feature fusion to realize bidirectional fusion of features, wherein a BiFPN structure diagram is shown in a reference diagram of FIG. 7, and compared with a FPN + PAN structure, the weighted bidirectional feature pyramid network BiFPN reduces parameter quantity and calculation cost;
and S5, detecting a real passive terahertz security inspection image through the trained target detection network, wherein a test example refers to the graph shown in FIG. 6, and obtaining high detection precision.
Finally, it should be noted that: although the present invention has been described in detail with reference to the foregoing embodiments, it will be apparent to those skilled in the art that changes may be made in the embodiments and/or equivalents thereof without departing from the spirit and scope of the invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims (9)
1. The target detection method of the passive terahertz security inspection image based on mode conversion is characterized by comprising the following steps of:
s1, carrying out image fusion on an acquired dangerous article image under X-ray and a passive terahertz human body image;
s2, constructing a cyclic generation countermeasure network, performing modal style conversion of unpaired data, and generating a passive terahertz security inspection image;
s3, selecting and marking passive terahertz security inspection images generated based on different kinds of articles to manufacture a passive terahertz security inspection image data set;
s4, training an improved YOLOv5 target detection network by utilizing a passive terahertz security inspection image data set;
and S5, detecting a real passive terahertz security check image through the trained target detection network.
2. The target detection method of the passive terahertz security inspection image based on mode conversion according to claim 1, characterized in that: in step S1, processing dangerous goods images under X-rays, converting the dangerous goods images into gray level pictures, establishing masks of the processed images, extracting effective areas with goods, generating random positions conforming to two-dimensional normal distribution according to the position statistics of the goods in real data set, extracting superposed areas generated by terahertz human body images, and fusing the two images according to the masks of the X-ray images:
Img add [i,j]=Img 1 [i,j]*mask[i,j]+Img 2 [i,j]*(1-mask[i,j]);
wherein Img add For superimposed pictures, mask is the mask of the X-ray image, img 1 And Img 2 Respectively representing regions to be fused extracted from an X-ray image and a passive terahertz human body image; will Img add Covering the corresponding area of the original terahertz human body picture.
3. The target detection method of the passive terahertz security inspection image based on mode conversion according to claim 2, characterized in that: processing the dangerous goods image under the X-ray: and carrying out data set annotation on the dangerous goods image, then rotating the X-ray dangerous goods image to obtain object images at different angles, and then zooming the image according to a certain proportion.
4. The target detection method of the passive terahertz security inspection image based on mode conversion according to claim 2 or 3, wherein: contrast enhancement is carried out on the gray level picture through histogram orthographic visualization, and the enhanced image is:Wherein I is an image gray matrix, I max Is the maximum gray level of I min Is the minimum gray level in I.
5. The target detection method of the passive terahertz security inspection image based on mode conversion according to claim 1, characterized in that: in step S2, the cyclic generation countermeasure network includes two generators and two discriminators, where the generated passive terahertz security inspection image is recorded as X domain, the real terahertz picture is recorded as Y domain, and the generator for converting X domain picture into Y domain picture is recorded as G domain picture XY G for converting Y-domain picture into X-domain picture YX The decision device for identifying the X domain picture is D X The decision device for discriminating the Y-domain picture is D Y (ii) a The cyclic generation countermeasure network simultaneously establishes the mappings of X → Y and Y → X.
6. The target detection method of the passive terahertz security inspection image based on mode conversion according to claim 5, characterized in that: the loss function during the cycle-to-counter network transformation is:
wherein,as a function of the penalty incurred during the X → Y cycle,is the antagonistic loss function during the Y → X cycle, λ cyc 、λ idt Is a coefficient of proportionality that is,for cyclic consistency lossThe function of the function is that of the function,loss of diversity;
7. the target detection method of the passive terahertz security inspection image based on mode conversion according to claim 5, characterized in that: the generator comprises an encoder, a converter and a decoder, wherein the encoder extracts a feature vector from an input image, convolution, normalization and activation operations are performed, the converter converts the feature vector of a source domain into the feature vector of a target domain, and the decoder restores low-level features from the feature vector to generate an image; the discriminator is used for extracting the features from the image and judging whether the features are close to the image features of a certain domain.
8. The target detection method of the passive terahertz security inspection image based on mode conversion according to claim 1, characterized in that: in step S3, the number and types of data sets are continuously expanded by the passive terahertz security inspection image generated in step S5.
9. The target detection method of the passive terahertz security inspection image based on mode conversion according to claim 1, characterized in that: in step S4, a YOLOv5 target detection network is built and improved, wherein an attention mechanism module CBAM for fusing channel attention and spatial attention is added at the end of a backbone network of the YOLOv5 target detection network, a key position in an output feature map is concerned, and a feature extraction module adopts a bidirectional feature fusion mode: and (3) weighting a bidirectional feature pyramid network BiFPN, and realizing bidirectional fusion of features by adopting bidirectional cross scale connection and weighted feature fusion.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210823984.8A CN115187842A (en) | 2022-07-13 | 2022-07-13 | Target detection method of passive terahertz security inspection image based on mode conversion |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210823984.8A CN115187842A (en) | 2022-07-13 | 2022-07-13 | Target detection method of passive terahertz security inspection image based on mode conversion |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115187842A true CN115187842A (en) | 2022-10-14 |
Family
ID=83519452
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210823984.8A Pending CN115187842A (en) | 2022-07-13 | 2022-07-13 | Target detection method of passive terahertz security inspection image based on mode conversion |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115187842A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117115583A (en) * | 2023-08-09 | 2023-11-24 | 广东工业大学 | Dangerous goods detection method and device based on cross fusion attention mechanism |
CN117197787A (en) * | 2023-08-09 | 2023-12-08 | 海南大学 | Intelligent security inspection method, device, equipment and medium based on improved YOLOv5 |
-
2022
- 2022-07-13 CN CN202210823984.8A patent/CN115187842A/en active Pending
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117115583A (en) * | 2023-08-09 | 2023-11-24 | 广东工业大学 | Dangerous goods detection method and device based on cross fusion attention mechanism |
CN117197787A (en) * | 2023-08-09 | 2023-12-08 | 海南大学 | Intelligent security inspection method, device, equipment and medium based on improved YOLOv5 |
CN117115583B (en) * | 2023-08-09 | 2024-04-02 | 广东工业大学 | Dangerous goods detection method and device based on cross fusion attention mechanism |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111145177B (en) | Image sample generation method, specific scene target detection method and system thereof | |
CN115187842A (en) | Target detection method of passive terahertz security inspection image based on mode conversion | |
CN108537743B (en) | Face image enhancement method based on generation countermeasure network | |
Gaus et al. | Evaluation of a dual convolutional neural network architecture for object-wise anomaly detection in cluttered X-ray security imagery | |
CN110135375A (en) | More people's Attitude estimation methods based on global information integration | |
CN112288008B (en) | Mosaic multispectral image disguised target detection method based on deep learning | |
CN110533606B (en) | Security inspection X-ray contraband image data enhancement method based on generative countermeasure network | |
CN109816695A (en) | Target detection and tracking method for infrared small unmanned aerial vehicle under complex background | |
CN110543846A (en) | Multi-pose face image obverse method based on generation countermeasure network | |
US20080152082A1 (en) | Method and apparatus for use in security screening providing incremental display of threat detection information and security system incorporating same | |
CN107886089A (en) | A kind of method of the 3 D human body Attitude estimation returned based on skeleton drawing | |
CN107169475A (en) | A kind of face three-dimensional point cloud optimized treatment method based on kinect cameras | |
CN110501302B (en) | Enteromorpha distribution map generation method of multi-source evidence fusion data | |
CN114862837A (en) | Human body security check image detection method and system based on improved YOLOv5s | |
CN105389797A (en) | Unmanned aerial vehicle video small-object detecting method based on super-resolution reconstruction | |
Xu et al. | DeepMask: an algorithm for cloud and cloud shadow detection in optical satellite remote sensing images using deep residual network | |
Wang et al. | Improved YOLOX-X based UAV aerial photography object detection algorithm | |
CN110910467A (en) | X-ray image sample generation method, system and application | |
CN114548230B (en) | X-ray contraband detection method based on RGB color separation double-path feature fusion | |
CN115359360B (en) | Power field operation scene detection method, system, equipment and storage medium | |
CN111951226A (en) | Multi-scale contraband detection system and method based on X-ray image | |
CN110533582A (en) | A kind of safety check X-ray contraband image composition method based on production confrontation network | |
CN109708627A (en) | A kind of moving platform down space dynamic point target rapid detection method | |
CN113378949A (en) | Dual-generation confrontation learning method based on capsule network and mixed attention | |
CN115830243A (en) | CT three-dimensional target detection method based on deep learning |
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 |