Data processing method and device, computer equipment and storage medium

Through training and fine-tuning of the detection model, the problem of manually re-labeling data in the identification of new categories of items in security inspection scenarios is solved, and efficient and accurate detection of contraband products is achieved.

CN119445271APending Publication Date: 2025-02-14SF TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310989854.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-07
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

When identifying new items in security inspection scenarios, the prior art requires manual re-labeling of large amounts of data, resulting in high cost and low identification efficiency.

Method used

By obtaining the package's security inspection data set and the preset initial category detection model, the intermediate category detection model is trained, and the target category detection model is fine-tuned using a small amount of new category data, and then the newly added categories are identified from a large number of data sets.

Benefits of technology

The cost of re-labeling a large number of data sets is reduced, the recognition efficiency and accuracy of new categories are improved, and automated detection of contraband products is realized.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119445271A_ABST
    Figure CN119445271A_ABST
Patent Text Reader

Abstract

The invention discloses a data processing method and device, computer equipment and a storage medium, and the method comprises the steps: training a preset initial category detection model through employing a first security check data set of a plurality of known categories and at least one unknown category, and obtaining an intermediate category detection model which can detect the plurality of known categories and unknown categories; and then the intermediate category detection model is finely adjusted to obtain a target category detection model, the efficiency of identifying new categories is improved, the target category detection model is utilized to identify security check image data of the new categories from a large amount of second security check data set, and category correction processing is performed on the security check image data of the new categories. According to the method and the device, the target security check image data of the new category can be obtained by acquiring the target security check image data of the new category, the target security check image data and the original security check image data of the known category are utilized for training to obtain the contraband detection model, the parcels of the new category can be accurately identified by utilizing the contraband detection model, the contraband identification efficiency and accuracy are improved, and the cost is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence, and specifically to a data processing method, apparatus, computer equipment and storage medium. Background Art

[0002] With the rapid development of science and technology, new items are constantly infiltrating into various fields of life. For security inspection application scenarios, the identification of prohibited items is becoming more and more important. How to identify new items and not misjudge them as prohibited items is also very important.

[0003] The current method for identifying newly added categories of items is to add a portion of the data of the newly added categories and then add it to the original data set. Because the original data set will contain data of the newly added categories, it is necessary to manually re-label the newly added categories in the data that has been labeled in the original data set. However, for security inspection scenarios, the original data set is generally large, such as starting at 100,000 levels, and the cost of manual re-labeling is very high, which reduces the efficiency of identifying new items. Summary of the invention

[0004] The embodiments of the present application provide a data processing method, apparatus, computer device, and storage medium, which can improve the recognition efficiency of newly added categories of packages and reduce the cost of manual labeling.

[0005] The present application provides a data processing method, comprising:

[0006] Acquire a first security inspection data set of a package and a preset initial category detection model, wherein the first security inspection data set includes security inspection image data of multiple different packages, and the multiple security inspection image data include first security inspection image data of multiple packages of known categories that are marked and second security inspection image data of at least one package of unknown category that is not marked;

[0007] Using the plurality of security inspection image data to train the preset initial category detection model, to obtain an intermediate category detection model capable of detecting a plurality of known categories and at least one unknown category;

[0008] Acquire the third security inspection image data in which the unknown category is marked as a newly added category;

[0009] The intermediate category detection model is fine-tuned using the third security inspection image data to obtain a target category detection model, where the target category detection model can detect multiple known categories and the newly added category.

[0010] The present application also provides a data processing method, comprising:

[0011] Acquire a second security inspection data set of the package, where the second security inspection data set includes security inspection image data of different packages;

[0012] Performing category detection processing on each security inspection image data using a target category detection model to detect the category of items included in each security inspection image data, wherein the target category detection model can detect item detection categories including multiple known categories and at least one newly added category;

[0013] Performing category correction processing on the detected candidate security inspection image data including the newly added category to obtain target security inspection image data belonging to the newly added category;

[0014] The target security inspection image data and the newly added category, as well as the original security inspection image data and each known category corresponding to each known category, are used as a third security inspection data set to perform model training to obtain a contraband detection model;

[0015] The prohibited goods detection model is used to detect the categories of items included in the package in the security inspection image to be identified, so as to determine the package whose item category is prohibited goods.

[0016] The present application also provides a data processing method, comprising:

[0017] Acquire a first security inspection data set of a package and a preset initial category detection model, wherein the first security inspection data set includes security inspection image data of multiple different packages, and the multiple security inspection image data include first security inspection image data of multiple packages of known categories that are marked and second security inspection image data of at least one package of unknown category that is not marked;

[0018] Inputting the plurality of security inspection image data into the preset initial category detection model for detection processing, obtaining the predicted item categories included in the plurality of security inspection image data and the classification features of the candidate frame images corresponding to the predicted item categories, wherein the predicted item categories include a plurality of known predicted categories and at least one unknown predicted category;

[0019] Performing loss processing according to the classification features of the candidate frame image corresponding to the predicted category of the object and the classification features of the labeled detection frame image of the known category to obtain an overall loss value;

[0020] The network parameters of the preset initial category detection model are updated according to the overall loss value until the preset conditions are met, and the training is stopped to obtain an intermediate category detection model that can detect multiple known categories and at least one unknown category.

[0021] The present application also provides a data processing device, comprising:

[0022] A first acquisition module is used to acquire a first security inspection data set of a package and a preset initial category detection model, wherein the first security inspection data set includes security inspection image data of multiple different packages, and the multiple security inspection image data include first security inspection image data of multiple packages of known categories that are marked and second security inspection image data of at least one package of unknown category that is not marked;

[0023] A first detection module, used for inputting the plurality of security inspection image data into the initial category detection model for detection processing, so as to train the initial category detection model and obtain an intermediate category detection model capable of detecting a plurality of known categories and at least one unknown category;

[0024] The first acquisition module is further used to acquire the third security inspection image data whose unknown category is marked as a newly added category;

[0025] A fine-tuning module is used to fine-tune the intermediate category detection model using the third security inspection image data to obtain a target category detection model, wherein the target category detection model can detect multiple known categories and the newly added category.

[0026] The present application also provides a data processing device, comprising:

[0027] A second acquisition module, used to acquire a second security inspection data set of the package, wherein the second security inspection data set includes security inspection image data of different packages;

[0028] A first detection module is used to perform category detection processing on each security inspection image data using a target category detection model to detect the category of items included in each security inspection image data, wherein the target category detection model can detect item detection categories including multiple known categories and at least one newly added category;

[0029] A correction module, used for performing category correction processing on the detected candidate security inspection image data including the newly added category to obtain target security inspection image data belonging to the newly added category;

[0030] A second training module is used to use the target security inspection image data and the newly added category, as well as the original security inspection image data corresponding to each known category and each known category as a third security inspection data set to perform model training to obtain a contraband detection model;

[0031] The second detection module is used to detect the category of items included in the package of the security inspection image to be identified by using the prohibited items detection model to determine the package whose item category is prohibited items.

[0032] The present application also provides a data processing device, comprising:

[0033] A third acquisition module is used to acquire a first security inspection data set of a package and a preset initial category detection model, wherein the first security inspection data set includes security inspection image data of multiple different packages, and the multiple security inspection image data include first security inspection image data of multiple packages of known categories that are marked and second security inspection image data of at least one package of unknown category that is not marked;

[0034] a detection processing module, used for inputting the plurality of security inspection image data into the preset initial category detection model for detection processing, and obtaining the predicted item categories included in the plurality of security inspection image data and the classification features of the candidate frame images corresponding to the predicted item categories, wherein the predicted item categories include a plurality of known predicted categories and at least one unknown predicted category;

[0035] A loss processing module, used to perform loss processing according to the classification features of the candidate frame image corresponding to the predicted category of the item and the classification features of the labeled detection frame image of the known category, so as to obtain an overall loss value;

[0036] The updating module is used to update the network parameters of the preset initial category detection model according to the overall loss value until the preset conditions are met, stop training, and obtain an intermediate category detection model that can detect multiple known categories and at least one unknown category.

[0037] The present application also provides a computer device, which includes: one or more processors; a memory; and one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the processor to implement the steps in the data processing method described above.

[0038] The present application also provides a computer-readable storage medium on which a computer program is stored. The computer program is loaded by a processor to execute the steps in the above-mentioned data processing method.

[0039] The present application trains an initial category detection model through a first security inspection data set of multiple known categories and at least one unknown category to obtain an intermediate category detection model that can detect multiple known categories and unknown categories, and uses a small amount of security inspection image data of the newly added category to fine-tune the intermediate category detection model to obtain a target category detection model, and then uses the target category detection model to identify security inspection image data of the newly added category from a large number of second security inspection data sets. In this way, the target category detection model obtained by training and fine-tuning can be used to obtain security inspection image data of the newly added category from a large number of second security inspection data sets, avoiding re-labeling of a large number of second security inspection data sets, reducing the cost of re-labeling a large number of data sets, and then performing category correction processing on the security inspection image data of the newly added category to obtain accurate target security inspection image data of the newly added category, and then using the accurate target security inspection image data of the newly added category and the original security inspection image data of the known category to train a contraband detection model, and using the contraband detection model to accurately identify packages of the newly added category, improve the efficiency and accuracy of contraband identification, and reduce costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0041] Figure 1 It is a schematic diagram of an application scenario provided by an embodiment of the present application;

[0042] Figure 2 It is a flowchart of the data processing method provided in the embodiment of the present application;

[0043] Figure 3 It is a schematic diagram of a sub-flow of the data processing method provided in an embodiment of the present application;

[0044] Figure 4 is another sub-flow diagram of the data processing method provided in an embodiment of the present application;

[0045] Figure 5 It is a flow chart of a data processing method provided in an embodiment of the present application;

[0046] Figure 6 is a structural schematic diagram of a data processing device provided in an embodiment of the present application;

[0047] Figure 7 is another structural schematic diagram of a data processing device provided in an embodiment of the present application;

[0048] Figure 8 is another structural schematic diagram of a data processing device provided in an embodiment of the present application;

[0049] Fig. 9 It is a schematic diagram of the structure of an embodiment of a computer device provided in the embodiments of the present application. DETAILED DESCRIPTION

[0050] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.

[0051] The embodiments of the present application provide a data processing method, device, storage medium and computer equipment. Specifically, the data processing method of the embodiments of the present application can be executed by a computer device, and the data processing device in the embodiments of the present application can be integrated in a computer device. Among them, the computer device can be a terminal or a server device. The terminal can be a smart phone, a tablet computer, a laptop computer, a touch screen, a game console, a wearable device, a personal computer (PC, Personal Computer), a personal digital assistant (Personal Digital Assistant, PDA), an intelligent robot, an intelligent vehicle-mounted terminal device. The server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, and big data and artificial intelligence platforms.

[0052] Figure 1 : This is a schematic diagram of an application scenario provided by an embodiment of the present application. The application scenario includes a security inspection terminal and a computer device. The computer device is a server, and the server can be a cloud server. The security inspection terminal sends the security inspection image to be identified of the package to be identified obtained in the security inspection application scenario to the server. The server calls the data processing method in the present application to identify the security inspection image to be identified, and sends the recognition result of the security inspection image to be identified, such as whether it is a prohibited item and the image of the prohibited item, and even the waybill number of the package to be identified, to the security inspection terminal, so that the security inspection personnel at the security inspection terminal can perform the next step of processing, such as judging the image of the prohibited item and other information sent by the server, intercepting the package with prohibited items and unpacking it for inspection, or sending the waybill number of the package sent by the server again to intercept the package across the entire network.

[0053] A data processing method, device, computer equipment and storage medium in the embodiments of the present application can be used in any package security inspection application scenario. It should be noted that the solution in the present application can also be used in other application scenarios, as long as the training data set is modified to correspond to the data set of the application scenario. A data processing method, device, computer equipment and storage medium provided in the embodiments of the present application will be described in detail below.

[0054] Figure 2 It is a flow chart of a data processing method provided in an embodiment of the present application. The method is applied in a computer device. The method is specifically used to obtain a target category detection model. The method includes the following steps.

[0055] 101. Obtain a first security inspection data set of a package and a preset initial category detection model, wherein the first security inspection data set includes security inspection image data of multiple different packages, and the multiple security inspection image data include first security inspection image data of multiple packages of known categories that are marked and second security inspection image data of at least one package of unknown category that is not marked.

[0056] The first security inspection data set is a data set obtained by adding the second security inspection image data of at least one package of unknown category that is not labeled to the original first security inspection image data of multiple packages of known categories. The first security inspection data set includes security inspection image data of multiple different packages, wherein there are multiple first security inspection image data and multiple second security inspection image data.

[0057] The preset initial category detection model may be any category detection model that requires updating parameters before it can be used, and the initial category detection model may realize the recognition of the security inspection image data of the package.

[0058] In one embodiment, the preset initial category detection model may be a model that is improved upon the Faster RCNN model. Figure 3 As shown, the step of obtaining a preset initial category detection model includes steps 1011-1014.

[0059] 1011, obtaining an initial category detection model, where the initial category detection model includes a feature extraction network, a region candidate network, an interest domain pooling network, and a classification regression network.

[0060] Among them, the feature extraction network is used to extract features, such as the feature extraction network can be a convolutional neural network, or other networks, for extracting convolution features, the region proposal network (RPN) is used to generate candidate boxes according to the extracted features and determine the image in the candidate box, that is, the candidate box image, the interest region pooling network (RoiPooling) is used to generate detection feature information of the candidate box image, and the classification regression network (Classification) is used to classify according to the detection feature information to obtain the object category, and further perform regression processing to obtain the accurate candidate box image corresponding to the object category.

[0061] 1012. Adjust the preset threshold of the regional candidate network to lower the preset threshold.

[0062] It should be noted that in the prior art, only positive sample candidate frame images and negative sample candidate frame images are distinguished in the region candidate network. Therefore, the preset threshold in the region candidate network is set larger so that the positive sample candidate frame images and negative sample candidate frame images can be distinguished more accurately. In the present application, because candidate frame images of unknown categories need to be identified, if the original preset threshold is still used, candidate frame images of unknown categories cannot be obtained, and unknown categories cannot be identified.

[0063] Therefore, the preset threshold is adjusted in the present application to lower the preset threshold so that when performing detection, the initial detection frame image in the regional candidate network whose score is greater than the adjusted preset threshold is used as the candidate frame image, and the candidate frame image includes positive sample candidate frame images and negative sample candidate frame images, and the negative sample candidate frame images include candidate frame images of unknown categories.

[0064] Because candidate box images of unknown categories can be obtained in the region proposal network, the unknown categories can be classified in the subsequent classification.

[0065] 1013. Add a new classification layer of unknown categories in the classification regression network, and modify the classification categories of the classification regression network to known categories and unknown categories.

[0066] It should be noted that the classification regression network can only detect multiple known categories, but cannot detect unknown categories. Therefore, a classification layer for unknown categories is added to the classification regression network, and the classification categories of the classification regression network are modified to known categories and unknown categories, so that the unknown categories can be classified.

[0067] 1014, using the adjusted and modified initial category detection model as a preset initial category detection model.

[0068] This embodiment takes Faster RCNN as an example of an initial category detection model to illustrate how to adjust and modify the initial category detection model to obtain a preset initial category detection model.

[0069] 102. Using a plurality of security inspection image data, a preset initial category detection model is trained to obtain an intermediate category detection model capable of detecting a plurality of known categories and at least one unknown category.

[0070] Training the preset initial category detection model includes training a region candidate network, fixing network parameters of the region candidate network after training the region candidate network, and then training the preset initial category detection model and other multiple training steps.

[0071] Taking the training of the region candidate network as an example, multiple security inspection image data in the first security inspection data set are input into the feature extraction network, and each feature information corresponding to each security inspection image data is extracted. Each feature information is input into the region candidate network for processing, and the initial detection frame (initial detection frame image) generated in the region candidate network and the score of the initial detection frame image are obtained. The initial detection frame image whose score is greater than the adjusted preset threshold is used as the candidate frame image, and the first candidate frame image overlapping with the labeled candidate frame image of the known category in the candidate frame image is obtained, which is also called the positive sample candidate frame image. The regression loss is calculated based on the first candidate frame image and the candidate frame image of the known category, so as to update the network parameters of the feature extraction network and the region candidate network by using the calculated regression loss, wherein the second candidate frame image in the candidate frame image that does not overlap with the labeled candidate frame image of the known category belongs to the negative sample candidate frame image, wherein the negative sample candidate frame image also includes the initial detection frame image whose score of the initial detection frame image is not greater than the adjusted preset threshold, and the second candidate frame image is directly marked as the candidate frame image of the unknown category. In this way, the region candidate network is trained.

[0072] It should be noted that, unlike the prior art, the negative sample candidate frame images in the prior art will not participate in the calculation in the subsequent steps, while the negative sample candidate frame images in the present application include candidate frame images of unknown categories, so they need to participate in the calculation and classification in the subsequent steps.

[0073] After training the region candidate network, the network parameters of the region candidate network are fixed, and then the plurality of security inspection image data in the first security inspection data set are used to train the preset initial category detection model. Specifically, Figure 4 As shown, the following steps 1021-1024 are included.

[0074] 1021, input the multiple security inspection image data into a preset initial category detection model for detection processing, and obtain the classification features of the candidate frame images corresponding to the item prediction categories and the item prediction categories included in the multiple security inspection image data, wherein the item prediction categories include multiple known prediction categories and at least one unknown prediction category.

[0075] Among them, the predicted item category and the item category have the same meaning, the known predicted category and the known category have the same meaning, and the unknown predicted category and the unknown category have the same meaning. Because they are the item categories obtained during the training process, predictions are added to distinguish the names.

[0076] Correspondingly, step 1021 specifically includes: using a feature extraction network of a preset initial category detection model to perform feature extraction processing on multiple security inspection image data to obtain each feature information corresponding to the multiple security inspection image data; inputting each feature information into a regional candidate network for processing, and taking the initial detection frame image in the regional candidate network whose score is greater than the adjusted preset threshold as a candidate frame image, wherein the candidate frame image includes the position information of the candidate frame, etc., and the candidate frame image includes a positive sample candidate frame image and a negative sample candidate frame image, and the negative sample candidate frame image includes a candidate frame image of an unknown category; according to each feature information, using an interest domain pooling network to determine the detection feature information of the candidate frame image, such as taking the candidate frame image For example, the features of the corresponding position in the corresponding feature information are used as the detection feature information of the candidate frame image; according to the detection feature information, the classification network in the classification regression network is used to determine the predicted category of the item included in the candidate frame image, such as using the classification network in the classification regression network to determine the category probability of the predicted category of the item included in the candidate frame image, and determining the final predicted category of the item according to the category probability, and using the regression network in the classification regression network to determine the final candidate frame image corresponding to the predicted category of the item, for example, using the regression network according to the candidate frame offset of the predicted category of the item and the (predicted) candidate frame image, determine the final candidate frame image in the corresponding security inspection image data, and the final candidate frame image includes its position information in the corresponding security inspection image, etc. In this way, the final candidate frame image corresponding to the predicted category of the item and the predicted type of the item is obtained.

[0077] Among them, the classification features of the candidate frame image include the category probability of the predicted category of the object included in the candidate frame image and / or the position information of the final candidate frame image in the corresponding security inspection image, etc.

[0078] In this step, the network parameters of the region candidate network in the preset initial category detection model are fixed. It should be noted that in the prior art, no further processing is performed on the negative sample candidate frame image, because the initial category detection model in the prior art cannot detect unknown categories, while in this application, the negative sample candidate frame image is input into the interest domain pooling network and the classification regression network for further processing to classify / detect unknown categories.

[0079] Among them, the classification features of the candidate frame images corresponding to the item prediction categories include the classification features of the candidate frame images of the known prediction categories and the classification features of the candidate frame images of the unknown prediction categories.

[0080] 1022. Perform loss processing according to the classification features of the candidate frame image corresponding to the predicted category of the object and the classification features of the labeled detection frame image of the known category to obtain an overall loss value.

[0081] Among them, for the loss processing of the classification features of the detection frame image of the known category, the first loss processing is performed using the classification features of the candidate frame image of the known prediction category and the classification features of the labeled detection frame image of the known category to obtain a first loss value.

[0082] The classification features of the candidate frame images of known prediction categories are feature information obtained by using the softmax layer in the classification network in the classification regression network, such as the category probability of the candidate frame image corresponding to a certain category and / or the position information of the candidate frame image in the corresponding security inspection image. The labeled detection frame images of known categories are known information. The classification features of the labeled detection frame images of known categories correspond to the category probability of the labeled detection frame images of known categories corresponding to a certain category or the position information of the classified detection frame images in the corresponding security inspection image, except that the category probability of the labeled candidate frame images of known categories corresponding to a certain category is 1.

[0083] For the first loss processing of known prediction categories, cross entropy loss processing is usually used, and the first loss value obtained is the cross entropy loss value, that is, the classification features of the candidate frame image of the known prediction category and the classification features of the labeled detection frame image of the known category are subjected to cross entropy loss processing to obtain the cross entropy loss value. For the cross entropy loss processing, please refer to the existing steps of cross entropy loss processing, which will not be described here.

[0084] Among them, for the classification features of the detection frame image of the unknown category, contrastive learning is used to perform a second loss processing on the classification features of the candidate frame image of the known prediction category and the classification features of the candidate frame image of at least one unknown prediction category, and the classification features of each candidate frame image of at least one unknown prediction category to obtain a second loss value.

[0085] It should be noted that in the prior art, the loss in the initial category detection model only includes the loss of candidate frame images / positive sample candidate frame images of known categories. Since negative sample candidate frame images do not belong to the target, there is no need to process the loss of negative sample candidate frame images (including candidate frame images of unknown categories). In this application, since the candidate frame images obtained in the regional candidate network include both candidate frame images / positive sample candidate frame images of known categories and candidate frame images of unknown categories (belonging to negative sample candidate frame images), it is necessary to design and calculate the loss of candidate frame images of unknown categories in order to detect unknown categories.

[0086] For candidate frame images of unknown categories, the cross entropy loss processing method cannot be used. This is because the currently defined unknown categories may be categories merged from multiple categories. If the cross entropy loss processing is directly used, it will easily lead to feature confusion. In addition, since there are some unlabeled samples that we want in the candidate frame images of unknown categories, these samples themselves also have some features. Therefore, in this application, the contrastive learning method is used to design the loss of candidate frame images of unknown categories, in the hope of clustering some new categories from the candidate frame images of unknown categories. Using the contrastive learning method, the second loss value is formed between the unknown category and the known category, and between the unknown category and the unknown category. Specifically, the distance between the unknown category and the known category is farther, while the distance between the unknown category and the position category is closer. In this way, the distance between the unknown category and the unknown category is reduced, and the distance between the known category and the unknown category is widened.

[0087] By using contrastive learning, a second loss processing is performed on the classification features of the candidate frame images of the known prediction category and the classification features of the candidate frame images of at least one unknown prediction category, the classification features of each candidate frame image of at least one unknown prediction category, and the classification features of each detection frame image of the known prediction category to obtain a second loss value.

[0088] Specifically, the distance between the features of the candidate frame image of the known prediction category and the features of the candidate frame image of at least one unknown prediction category is increased to obtain a first contrast loss value between the known prediction category and the at least one unknown prediction category; the distance between the features of each candidate frame image of at least one unknown prediction category is reduced to obtain a second contrast loss value; and the second loss value is determined based on the first contrast loss value and the second contrast loss value.

[0089] For details, please refer to formula (1), where L cont represents the second loss value, D represents the difference function, such as the distance function, such as the Euclidean distance, etc., g c represents the classification feature of the Cth class, p irepresents the classification feature of the i-th category, x represents the difference between a similar candidate box image and a dissimilar candidate box image, such as distance, etc., otherwise represents the case where i≠C.

[0090]

[0091]

[0092] After obtaining the first loss value and the second loss value, the overall loss value is determined according to the first loss value and the second loss value.

[0093] In one embodiment, the first loss value and the second loss value are weighted and summed to obtain the overall loss value, wherein the sum of the weights of the first loss value and the second loss value is 1. In one case, the weight ratio of the first loss value and the second loss value may be 3:1, that is, the weight of the first loss value is 3 / 4, and the weight of the second loss value is 1 / 4.

[0094] 1023, updating the network parameters of the preset initial category detection model according to the overall loss value until the preset conditions are met, stopping the training, and obtaining an intermediate category detection model that can detect multiple known categories and at least one unknown category.

[0095] The preset conditions include but are not limited to the overall loss value reaching the preset loss value, the number of training rounds reaching the preset number of rounds, or the total training time reaching the preset time, etc. When the preset conditions are met, the training is stopped, and the model obtained at this time is used as the intermediate category detection model, which can detect multiple known categories and at least one unknown category.

[0096] 103. Obtain the third security inspection image data in which the unknown category marked is a newly added category.

[0097] The amount of the third security inspection image data is small, that is, a small amount of third security inspection image data with the unknown category marked as a newly added category is collected. In one embodiment, the amount of the third security inspection image data is smaller than the amount of the first security inspection image data, and smaller than the amount of the second security inspection image data.

[0098] Since the amount of the third security inspection image data whose known categories are annotated as newly added categories is relatively small, no matter which method is used for annotation, the cost required is relatively small, thereby improving efficiency.

[0099] 104. Fine-tune the intermediate category detection model using the third security inspection image data to obtain a target category detection model, where the target category detection model can detect multiple known categories and newly added categories.

[0100] The intermediate category detection model is fine-tuned using the labeled third security inspection image data of the newly added category, wherein fine-tuning refers to using the second security inspection image data to train the intermediate category detection model to update the parameters of the intermediate category detection model so that the updated intermediate category detection model can recognize the third security inspection image data of the newly added category, so as to detect the newly added category and classify the newly added category.

[0101] The model obtained after fine-tuning is the target category detection model in the present application, and the target category detection model can detect multiple known categories and newly added categories, wherein the newly added category can be a category in any actual scenario.

[0102] In this embodiment, the initial category detection model is adjusted and modified to obtain a preset initial category detection model, and a first security inspection data set is used, wherein the first security inspection data set includes first security inspection image data of packages of multiple known categories that are labeled and second security inspection image data of at least one package of unknown category that is not labeled, to train the preset initial category detection model to obtain an intermediate network model that can identify multiple known categories and unknown categories, and a small amount of third security inspection image data in which the unknown category is a newly added category is used to fine-tune the intermediate network model to obtain a target category detection model that can detect known categories and newly added categories. The target category detection model can be understood as a semi-supervised model. In this way, only a small amount of third security inspection image data of a newly added category is needed to obtain a target category detection model that can detect known categories and newly added categories.

[0103] In one embodiment, after obtaining the target category detection model, the target category detection model is used to perform category detection processing on the security inspection image to be identified, so as to obtain the category of the items included in the security inspection image to be identified. Specifically, the detailed steps are described in the corresponding steps in the following embodiment.

[0104] Figure 5 It is another flow chart of the data processing method provided in an embodiment of the present application. The method is applied in a computer device. The method obtains an accurate contraband detection model that can detect contraband based on the target category detection model obtained above. The method includes the following steps.

[0105] 201. Acquire a second security inspection data set of a package, where the second security inspection data set includes security inspection image data of different packages.

[0106] The second security inspection data set may be a large amount of security inspection image data obtained in a production system such as a security inspection system. For example, a large amount of security inspection image data is downloaded from the production system, and the downloaded security inspection image data is used as the second security inspection data set. The second security inspection data set includes security inspection image data of different packages, and the security inspection image data in the second security inspection data set is unlabeled security inspection image data.

[0107] 202. Perform category detection processing on each security inspection image data using a target category detection model to detect the category of items included in each security inspection image data. The target category detection model can detect item detection categories including multiple known categories and at least one newly added category.

[0108] Among them, the target category detection model is obtained by training a preset initial category detection model using the first security inspection data set, and after obtaining an intermediate category detection model that can detect multiple known categories and at least one unknown category, fine-tuning the intermediate category detection model using the third security inspection image data in which the unknown category is marked as a newly added category.

[0109] Among them, a target category detection model is used to perform feature extraction processing on each security inspection image data to obtain each feature information corresponding to each security inspection image data; based on each feature information, a candidate frame image in each security inspection image data is located, and the candidate frame image includes a plurality of candidate frame images of known categories and a candidate frame image of a newly added category; according to each feature information, detection feature information of each candidate frame image is determined; according to the detection feature information, an item category to which the candidate frame image belongs is determined, and the item category includes a plurality of known categories and a newly added category.

[0110] Among them, the feature extraction network in the target category detection model is used to perform feature extraction processing on each security inspection image data. After obtaining each feature information corresponding to each security inspection image data, each feature information is input into the regional candidate network for processing, and the initial detection frame image whose score in the regional candidate network is greater than the adjusted preset threshold is used as the candidate frame image, and the candidate frame image includes candidate frame images of multiple known categories and candidate frame images of newly added categories. According to each feature information, the interest domain pooling network is used to determine the detection feature information of the candidate frame image, such as taking the feature of the candidate frame image at the corresponding position in the corresponding feature information as the detection feature information of the candidate frame image; according to the detection feature information, the classification network in the classification regression network is used to determine the category of the item included in the candidate frame image, for example, the classification network in the classification regression network is used to determine the classification probability of the item category to which the candidate frame image belongs according to the detection feature information, and the item category to which the candidate frame image belongs is determined according to the classification probability, and then the regression network in the classification regression network is used to determine the final candidate frame image corresponding to the item category, for example, according to the candidate frame offset of the item category and the predicted candidate frame image, the final candidate frame image in the corresponding security inspection image data is determined.

[0111] In this way, the target category detection model is used to detect the category of items in each security inspection image data in the second security inspection data set, and the item category includes a newly added category and multiple known categories. Among them, since the target category detection model is a semi-supervised model, there may be some errors in the detected item category and it cannot be directly applied to the security inspection application scenario of the production system. The security inspection application scenario of the production system requires a high accuracy rate, and directly using the target category detection model cannot meet the accuracy requirements in the production system.

[0112] Even so, the target category detection model can obtain security inspection image data of the newly added category from a large number of second security inspection data sets. Using the target category detection model to automatically determine the security inspection image data of the newly added category greatly improves efficiency and greatly reduces labor costs compared to manually determining it from a large number of second security inspection data sets.

[0113] 203 , performing category correction processing on the detected candidate security inspection image data including the newly added category to obtain target security inspection image data belonging to the newly added category.

[0114] In one embodiment, the above-mentioned step 203 includes: matching the detected candidate security inspection image data including the newly added category and the marked security inspection image data of the newly added category to obtain a matching result; when the matching result indicates that the candidate security inspection image data and the marked security inspection image data of the newly added category do not match, eliminating the candidate security inspection image data; when the matching result indicates that the candidate security inspection image and the marked security inspection image data of the newly added category match, retaining the candidate security inspection image data to obtain the target security inspection image data belonging to the newly added category.

[0115] Among them, the detected security inspection image data including the newly added category is used as the candidate security inspection image data, and the candidate security inspection image data includes multiple security inspection image data, and matching processing is performed on each security inspection image data. When the matching result indicates a match, it means that the security inspection image data detected by the target category detection model is correct, so the security inspection image data can be retained. When the matching result indicates a mismatch, it means that the stamped security inspection image data detected by the target category detection model is erroneous or wrong, so the security inspection image data is discarded. The same processing is performed on multiple security inspection image data in the candidate security inspection image data to obtain the target security inspection image data belonging to the newly added category. The category of the target security inspection image data belongs to the newly added category.

[0116] In one embodiment, the detected candidate security inspection image data including the newly added category is subjected to category correction processing, and the category correction processing may also be performed manually. Since the candidate security inspection image data is obtained from a large amount of second security inspection data sets by using the target category detection model, the data volume of the candidate security inspection image data is already much smaller than the data volume of the second key data set. Even if the category correction processing is performed manually, it is much more efficient than re-labeling from the second security inspection data set. In addition, each security inspection image data in the second security inspection data set will be labeled by using the target category detection model. When the category correction processing is performed manually, it is only necessary to remove incorrect annotations, and there is no need to manually label the correct ones, which further improves efficiency.

[0117] The above-mentioned category correction processing is performed to accurately classify the target security inspection image data and minimize errors and mistakes, so as to improve the accuracy of the model during subsequent model training.

[0118] 204 , the target security inspection image data and the newly added categories, as well as the original security inspection image data and the known categories corresponding to the known categories, are used as a third security inspection data set to perform model training to obtain a contraband detection model.

[0119] The original security inspection image data corresponding to the known category refers to the security inspection image data of the marked known category, for example, the first security inspection image data of the marked known category, and the target security inspection image data and the newly added category, the reason button image data corresponding to each known category and each known category are used as the third security inspection data set. In this way, the target category detection model is used to obtain the third security inspection data set, and the accuracy of the third security inspection data set is relatively high, such as an accuracy rate close to 100%, and can be used for subsequent model training.

[0120] Here, the model trained using the third security inspection data set can be any model that can detect items, but the accuracy of the model is higher. For example, the model can be a YOLOv series model, such as a YOLOv5 model. The YOLOv5 model is trained using the third security inspection data set to obtain a contraband detection model. The method of training the YOLOv5 model can refer to the existing model training method, which will not be described in detail here.

[0121] 205 , using a prohibited goods detection model to detect the categories of items included in the package in the security inspection image to be identified, so as to determine the package whose item category is prohibited goods.

[0122] After the prohibited goods detection model is trained, the prohibited goods detection model is deployed in a computer device, such as a security inspection device in a production system, and the prohibited goods detection model is used to detect the categories of items included in the packages in the security inspection images to be identified, so as to determine the packages whose item categories are prohibited items.

[0123] It should be noted that in the embodiments of the present application, the computer device for model training and the computer device for model deployment generally belong to different computer devices. For example, the computer device for model training, including training target category detection models and contraband detection models, may be a server device, and the computer device for model deployment may be a computer device in a production system. Of course, they may also be the same computer device, which will not be explained in detail.

[0124] In the above embodiment, the method of training the model twice does not need to re-label the original data set, which reduces the cost of labeling. At the same time, it can realize the recognition of new categories, greatly reduce the cost of labeling, and improve the efficiency and accuracy of contraband identification.

[0125] All of the above technical solutions can be arbitrarily combined to form optional embodiments of the present application, which will not be described in detail here.

[0126] In order to better implement the data processing method of the embodiment of the present application, the embodiment of the present application also provides a data processing device. Figure 6 , Figure 6 The data processing device 300 may include a first acquisition module 301 , a first training module 302 , and a fine-tuning module 303 .

[0127] The first acquisition module 301 is used to acquire a first security inspection data set of a package and a preset initial category detection model, wherein the first security inspection data set includes security inspection image data of multiple different packages, and the multiple security inspection image data include first security inspection image data of multiple packages of known categories that are marked and second security inspection image data of at least one package of unknown category that is not marked.

[0128] The first training module 302 is used to input the plurality of security inspection image data into the initial category detection model for detection processing, so as to train the initial category detection model and obtain an intermediate category detection model capable of detecting a plurality of known categories and at least one unknown category.

[0129] The first acquisition module 301 is further used to acquire third security inspection image data whose marked unknown category is a newly added category, wherein the data volume of the third security inspection image data is smaller than the data volume of the first security inspection image data and smaller than the data volume of the second security inspection image data.

[0130] The fine-tuning module 303 is used to fine-tune the intermediate category detection model using the third security inspection image data to obtain a target category detection model, where the target category detection model can detect multiple known categories and the newly added category.

[0131] In one embodiment, the data processing device further includes a modification module 304. The modification module 304 is used to obtain an initial category detection model, wherein the initial category detection model includes a feature extraction network, a region candidate network, an interest domain pooling network, and a classification regression network; adjust the preset threshold of the region candidate network to reduce the preset threshold; when performing detection, use the initial detection frame image in the region candidate network whose score is greater than the adjusted preset threshold as a candidate frame image, wherein the candidate frame image includes a positive sample candidate frame image and a negative sample candidate frame image, wherein the negative sample candidate frame image includes a candidate frame image of an unknown category; add a classification layer of an unknown category to the classification regression network, and modify the classification categories of the classification regression network to known categories and unknown categories; use the adjusted and modified initial category detection model as the preset initial category detection model.

[0132] In one embodiment, the first training module 302 is used to input the multiple security inspection image data into the preset initial category detection model for detection processing, and obtain the item prediction categories included in the multiple security inspection image data and the classification features of the candidate frame images corresponding to the item prediction categories, wherein the item prediction categories include multiple known prediction categories and at least one unknown prediction category; perform loss processing according to the classification features of the candidate frame images corresponding to the item prediction categories and the classification features of the labeled detection frame images of known categories to obtain an overall loss value; update the network parameters of the preset initial category detection model according to the overall loss value until the preset conditions are met, stop training, and obtain an intermediate category detection model that can detect multiple known categories and at least one unknown category.

[0133] In one embodiment, a first loss processing is performed using the classification features of the candidate frame image of the known prediction category and the classification features of the labeled detection frame image of the known category to obtain a first loss value; a second loss processing is performed using contrastive learning on the classification features of the candidate frame image of the known prediction category and the classification features of the candidate frame image of at least one unknown prediction category, and the classification features of each candidate frame image of at least one unknown prediction category to obtain a second loss value; and an overall loss value is determined based on the first loss value and the second loss value.

[0134] In one embodiment, the data processing device further includes a first detection module, which is used to perform category detection processing on the security inspection image to be identified using a target category detection model to obtain the category of items included in the security inspection image to be identified.

[0135] like Figure 7As shown, an embodiment of the present application further provides a data processing device, which may include a second acquisition module 401 , a first detection module 402 , a correction module 403 , a second training module 404 and a second detection module 405 .

[0136] The second acquisition module 401 is used to acquire a second security inspection data set of a package, where the second security inspection data set includes security inspection image data of different packages.

[0137] The first detection module 402 is used to perform category detection processing on each security inspection image data using a target category detection model to detect the category of items included in each security inspection image data. The target category detection model can detect item detection categories including multiple known categories and at least one newly added category.

[0138] The correction module 403 is used to perform category correction processing on the detected candidate security inspection image data including the newly added category to obtain target security inspection image data belonging to the newly added category.

[0139] The second training module 404 is used to use the target security inspection image data and the newly added category, as well as the original security inspection image data corresponding to each known category and each known category, as a third security inspection data set to perform model training to obtain a contraband detection model.

[0140] The second detection module 405 is used to detect the category of items included in the package in the security inspection image to be identified by using the prohibited items detection model to determine the package whose item category is prohibited items.

[0141] In one embodiment, the first detection module 402 is specifically used to perform feature extraction processing on each security inspection image data using a target category detection model to obtain each feature information corresponding to each security inspection image data; locate a candidate frame image in each security inspection image data based on each feature information, the candidate frame image including candidate frame images of multiple known categories and candidate frame images of newly added categories; determine detection feature information of the candidate frame image based on each feature information; determine the item category to which the candidate frame image belongs based on the detection feature information, the item category including multiple known categories and newly added categories.

[0142] In one embodiment, the correction module 403 is used to match the detected candidate security inspection image data including the newly added category and the annotated security inspection image data of the newly added category to obtain a matching result; when the matching result indicates that the candidate security inspection image data and the annotated security inspection image data do not match, the candidate security inspection image data is eliminated; when the matching result indicates that the candidate security inspection image and the annotated security inspection image data match, the candidate security inspection image data is retained to obtain the target security inspection image data belonging to the newly added category.

[0143] like Figure 8 As shown, an embodiment of the present application further provides a data processing device, which data processing device 500 may include a third acquisition module 501, a detection processing module 502, a loss processing module 503 and an update module 504.

[0144] The third acquisition module 501 is used to acquire a first security inspection data set of a package and a preset initial category detection model, wherein the first security inspection data set includes security inspection image data of multiple different packages, and the multiple security inspection image data include first security inspection image data of multiple packages of known categories that are marked and second security inspection image data of at least one package of unknown category that is not marked. The third acquisition module 501 and the first acquisition module can be the same module or different modules, but they implement the same function.

[0145] The detection processing module 502 is used to input the multiple security inspection image data into the preset initial category detection model for detection processing, and obtain the classification features of the item prediction categories and the candidate frame images corresponding to the item prediction categories included in the multiple security inspection image data, wherein the item prediction categories include multiple known prediction categories and at least one unknown prediction category.

[0146] The loss processing module 503 is used to perform loss processing according to the classification features of the candidate frame image corresponding to the predicted category of the object and the classification features of the labeled detection frame image of the known category to obtain an overall loss value.

[0147] The updating module 504 is used to update the network parameters of the preset initial category detection model according to the overall loss value until the preset conditions are met, stop training, and obtain an intermediate category detection model that can detect multiple known categories and at least one unknown category.

[0148] In one embodiment, Figure 6 and Figure 7 The data processing device shown can be integrated into a computer device. Accordingly, the data processing device includes Figure 6 The modules shown also include Figure 7 The modules shown in FIG. will not be described in detail here.

[0149] In one embodiment, Figure 6 and Figure 7 , Figure 8 The data processing device shown can be integrated into a computer device. Accordingly, the data processing device includes Figure 6 The modules shown also include Figure 7 and Figure 8 The modules shown in FIG. will not be described in detail here.

[0150] An embodiment of the present application also provides a computer device, which integrates any one of the data processing devices provided in the embodiments of the present application, and the computer device includes: one or more processors; a memory; and one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the processor in the steps of the data processing method described in any one of the above-mentioned data processing method embodiments.

[0151] For example, a first security inspection data set and a preset initial category detection model for a package are obtained, wherein the first security inspection data set includes security inspection image data of multiple different packages, and the multiple security inspection image data include first security inspection image data of packages of multiple known categories that are labeled and second security inspection image data of at least one package of unknown category that is not labeled; the preset initial category detection model is trained using the multiple security inspection image data to obtain an intermediate category detection model that can detect multiple known categories and at least one unknown category; third security inspection image data in which the labeled unknown category is a newly added category is obtained, and the data volume of the third security inspection image data is less than the data volume of the first security inspection image data, and less than the data volume of the second security inspection image data; the intermediate category detection model is fine-tuned using the third security inspection image data to obtain a target category detection model, and the target category detection model can detect multiple known categories and the newly added category; and / or,

[0152] Acquire a second security inspection data set of the package, wherein the second security inspection data set includes security inspection image data of different packages; perform category detection processing on each security inspection image data using a target category detection model to detect the category of items included in each security inspection image data, wherein the target category detection model can detect item detection categories including multiple known categories and at least one newly added category; perform category correction processing on the detected candidate security inspection image data including the newly added category to obtain target security inspection image data belonging to the newly added category; use the target security inspection image data and the newly added category, as well as the original security inspection image data corresponding to each known category and each known category, as a third security inspection data set to perform model training to obtain a contraband detection model; use the contraband detection model to detect the category of items included in the package of the security inspection image to be identified, to determine the package whose item category belongs to contraband; and / or,

[0153] Acquire a first security inspection data set of a package and a preset initial category detection model, wherein the first security inspection data set includes security inspection image data of multiple different packages, and the multiple security inspection image data include first security inspection image data of multiple packages of known categories that are marked and second security inspection image data of at least one package of unknown category that is not marked;

[0154] Inputting the plurality of security inspection image data into the preset initial category detection model for detection processing, obtaining the predicted item categories included in the plurality of security inspection image data and the classification features of the candidate frame images corresponding to the predicted item categories, wherein the predicted item categories include a plurality of known predicted categories and at least one unknown predicted category;

[0155] Performing loss processing according to the classification features of the candidate frame image corresponding to the predicted category of the object and the classification features of the labeled detection frame image of the known category to obtain an overall loss value;

[0156] The network parameters of the preset initial category detection model are updated according to the overall loss value until the preset conditions are met, and the training is stopped to obtain an intermediate category detection model that can detect multiple known categories and at least one unknown category.

[0157] Specifically, the steps of the data processing method in any embodiment can refer to the contents described above, and the beneficial effects that can be achieved can also refer to the contents described above, which will not be repeated here.

[0158] The present application also provides a computer device that integrates any data processing device provided in the present application. Fig. 9 As shown, it shows a schematic diagram of the structure of the computer device involved in the embodiment of the present application, specifically:

[0159] The computer device may include components such as a processor 601 with one or more processing cores, a memory 602 with one or more computer-readable storage media, a power supply 603, and an input unit 604. Those skilled in the art will appreciate that Fig. 9 The computer device structure shown in the figure does not constitute a limitation on the computer device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. Among them:

[0160] The processor 601 is the control center of the computer device. It uses various interfaces and lines to connect various parts of the entire computer device. By running or executing software programs and / or modules stored in the memory 602 and calling data stored in the memory 602, it executes various functions of the computer device and processes data, thereby monitoring the computer device as a whole. Optionally, the processor 601 may include one or more processing cores; preferably, the processor 601 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 601.

[0161] The memory 602 can be used to store software programs and modules. The processor 601 executes various functional applications and data processing by running the software programs and modules stored in the memory 602. The memory 602 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 602 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 602 may also include a memory controller to provide the processor 601 with access to the memory 602.

[0162] The computer device also includes a power supply 603 for supplying power to various components. Preferably, the power supply 603 can be logically connected to the processor 601 through a power management system, so as to manage charging, discharging, and power consumption through the power management system. The power supply 603 can also include any components such as one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, and power status indicators.

[0163] The computer device may further include an input unit 604, which may be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.

[0164] Although not shown, the computer device may further include a display unit, etc., which will not be described in detail herein. Specifically in this embodiment, the processor 601 in the computer device will load the executable files corresponding to the processes of one or more application programs into the memory 602 according to the following instructions, and the processor 601 will run the application programs stored in the memory 602, thereby realizing various functions, as follows:

[0165] For example, a first security inspection data set and a preset initial category detection model for a package are obtained, wherein the first security inspection data set includes security inspection image data of multiple different packages, and the multiple security inspection image data include first security inspection image data of packages of multiple known categories that are labeled and second security inspection image data of at least one package of unknown category that is not labeled; the preset initial category detection model is trained using the multiple security inspection image data to obtain an intermediate category detection model that can detect multiple known categories and at least one unknown category; third security inspection image data in which the labeled unknown category is a newly added category is obtained, and the data volume of the third security inspection image data is less than the data volume of the first security inspection image data, and less than the data volume of the second security inspection image data; the intermediate category detection model is fine-tuned using the third security inspection image data to obtain a target category detection model, and the target category detection model can detect multiple known categories and the newly added category; and / or,

[0166] Acquire a second security inspection data set of the package, wherein the second security inspection data set includes security inspection image data of different packages; perform category detection processing on each security inspection image data using a target category detection model to detect the category of items included in each security inspection image data, wherein the target category detection model can detect item detection categories including multiple known categories and at least one newly added category; perform category correction processing on the detected candidate security inspection image data including the newly added category to obtain target security inspection image data belonging to the newly added category; use the target security inspection image data and the newly added category, as well as the original security inspection image data corresponding to each known category and each known category, as a third security inspection data set to perform model training to obtain a contraband detection model; use the contraband detection model to detect the category of items included in the package of the security inspection image to be identified, to determine the package whose item category belongs to contraband; and / or,

[0167] Acquire a first security inspection data set of a package and a preset initial category detection model, wherein the first security inspection data set includes security inspection image data of multiple different packages, and the multiple security inspection image data include first security inspection image data of multiple packages of known categories that are marked and second security inspection image data of at least one package of unknown category that is not marked;

[0168] Inputting the plurality of security inspection image data into the preset initial category detection model for detection processing, obtaining the predicted item categories included in the plurality of security inspection image data and the classification features of the candidate frame images corresponding to the predicted item categories, wherein the predicted item categories include a plurality of known predicted categories and at least one unknown predicted category;

[0169] Performing loss processing according to the classification features of the candidate frame image corresponding to the predicted category of the object and the classification features of the labeled detection frame image of the known category to obtain an overall loss value;

[0170] The network parameters of the preset initial category detection model are updated according to the overall loss value until the preset conditions are met, and the training is stopped to obtain an intermediate category detection model that can detect multiple known categories and at least one unknown category.

[0171] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.

[0172] To this end, an embodiment of the present application provides a computer-readable storage medium, which may include: a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc. A computer program is stored thereon, and the computer program is loaded by a processor to execute the steps in any data processing method provided in the embodiment of the present application. For example, the computer program can be loaded by a processor to execute the following steps:

[0173] For example, a first security inspection data set and a preset initial category detection model for a package are obtained, wherein the first security inspection data set includes security inspection image data of multiple different packages, and the multiple security inspection image data include first security inspection image data of packages of multiple known categories that are labeled and second security inspection image data of at least one package of unknown category that is not labeled; the preset initial category detection model is trained using the multiple security inspection image data to obtain an intermediate category detection model that can detect multiple known categories and at least one unknown category; third security inspection image data in which the labeled unknown category is a newly added category is obtained, and the data volume of the third security inspection image data is less than the data volume of the first security inspection image data, and less than the data volume of the second security inspection image data; the intermediate category detection model is fine-tuned using the third security inspection image data to obtain a target category detection model, and the target category detection model can detect multiple known categories and the newly added category; and / or,

[0174] Acquire a second security inspection data set of the package, wherein the second security inspection data set includes security inspection image data of different packages; perform category detection processing on each security inspection image data using a target category detection model to detect the category of items included in each security inspection image data, wherein the target category detection model can detect item detection categories including multiple known categories and at least one newly added category; perform category correction processing on the detected candidate security inspection image data including the newly added category to obtain target security inspection image data belonging to the newly added category; use the target security inspection image data and the newly added category, as well as the original security inspection image data corresponding to each known category and each known category, as a third security inspection data set to perform model training to obtain a contraband detection model; use the contraband detection model to detect the category of items included in the package of the security inspection image to be identified, to determine the package whose item category belongs to contraband; and / or,

[0175] Acquire a first security inspection data set of a package and a preset initial category detection model, wherein the first security inspection data set includes security inspection image data of multiple different packages, and the multiple security inspection image data include first security inspection image data of multiple packages of known categories that are marked and second security inspection image data of at least one package of unknown category that is not marked;

[0176] Inputting the plurality of security inspection image data into the preset initial category detection model for detection processing, obtaining the predicted item categories included in the plurality of security inspection image data and the classification features of the candidate frame images corresponding to the predicted item categories, wherein the predicted item categories include a plurality of known predicted categories and at least one unknown predicted category;

[0177] Performing loss processing according to the classification features of the candidate frame image corresponding to the predicted category of the object and the classification features of the labeled detection frame image of the known category to obtain an overall loss value;

[0178] The network parameters of the preset initial category detection model are updated according to the overall loss value until the preset conditions are met, and the training is stopped to obtain an intermediate category detection model that can detect multiple known categories and at least one unknown category.

[0179] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the detailed description of other embodiments above, and will not be repeated here.

[0180] In specific implementation, the above units or structures can be implemented as independent entities, or can be arbitrarily combined to be implemented as the same or several entities. The specific implementation of the above units or structures can refer to the previous method embodiments, which will not be repeated here.

[0181] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.

[0182] The above is a detailed introduction to a data processing method, device, computer equipment and storage medium provided in the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A data processing method, characterized in that: include: Acquire a first security inspection data set of a package and a preset initial category detection model, wherein the first security inspection data set includes security inspection image data of multiple different packages, and the multiple security inspection image data include first security inspection image data of multiple packages of known categories that are marked and second security inspection image data of at least one package of unknown category that is not marked; Using the plurality of security inspection image data to train the preset initial category detection model, to obtain an intermediate category detection model capable of detecting a plurality of known categories and at least one unknown category; Acquire the third security inspection image data in which the unknown category is marked as a newly added category; The intermediate category detection model is fine-tuned using the third security inspection image data to obtain a target category detection model, where the target category detection model can detect multiple known categories and the newly added category.

2. The method according to claim 1, characterized in that The step of using the plurality of security inspection image data to train the preset initial category detection model to obtain an intermediate category detection model capable of detecting a plurality of known categories and at least one unknown category comprises: Inputting the plurality of security inspection image data into the preset initial category detection model for detection processing, obtaining the predicted item categories included in the plurality of security inspection image data and the classification features of the candidate frame images corresponding to the predicted item categories, wherein the predicted item categories include a plurality of known predicted categories and at least one unknown predicted category; Performing loss processing according to the classification features of the candidate frame image corresponding to the predicted category of the object and the classification features of the labeled detection frame image of the known category to obtain an overall loss value; The network parameters of the preset initial category detection model are updated according to the overall loss value until the preset conditions are met, and the training is stopped to obtain an intermediate category detection model that can detect multiple known categories and at least one unknown category.

3. A data processing method, characterized in that: include: Acquire a first security inspection data set of a package and a preset initial category detection model, wherein the first security inspection data set includes security inspection image data of multiple different packages, and the multiple security inspection image data include first security inspection image data of multiple packages of known categories that are marked and second security inspection image data of at least one package of unknown category that is not marked; Inputting the plurality of security inspection image data into the preset initial category detection model for detection processing, obtaining the predicted item categories included in the plurality of security inspection image data and the classification features of the candidate frame images corresponding to the predicted item categories, wherein the predicted item categories include a plurality of known predicted categories and at least one unknown predicted category; Performing loss processing according to the classification features of the candidate frame image corresponding to the predicted category of the object and the classification features of the labeled detection frame image of the known category to obtain an overall loss value; The network parameters of the preset initial category detection model are updated according to the overall loss value until the preset conditions are met, and the training is stopped to obtain an intermediate category detection model that can detect multiple known categories and at least one unknown category.

4. The method according to claim 1 or 3, characterized in that: The method further comprises: Acquire an initial category detection model, wherein the initial category detection model includes a region candidate network and a classification regression network; Adjusting a preset threshold of the candidate network in the region to lower the preset threshold; Adding a classification layer of unknown categories in the classification regression network, and modifying the classification categories of the classification regression network to known categories and unknown categories; The adjusted and modified initial category detection model is used as the preset initial category detection model.

5. The method according to claim 2 or 3, characterized in that: The classification features of the candidate frame images corresponding to the predicted item categories include classification features of the candidate frame images of known predicted categories and classification features of the candidate frame images of unknown predicted categories; The step of performing loss processing according to the classification features of the candidate frame image corresponding to the predicted category of the object and the classification features of the labeled detection frame image of the known category to obtain the overall loss value includes: Performing a first loss processing by using the classification features of the candidate frame image of the known prediction category and the classification features of the labeled detection frame image of the known category to obtain a first loss value; Performing a second loss processing on the classification features of the candidate frame images of the known prediction category, the classification features of the candidate frame images of the at least one unknown prediction category, and the classification features of each candidate frame image of the at least one unknown prediction category to obtain a second loss value; An overall loss value is determined according to the first loss value and the second loss value.

6. The method according to claim 5, characterized in that The step of performing a second loss processing on the classification features of the candidate frame images of the known prediction category and the classification features of the candidate frame images of at least one unknown prediction category, and the classification features of each candidate frame image of at least one unknown prediction category to obtain a second loss value includes: Enlarging the distance between features of a candidate frame image of a known prediction category and features of at least one candidate frame image of an unknown prediction category, to obtain a first contrast loss value between the known prediction category and the at least one unknown prediction category; Reduce the distance between the features of each candidate frame image of at least one unknown prediction category to obtain a second contrast loss value; A second loss value is determined according to the first contrast loss value and the second contrast loss value.

7. A data processing method, characterized in that: include: Acquire a second security inspection data set of the package, where the second security inspection data set includes security inspection image data of different packages; Performing category detection processing on each security inspection image data using a target category detection model to detect the category of items included in each security inspection image data, wherein the target category detection model can detect item detection categories including multiple known categories and at least one newly added category; Performing category correction processing on the detected candidate security inspection image data including the newly added category to obtain target security inspection image data belonging to the newly added category; The target security inspection image data and the newly added category, as well as the original security inspection image data and each known category corresponding to each known category, are used as a third security inspection data set to perform model training to obtain a contraband detection model; The prohibited goods detection model is used to detect the categories of items included in the package in the security inspection image to be identified, so as to determine the package whose item category is prohibited goods.

8. The method according to claim 7, characterized in that The step of performing category detection processing on each security inspection image data by using the target category detection model to detect the category of the items included in each security inspection image data includes: Using the target category detection model to perform feature extraction processing on each security inspection image data to obtain each feature information corresponding to each security inspection image data; Locating candidate frame images in each security inspection image data based on each feature information, wherein the candidate frame images include candidate frame images of multiple known categories and candidate frame images of newly added categories; Determine the detection feature information of the candidate frame image according to each feature information; The object category to which the candidate frame image belongs is determined according to the detection feature information, and the object category includes multiple known categories and newly added categories.

9. The method according to claim 7, characterized in that: The step of performing category correction processing on the detected candidate security inspection image data including the newly added category to obtain target security inspection image data belonging to the newly added category includes: Performing matching processing on the detected candidate security inspection image data including the newly added category and the marked security inspection image data of the newly added category to obtain a matching result; When the matching result indicates that the candidate security inspection image data and the annotated security inspection image data do not match, the candidate security inspection image data is eliminated; when the matching result indicates that the candidate security inspection image and the annotated security inspection image data match, the candidate security inspection image data is retained to obtain the target security inspection image data belonging to the newly added category.

10. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and the computer program is loaded by a processor to execute the steps in the data processing method according to any one of claims 1 to 7.

11. A computer device, characterized in that: The computer device includes: one or more processors; a memory; and one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the processor to implement the steps in the data processing method according to any one of claims 1 to 9.