A method and device for identifying concealed dangerous goods based on FCN-ACGAN data augmentation
Through the FCN-ACGAN-based data enhancement method, simulated samples are generated and training samples are extended, which solves the problem of poor classification effect caused by insufficient training data and improves the accuracy of item recognition.
Patent Information
- Application Number
- CN202210928339.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-03
- Publication Date
- 2025-06-17
- Estimated Expiration
- 2042-08-03
AI Technical Summary
In the prior art, due to insufficient training data, the classification effect of the deep learning model is poor, thereby reducing the accuracy of item recognition.
Using the data augmentation method based on FCN-ACGAN, by preprocessing the real spectral data, using the pre-trained FCN-ACGAN network model to generate simulation samples, expand the training samples, and further train the optimal classification model.
Extending training samples through data augmentation methods improves the accuracy and universality of the classification model and improves the accuracy of item recognition.
Smart Images

Figure CN115290596B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of article identification, and particularly to identifying concealed dangerous goods in articles by analyzing terahertz time-domain spectroscopy. Specifically, it relates to a method and device for identifying concealed dangerous goods based on FCN-ACGAN data augmentation. Background Art
[0002] Terahertz waves are widely used in the field of material detection because of their fingerprint spectral characteristics in the waveband. Identifying various dangerous goods with terahertz waves can achieve non-destructive detection. With the rapid development of artificial intelligence, it has become increasingly common to use deep learning to train terahertz time-domain spectroscopy data and use the trained model for non-destructive detection. However, the accuracy of the model generated by deep learning extremely depends on the amount of data for training terahertz time-domain spectroscopy data. Insufficient training data will reduce the universality of the model. Therefore, it is necessary to augment the terahertz time-domain spectroscopy data.
[0003] Existing experts and scholars have studied the augmentation of terahertz time-domain spectroscopy data. Mainly, the generative adversarial network (GAN), which has a significant effect in the deep learning time-series data augmentation method, is used to expand the original spectral data. Based on the new generation of artificial intelligence small-sample data augmentation method of WGAN (Wasserstein GAN), the original samples are first divided into training set and test set samples. After training the GAN with the training set samples, simulated sample data is generated to expand the scale of the training set samples. Then, a classifier is trained using the simulated samples. Finally, the classification effect of the classifier is tested using the test set samples.
[0004] However, using the generative adversarial network (GAN) for terahertz time-domain spectroscopy data augmentation also has certain limitations. Traditional GAN models are difficult to model time-series data, and there are problems such as unstable training, vanishing gradients, overly free patterns and easy collapse, resulting in missing feature information and poor representativeness in the finally generated data. Further, the classification effect of the classifier trained using the data with missing feature information is difficult to meet the detection requirements, resulting in low recognition accuracy for article identification based on the classification results. Summary of the Invention
[0005] The present invention provides a method and device for identifying concealed dangerous goods based on FCN-ACGAN data augmentation, which is used to solve the technical problem that in the existing data classification method, due to insufficient training data, the classification effect of the trained classification model is poor, further resulting in low article identification accuracy.
[0006] The present invention provides a method for identifying concealed dangerous goods in terahertz time-domain spectroscopy based on FCN-ACGAN data augmentation. The method includes:
[0007] Preprocess the pre-acquired real spectral data to obtain real samples;
[0008] Use the pre-trained FCN-ACGAN network model to generate simulated samples; wherein, the FCN-ACGAN network model includes a generator and a discriminator, and the generator and the discriminator each include a number of fully connected layers; the steps of training the FCN-ACGAN network model are as follows:
[0009] Step S1: Pre-train the discriminator using the real samples to obtain a primary discriminator;
[0010] Step S2: Use the generator to generate primary simulated samples;
[0011] Step S3: Mix the primary simulated samples with the real samples to obtain training samples;
[0012] Step S4: Use the training samples to actually train the primary discriminator and the generator, update the network parameters of the primary discriminator and the generator respectively based on the RMSProp optimizer, and determine whether the FCN-ACGAN network model reaches the Nash equilibrium. If so, stop training and obtain the trained FCN-ACGAN network model. If not, return to Step S2;
[0013] Train the pre-constructed initial ResNet-LSTM classification model according to the real samples and the simulated samples to obtain an optimal classification model;
[0014] Use the optimal classification model to classify the terahertz time-domain spectral data, and determine the concealed dangerous goods according to the classification results.
[0015] Preferably, the training of the pre-constructed initial ResNet-LSTM classification model according to the real samples and the simulated samples to obtain an optimal classification model is specifically:
[0016] Mix the real samples with the simulated samples to obtain extended samples, and divide the extended samples into pre-training samples and actual training samples;
[0017] Construct an initial ResNet-LSTM classification model, pre-train the initial ResNet-LSTM classification model using the pre-training samples to obtain the hyperparameters of the initial ResNet-LSTM classification model, and perform actual training on the initial ResNet-LSTM classification model based on the hyperparameters and the actual training samples. When the model error of the initial ResNet-LSTM classification model satisfies the preset error threshold, end the actual training to obtain the optimal classification model.
[0018] Preferably, the generation of the primary simulation samples by the generator specifically includes:
[0019] Establish a mapping relationship between the real data and the random noise in the latent space, and the generator generates simulation samples based on the mapping relationship, where the simulation samples include class labels.
[0020] Preferably, the update of the network parameters of the primary discriminator and the network parameters of the generator respectively based on the RMSProp optimizer specifically includes:
[0021] Keep the network parameters of the generator unchanged, obtain the network loss value of the primary discriminator, update the primary discriminator based on the RMSProp optimizer and the network loss value of the primary discriminator. When the update times of the primary discriminator meet the preset first update threshold, keep the network parameters of the primary discriminator unchanged, obtain the network loss value of the generator, and update the generator based on the RMSProp optimizer and the network loss value of the generator until the update times of the generator meet the preset second update threshold.
[0022] Preferably, the generator includes: an input module, a Dense fully connected layer, a Tanh activation function layer, and an output module.
[0023] Preferably, the discriminator includes: an input module, a Dense fully connected layer, a ReLU activation function layer, and a softmax classifier.
[0024] Preferably, before step S2, it further includes: pre-training the initial generator with the real samples to obtain a trained generator.
[0025] Preferably, the preprocessing of the pre-obtained real spectral data to obtain real samples specifically includes:
[0026] Perform data cleaning on the pre-obtained real spectral data to obtain the first initial sample;
[0027] Perform missing value supplementation on the first sample to obtain the second initial sample;
[0028] Perform normalization processing on the second initial sample to obtain real samples.
[0029] Preferably, the classification results include a first classification result and a second classification result. The determination of the concealed dangerous goods according to the classification results specifically includes:
[0030] Determine the type of the classification result. When the classification result is the first classification result, it is determined that the detected item is a non-concealed dangerous item. When the classification result is the second classification result, it is determined that the detected item is a concealed dangerous item, and the second classification result is compared with the pre-established spectral feature database of concealed dangerous items, and the type of the concealed dangerous item is judged according to the comparison result.
[0031] The present invention also provides an electronic device, which is characterized by including a memory and a processor. A computer program is stored in the memory. When the computer program is executed by the processor, the processor executes the steps of the foregoing data classification method.
[0032] It can be seen from the above technical solutions that the present invention has the following advantages:
[0033] A method and device for identifying concealed dangerous items based on FCN-ACGAN data augmentation provided by the present invention, based on the RMSProp optimizer and the real samples of the detected items obtained in advance, train and update the primary discriminator and generator including several fully connected layers to obtain an FCN-ACGAN model that reaches the Nash equilibrium. Among them, the fully connected layers can help the FCN-ACGAN model learn the dynamic characteristics between real data and improve the quality of the data generated by the generator. Using the RMSProp optimizer to update the network parameters of the discriminator and generator can effectively eliminate the jitter caused by the gradient difference in the update process and accelerate the convergence process of the FCN-ACGAN model. Further, use the generator in the trained FCN-ACGAN network model to create simulated samples, mix the simulated samples and real samples to train the initial ResNet-LSTM classification model to obtain an optimal classification model that meets the data classification standard, use the optimal classification model to classify the terahertz time-domain spectral data of the detected item, and finally identify the attributes and types of the detected item according to the classification result. The data classification method provided by the present invention uses the FCN-ACGAN model to create simulated samples to realize the expansion of training samples, and solves the technical problems in the existing data classification methods that the classification effect of the classification model obtained by training is poor due to insufficient training data, and further leads to low item recognition accuracy. Description of the Drawings
[0034] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0035] Figure 1The flowchart of a method for identifying concealed dangerous goods based on FCN-ACGAN data augmentation provided by an embodiment of the present invention;
[0036] Figure 2 The network structure diagram of the FCN-ACGAN model provided by an embodiment of the present invention;
[0037] Figure 3 The network structure diagram of the generator provided by an embodiment of the present invention;
[0038] Figure 4 The network structure diagram of the discriminator provided by an embodiment of the present invention. Specific embodiments
[0039] An embodiment of the present invention provides a method and device for identifying concealed dangerous goods based on FCN-ACGAN data augmentation. By training and updating a primary discriminator and a generator including several fully connected layers, an FCN-ACGAN network model reaching the Nash equilibrium is obtained. The generator in the FCN-ACGAN network model is used to create simulated samples to achieve the expansion of training samples. Further, the extended samples are used to train an initial ResNet-LSTM classification model to obtain an optimal classification model meeting the data classification standard, solving the technical problem in the existing data classification method that due to insufficient training data, the classification effect of the trained classification model is poor, further resulting in low accuracy of item identification.
[0040] To make the invention objectives, features, and advantages of the present invention more obvious and understandable, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the embodiments described below are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present invention.
[0041] Deep learning network models usually extract general features of a data set and use the features as characteristics for predicting a certain type of result. By training the constructed model using the data set, the result output by the model is made as close as possible to the above characteristics. When the training data is less, the models obtained by this training method often have limitations: when using the training set data for result prediction on the model, the prediction result is good, while when using the test set or validation set data for result prediction on the model, the error rate of the model is high and the generalization ability is low. To avoid the above problems, deep learning algorithms often need to obtain a larger number of training data to avoid the phenomenon of overfitting of the model by increasing the number of training data.
[0042] Terahertz time-domain spectroscopy technology utilizes the reflection or transmission of terahertz pulses on the surface of a sample to measure the reference signal and the measurement signal before and after passing through the sample respectively. Then, the collected time-domain signals are transformed into the frequency domain through fast Fourier transform (FFT) to obtain two frequency-domain spectra. Finally, optical parameters such as the refractive index, extinction coefficient, and absorption coefficient of the measured sample can be extracted by processing the frequency-domain data. By analyzing the relevant data, item detection (item classification) can be achieved. In the prior art, deep learning network models are usually established by using terahertz time-domain spectroscopy data as training samples, and then the models are used for item detection. However, in the field of concealed dangerous goods detection using terahertz time-domain spectroscopy, the acquisition of terahertz time-domain spectroscopy data for different dangerous goods usually adopts manual marking, which often consumes a large amount of labor and time costs, and the obtained data volume cannot cover the actual item detection scenarios. Insufficient training data will lead to low recognition accuracy and universality of the deep learning classification model, and further lead to low recognition rate of item attributes based on the classification results.
[0043] In view of this, the present application provides a method for identifying concealed dangerous goods based on FCN-ACGAN data augmentation. Please refer to Figure 1 , the method includes:
[0044] 100. Preprocess the pre-acquired real spectral data to obtain real samples.
[0045] It can be understood that during the process of spectral data acquisition, noise will inevitably exist. Preprocessing the original terahertz time-domain spectral data of the item to be detected (hereinafter collectively referred to as data, not elaborated further) can improve the expression ability of the data and make the data features more obvious.
[0046] 200. Generate simulated samples by using the pre-trained FCN-ACGAN network model.
[0047] Training the constructed model with sample data to make the accuracy of the model as high as possible is the ideal result of model training. However, when the training data is less, the model obtained by this training method often shows that when using the training set data for result prediction on the model, the prediction result is good, while when using the test set or validation set data for result prediction on the model, the error rate of the model is relatively high. To avoid the above problems, establishing a model often requires obtaining a larger number of training data to avoid the phenomenon of overfitting of the model. When the amount of original data is small, the data volume can be expanded by creating samples.
[0048] It is understandable that when there is a sufficient amount of training data, a model with relatively high accuracy can be trained. However, if the quality of the training data itself is poor and the training data is insufficient, the trained model usually has poor accuracy or cannot meet the usage requirements. Therefore, it is necessary to ensure both a sufficient amount of training data and good quality of the sufficient amount of training data.
[0049] When the amount of data is small, data augmentation can be used to obtain an increased total number of samples. However, if the total number of samples is first obtained through data augmentation and then the overall data is processed to improve the data quality, the workload of processing will increase. Therefore, in this embodiment, the original data is preferentially preprocessed, and then based on the original data, a pre-trained FCN-ACGAN network model is used to generate simulated samples to achieve sample expansion.
[0050] 300. Train the pre-constructed initial ResNet-LSTM classification model according to the real samples and the generated samples to obtain an optimal classification model.
[0051] According to step 200, the number of simulated samples that meet the training requirements can be obtained. The simulated samples are mixed with the original samples to achieve the expansion of training samples. The ResNet-LSTM classification model is trained using the expanded samples. When the model error meets the preset error threshold, the training is stopped to obtain an optimal classification model.
[0052] 400. Classify the terahertz time-domain spectroscopic data using the optimal classification model, and determine the concealed dangerous goods according to the classification results.
[0053] Preferably, in this embodiment, the classification results are divided into two types: the first classification result and the second classification result. Among them, the first classification result indicates that the item being detected is not dangerous, and the second classification result indicates that there are concealed dangerous goods in the item being detected.
[0054] The determination of the concealed dangerous goods according to the classification results is specifically as follows:
[0055] First, judge the type of the classification result. When the classification result is the first classification result, it is determined that the item being detected is a non-concealed dangerous good. When the classification result is the second classification result, it is determined that the item being detected is a concealed dangerous good, and the second classification result is compared with the pre-established spectral feature database of concealed dangerous goods, and the type of the concealed dangerous good is judged according to the comparison result.
[0056] It is understandable that the terahertz spectroscopic data of different items is different. By comparing the terahertz spectral features of the item with the established spectral feature database of various dangerous goods, it can be judged whether the item being detected is a dangerous good and what kind of dangerous good it is.
[0057] The data classification method provided by the present invention uses a pre-trained FCN-ACGAN network model to realize the expansion of data samples. Further, the initial ResNet-LSTM classification model is trained using the expanded samples to obtain an optimal classification model that meets the data classification criteria. Then, the optimal classification model is used to classify the terahertz time-domain spectral data of the item to be detected, and the concealed dangerous goods are determined according to the classification results, solving the technical problem in the existing data classification method that due to insufficient training data, the classification effect of the trained classification model is poor, and further resulting in a low recognition rate of item attributes based on the classification results.
[0058] On the basis of the foregoing embodiment, the present application provides another preferred embodiment. Step 100 can be specifically implemented in the following manner:
[0059] Perform data cleaning on the pre-acquired real spectral data to obtain a first initial sample, then supplement the missing values of the first sample to obtain a second initial sample, and finally perform normalization processing on the second initial sample to obtain a real sample.
[0060] It can be understood that before supplementing the missing values of the data, cleaning the data first can remove the noise data and irrelevant data in the data set, improve the data quality, avoid increasing the workload by processing useless data. Further, by supplementing the missing values of the cleaned data, data repair can be realized, the risk of bias can be reduced, and the sample representativeness can be improved. Further, standardization and normalization operations are performed on the repaired data to make the data features relatively consistent and exclude the influence of prominent features on model training.
[0061] On the basis of the foregoing embodiment, the present application provides another preferred embodiment. In step 200, the FCN-ACGAN network model includes a generator and a discriminator, and the generator and the discriminator respectively include a number of fully connected layers. The steps for constructing the FCN-ACGAN network model are as follows:
[0062] Step S1: Pre-train the discriminator using the real sample to obtain a primary discriminator;
[0063] Step S2: Create a primary generated sample using the generator;
[0064] Step S3: Mix the primary generated sample with the real sample to obtain a mixed sample;
[0065] Step S4: Use the mixed samples to actually train the primary discriminator and the generator, update the network parameters of the primary discriminator and the generator respectively based on the RMSProp optimizer, and determine whether the FCN-ACGAN network model reaches the Nash equilibrium. If so, stop the training and obtain the trained FCN-ACGAN network model. If not, return to step S2;
[0066] Wherein, before step S2, it further includes: pre-training the initial generator with the real samples to obtain the trained generator.
[0067] See Figure 2 , wherein the initial FCN-ACGAN model includes a discriminator (network) and a generator (network). Different from the traditional GAN network, in the FCN-ACGAN model of this embodiment, fully connected layers are respectively added to the generator and the discriminator. Through the fully connected layers, the FCN-ACGAN model can be helped to learn the dynamic characteristics between real data, improve the quality of the data generated by the generator, and enhance the ability of the discriminator to identify the authenticity of the data. Please refer to Figure 3 and Figure 4 , Figure 3 is a network structure diagram of a generator provided by this embodiment, Figure 4 is a network structure diagram of a discriminator provided by this embodiment.
[0068] Wherein, the generator is composed of 1 input module, 5 Dense fully connected layers, 4 Tanh activation function layers, and 1 output module. The input of the generator is random noise and label data, and the output is "simulated" samples.
[0069] The discriminator is composed of 1 input module, 5 Dense fully connected layers, 3 ReLU activation function layers, and 1 softmax classifier. The input of the discriminator includes the "simulated" samples output by the generator and real samples, and the output is the discriminant result with label types.
[0070] It can be understood that the initial generator without learning (training) does not know the "appearance" of real data at the beginning. Creating data directly using the untrained initial generator will result in a large difference between the distribution of the created data and the distribution of real data. If the data generated by the initial generator is directly mixed with real data and then the mixed data is fed into the discriminator for model training, it will increase the training process of the model. Therefore, to accelerate the training process, it is necessary to first let the initial generator perform imitation learning to enable the initial generator to have a certain imitation ability, and then use the data created by the trained generator to train the discriminator.
[0071] Similarly, if the data generated by the generator is directly mixed with the real data and then the mixed data is fed into the discriminator for model training, since the discriminator doesn't know what the real data looks like at the beginning, after the mixed data enters the discriminator, the discriminator can't make accurate judgments and can only improve its ability to distinguish between real and fake data through multiple updates. And during the update process, the generator is also constantly updated. The game process causes the discriminator's discrimination ability to grow slowly. Therefore, directly mixing real and fake data for model training will increase the model's training process. To accelerate the training process of the FCN-ACGAN model, in this embodiment, before using the mixed data for model training, the discriminator is preferentially pre-trained with real data so that the discriminator has the ability to distinguish between real and fake data at an early stage.
[0072] In the actual training stage, the generator uses the random noise in the latent space to establish a mapping relationship with the real data distribution, generates a number of simulated samples with labels, then mixes the number of simulated samples with the real samples to obtain training data, and inputs the training data into the discriminator that has been pre-trained. The discriminator uses the training data for training, obtains the discriminator network loss value, and updates the network parameters of the discriminator according to the discriminator's network loss value and the RMSProp optimizer. Each time it is updated, the discriminator becomes "smarter". When the update times of the discriminator meet the first update threshold, the parameters of the discriminator are kept unchanged, the network loss value of the generator is obtained, and the network parameters of the generator are updated according to the network loss value of the generator and the RMSProp optimizer. Similarly, each time it is updated, the generator also becomes "smarter" until the update times of the generator meet the preset second update threshold. The above process is continuously cycled. The generator continuously generates new simulated samples that are more similar to the real samples, and uses the new simulated samples and the original data to train the discriminator. The discriminator is continuously updated to improve its discrimination ability, and at the same time the generator is also continuously updated. The generator and the discriminator are alternately updated until the entire FCN-ACGAN model reaches the Nash equilibrium. Among them, during the update process, the learning rates of the generator and the discriminator are preset fixed values. In this embodiment, the update frequencies of the generator and the discriminator are not specifically limited, and those skilled in the art can set them according to needs.
[0073] When the FCN-ACGAN model reaches the Nash equilibrium, it means that the simulated samples generated by the generator in the FCN-ACGAN model can already "deceive" the discriminator. It can be understood that the simulated samples generated by the generator already meet the requirements as training data, and the expression ability of the simulated samples is close to that of the real data.
[0074] In the above embodiments, by adding fully connected layers to the generator network and the discriminator network respectively, it can help the FCN-ACGAN model learn the dynamic characteristics among real data, improve the quality of the data generated by the generator, and enhance the ability of the discriminator to identify the authenticity of data, enabling the generator to generate simulation samples more similar to real data. At the same time, during the update process of the generator network and the discriminator, the RMSProp optimizer is used to update the network parameters of the discriminator and the generator, which can effectively eliminate the jitter caused by the gradient difference during the update process and accelerate the model convergence process.
[0075] Based on the foregoing embodiments, the present application provides another preferred embodiment, and step 300 can be specifically implemented in the following manner:
[0076] After obtaining sufficient simulation samples through the generator, the simulation samples are mixed with real samples to obtain extended samples, and the ResNet-LSTM classification model is trained using the extended samples. When the model error meets the preset threshold, the training is stopped to obtain the optimal classification model, where the mixed samples are divided into training samples and actual training samples.
[0077] Further, training the ResNet-LSTM classification model using the mixed samples specifically includes: constructing an initial ResNet-LSTM classification model, pre-training the initial ResNet-LSTM classification model using pre-training samples to obtain the hyperparameters of the initial ResNet-LSTM classification model, and performing actual training on the initial ResNet-LSTM classification model based on the hyperparameters and the actual training samples. When the model error of the initial ResNet-LSTM classification model meets the error threshold, the actual training is ended to obtain the optimal classification model.
[0078] Further, the optimal classification model can be used to classify terahertz time-domain spectroscopy data.
[0079] To verify the feasibility of the terahertz time-domain spectroscopy concealed dangerous goods identification method based on FCN-ACGAN data augmentation, this embodiment provides an example for verifying the accuracy of dangerous goods identification based on the foregoing optimal classification model.
[0080] Select a certain number of pre - processed real samples, simulated samples created by FCN - ACGAN, and extended samples obtained by mixing simulated samples and real samples created by FCN - ACGAN. Among them, the number of real samples, simulated samples, and extended samples is the same. Input the original samples, simulated samples, and extended samples into the ResNet - LSTM classification model for classification and recognition respectively. The classification results are shown in Table 1. It can be seen from Table 1 that the performance of the simulated samples generated by FCN - ACGAN and real samples in the ResNet - LSTM classification model is basically the same, which verifies from the side that the simulated samples generated by the FCN - ACGAN model provided in this application can not only capture the effective features of the original data, but also generate new samples adapted to the features of real data. The recognition rate of the classification model for the extended samples obtained by mixing simulated samples and real samples created by FCN - ACGAN is 99.42%, and the recognition rate for real samples is 98.33%. Compared with real samples, the recognition accuracy of the model trained with extended samples has increased by 1.09%, and at the same time, the recognition accuracy of item recognition based on the classification results has been improved, verifying the feasibility and effectiveness of the terahertz time - domain spectroscopy concealed dangerous goods recognition method based on FCN - ACGAN data augmentation.
[0081] Table 1 Performance table of the recognition algorithm combining FCN - ACGAN and ResNet - LSTM
[0082]
[0083] The present invention is a terahertz time - domain spectroscopy concealed dangerous goods recognition method based on FCN - ACGAN data augmentation. After expanding the data set based on the FCN - ACGAN model, it can effectively improve the over - fitting problem caused by insufficient data and increase the recognition accuracy after training the classification model, so as to make the recognition accuracy of concealed dangerous goods higher.
[0084] This application also provides an electronic device. The device includes a memory and a processor. A computer program is stored in the memory. When the computer program is executed by the processor, the processor executes the steps of the foregoing data classification method.
[0085] Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the above - described systems, devices, and units can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated herein.
[0086] In several embodiments provided by the present application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection between each other can be through some interfaces. The indirect coupling or communication connection of the device or unit can be in electrical, mechanical, or other forms.
[0087] The units described as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they can be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0088] In addition, in each embodiment of the present invention, the functional units can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.
[0089] If the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in each embodiment of the present invention. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs that can store program codes.
[0090] As mentioned above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of each embodiment of the present invention.
Claims
1. A method for identifying concealed dangerous goods in terahertz time-domain spectroscopy based on FCN-ACGAN data augmentation, characterized in that, Including: Preprocess the pre-acquired real terahertz spectral data to obtain real samples; Use the pre-trained FCN-ACGAN network model to generate simulated samples; wherein, the FCN-ACGAN network model includes a generator and a discriminator, and the generator and the discriminator respectively include a number of fully connected layers; the steps of training the FCN-ACGAN network model are as follows: Step S1: Pre-train the discriminator with the real samples to obtain a primary discriminator; Step S2: Use the generator to generate primary simulated samples; Step S3: Mix the primary simulated samples with the real samples to obtain training samples; Step S4: Use the training samples to actually train the primary discriminator and the generator, update the network parameters of the primary discriminator and the generator respectively based on the RMSProp optimizer, and determine whether the FCN-ACGAN network model reaches the Nash equilibrium. If so, stop training to obtain the trained FCN-ACGAN network model. If not, return to Step S2; including, keeping the network parameters of the generator unchanged, obtaining the network loss value of the primary discriminator, and updating the primary discriminator based on the RMSProp optimizer and the network loss value of the primary discriminator. When the update times of the primary discriminator meet the preset first update threshold, keep the network parameters of the primary discriminator unchanged, obtain the network loss value of the generator, and update the generator based on the RMSProp optimizer and the network loss value of the generator until the update times of the generator meet the preset second update threshold; wherein, the generator includes: 1 input module, 5 Dense fully connected layers, 4 Tanh activation function layers, and 1 output module; the discriminator includes: 1 input module, 5 Dense fully connected layers, 3 ReLU activation function layers, and 1 softmax classifier; Train the pre-constructed initial ResNet-LSTM classification model according to the real samples and the simulated samples to obtain an optimal classification model; Use the optimal classification model to classify the terahertz time-domain spectral data, and determine the concealed dangerous goods according to the classification results.
2. The method for identifying concealed dangerous goods in terahertz time-domain spectroscopy based on FCN-ACGAN data augmentation according to claim 1, characterized in that, The training of the pre-constructed initial ResNet-LSTM classification model according to the real samples and the simulated samples to obtain an optimal classification model is specifically: Mix the real samples and the simulated samples to obtain extended samples, and divide the extended samples into pre-training samples and actual training samples; Construct an initial ResNet-LSTM classification model, pre-train the initial ResNet-LSTM classification model using the pre-training samples to obtain the hyperparameters of the initial ResNet-LSTM classification model, and perform actual training on the initial ResNet-LSTM classification model based on the hyperparameters and the actual training samples. When the model error of the initial ResNet-LSTM classification model meets the preset error threshold, end the actual training to obtain the optimal classification model.
3. The method for identifying concealed dangerous goods in terahertz time-domain spectroscopy based on FCN-ACGAN data augmentation according to claim 2, characterized in that, The specific operation of using the generator to generate primary simulation samples is as follows: Establish a mapping relationship between the real data and the random noise in the latent space. The generator generates simulation samples based on the mapping relationship, where the simulation samples include class labels.
4. The method for identifying concealed dangerous goods in terahertz time-domain spectroscopy based on FCN-ACGAN data augmentation according to claim 1, characterized in that, Before step S2, it further includes: pre-training the initial generator using the real samples to obtain the trained generator.
5. The method for identifying concealed dangerous goods in terahertz time-domain spectroscopy based on FCN-ACGAN data augmentation according to claim 1, characterized in that, The specific operation of preprocessing the pre-obtained real spectral data to obtain real samples is as follows: Perform data cleaning on the pre-obtained real spectral data to obtain the first initial sample; Perform missing value supplementation on the first initial sample to obtain the second initial sample; Perform normalization processing on the second initial sample to obtain real samples.
6. The method for identifying concealed dangerous goods in terahertz time-domain spectroscopy based on FCN-ACGAN data augmentation according to claim 1, characterized in that, The classification results include the first classification result and the second classification result. The specific operation of determining the concealed dangerous goods according to the classification results is as follows: Judge the type of the classification result. When the classification result is the first classification result, it is determined that the detected item is a non-concealed dangerous good. When the classification result is the second classification result, it is determined that the detected item is a concealed dangerous good, and the second classification result is compared with the pre-established spectral feature database of concealed dangerous goods, and the type of the concealed dangerous good is judged according to the comparison result.
7. An electronic device, characterized in that, It includes a memory and a processor. A computer program is stored in the memory. When the computer program is executed by the processor, the processor executes the steps of the data classification method according to any one of claims 1-6.