Image detection model generation method, device, equipment and storage medium

By acquiring and processing the source and target domain sample images, identifying the identification tags and performing model training, the problem of low recognition accuracy caused by data distribution offset in pulsar detection is solved, and the accuracy and efficiency of the image detection model are improved.

CN116758323BActive Publication Date: 2024-11-12TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210210271.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-04
Publication Date
2024-11-12
Estimated Expiration
2042-03-04

AI Technical Summary

Technical Problem

The prior art is difficult to perform well in the identification of survey data during model training due to data distribution offset in pulsar detection, resulting in low accuracy in pulsar recognition.

Method used

By acquiring the source domain sample image and the target domain sample image, the first and second detection is performed using the image detection model, the identification tag of the label-free sample image is determined, and the model is trained in combination with the label information, reducing the time for manual labeling of data Cost, improve the training efficiency and accuracy of image detection models.

Benefits of technology

It improves the accuracy and efficiency of the image detection model, enhances the recognition ability of pulsar data, and reduces the need for manual labeling of data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116758323B_ABST
    Figure CN116758323B_ABST
Patent Text Reader

Abstract

This application discloses an image detection model generation method, apparatus, electronic device, and storage medium. The method employs machine learning for model generation, comprising: inputting source domain sample images and target domain sample images into a model to be trained for a first image detection; determining the recognition labels corresponding to unlabeled sample images in the target domain sample images based on the results of the first image detection; then inputting labeled sample images from the source domain sample images and target domain sample images into the model to be trained for a second image detection; and training the model based on the results of the second image detection, the results of the first image detection, the recognition labels, the label information of the source domain sample images, and the label information of the labeled sample images, thereby obtaining an image detection model. This method can improve the accuracy of image detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to an image detection model generation method, device, equipment and storage medium. Background Art

[0002] At present, the technology for pulsar detection is mainly based on the screening of candidate features, and the model recognition ability is improved by combining different features. Therefore, the model training of the existing technology is based on supervised learning, but the existing technology does not take into account that the data partitioning strategy and different pulsar search equipment will cause the pulsar data distribution to shift, resulting in the use of a single pulsar public data set for model training. It is difficult to have a good performance in the subsequent recognition of survey data, resulting in low accuracy in the recognition of pulsars. Summary of the invention

[0003] The present application provides an image detection model generation method, apparatus, device and storage medium, which achieve the technical effect of improving the accuracy of image detection model training.

[0004] On the one hand, the present application provides a method for generating an image detection model, the method comprising:

[0005] Acquire a source domain sample image and a target domain sample image, wherein the source domain sample image is a sample image with label information, and the target domain sample image includes a labeled sample image with label information and an unlabeled sample image without label information;

[0006] Inputting a first sample image in the source domain sample image and the target domain sample image into the to-be-trained model for image detection, and obtaining a first image detection result corresponding to the first sample image and a second image detection result corresponding to the target domain sample image;

[0007] Determine an identification label corresponding to the unlabeled sample image based on the first image detection result and the second image detection result;

[0008] Inputting a second sample image in the source domain sample image and the label sample image into the to-be-trained model for image detection, and obtaining a third image detection result corresponding to the second sample image and a fourth image detection result corresponding to the label sample image;

[0009] Based on the label information corresponding to the source domain sample image, the first image detection result, the third image detection result, the label information corresponding to the labeled sample image, the identification label, the fourth image detection result and the image detection result corresponding to the unlabeled sample image in the second image detection result, the model to be trained is trained to obtain an image detection model.

[0010] On the other hand, the present application provides an image detection method, the method comprising:

[0011] Acquire the image to be detected;

[0012] The image to be detected is input into the image detection model obtained based on the image detection model generation method described above to perform image detection, so as to obtain the image detection result corresponding to the image to be detected.

[0013] On the other hand, a device for generating an image detection model is provided, the device comprising:

[0014] A sample image acquisition module is used to acquire a source domain sample image and a target domain sample image, wherein the source domain sample image is a sample image with label information, and the target domain sample image includes a labeled sample image with label information and an unlabeled sample image without label information;

[0015] A first image detection module, used for inputting a first sample image in the source domain sample image and the target domain sample image into the to-be-trained model for image detection, and obtaining a first image detection result corresponding to the first sample image and a second image detection result corresponding to the target domain sample image;

[0016] An identification label determination module, used to determine an identification label corresponding to the unlabeled sample image based on the first image detection result and the second image detection result;

[0017] A second image detection module is used to input the second sample image in the source domain sample image and the label sample image into the to-be-trained model for image detection, and obtain a third image detection result corresponding to the second sample image and a fourth image detection result corresponding to the label sample image;

[0018] A model training module is used to perform model training on the model to be trained based on the label information corresponding to the source domain sample image, the first image detection result, the third image detection result, the label information corresponding to the labeled sample image, the identification label, the fourth image detection result and the image detection result corresponding to the unlabeled sample image in the second image detection result to obtain an image detection model.

[0019] On the other hand, a device for generating an image detection model is provided, the device comprising:

[0020] An image acquisition module to be detected is used to acquire the image to be detected;

[0021] The image detection module is used to input the image to be detected into the image detection model obtained based on the above-mentioned image detection model generation method to perform image detection and obtain the image detection result corresponding to the image to be detected.

[0022] On the other hand, an electronic device is provided, which includes a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by the processor to implement an image detection model generation method as described above or an image detection method as described above.

[0023] On the other hand, a computer-readable storage medium is provided, which includes a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by the processor to implement an image detection model generation method as described above or an image detection method as described above.

[0024] On the other hand, a computer program product is provided, including a computer program, which, when executed by a processor, implements the above-mentioned image detection model generation method or the above-mentioned image detection method.

[0025] The image detection model generation method, device, equipment and storage medium provided by the present application can: input the source domain sample image and the target domain sample image into the model to be trained for the first image detection, and determine the identification label corresponding to the unlabeled sample image in the target domain sample image according to the result of the first image detection, and then input the source domain sample image and the labeled sample image in the target domain sample image into the model to be trained for the second image detection, and according to the result of the second image detection, the result of the first image detection, the identification label, the label information of the source domain sample image and the label information of the labeled sample image, the model to be trained is trained to obtain the image detection model. This method can reduce the time cost of manually annotating data, improve the efficiency of image detection model training, and improve the accuracy of image detection. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0027] Figure 1A schematic diagram of an application scenario of an image detection model generation method provided in an embodiment of the present application;

[0028] Figure 2 A flowchart of a method for generating an image detection model provided in an embodiment of the present application;

[0029] Figure 3 A time-phase distribution diagram and a frequency-phase distribution diagram of a pulsar candidate in an image detection model generation method provided in an embodiment of the present application;

[0030] Figure 4 A schematic diagram of a pulsar candidate signal without label information in an image detection model generation method provided in an embodiment of the present application;

[0031] Figure 5 A flowchart for determining an identification label in a method for generating an image detection model provided in an embodiment of the present application;

[0032] Figure 6 A flowchart of processing label distribution data corresponding to an unlabeled sample image in an image detection model generation method provided in an embodiment of the present application;

[0033] Figure 7 A flowchart of performing model training based on source domain loss data and target domain loss data in an image detection model generation method provided in an embodiment of the present application;

[0034] Figure 8 A flowchart of model training based on source domain loss data, target domain loss data and image enhancement loss data in an image detection model generation method provided in an embodiment of the present application;

[0035] Fig. 9 A schematic diagram of a PICS model architecture in an image detection model generation method provided in an embodiment of the present application;

[0036] Fig.10 A schematic diagram of a PICS-ResNet model architecture in an image detection model generation method provided in an embodiment of the present application;

[0037] Fig.11 A schematic diagram of a model structure when an image detection model generation method provided in an embodiment of the present application is applied to pulsar detection;

[0038] Fig.12 A schematic diagram of the structure of an image detection model generation device provided in an embodiment of the present application;

[0039] Fig.13 A schematic diagram of the hardware structure of a device provided in an embodiment of the present application for implementing the method provided in an embodiment of the present application. DETAILED DESCRIPTION

[0040] To make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.

[0041] In the description of the present application, it should be understood that the terms "first" and "second" are used only for descriptive purposes and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. Moreover, the terms "first", "second", etc. are applicable to distinguishing similar objects, and need not be used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein.

[0042] It is understandable that in the specific implementation of this application, related data such as user information is involved. When the above embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.

[0043] First, the terms involved in the embodiments are defined.

[0044] PICS: Pulsar Image-based Classification System, a classification system based on pulsar images, is a pulsar detection model that integrates support vector machine (SVM), artificial neural network (ANN), convolutional neural network (CNN), logistic regression, etc., and uses image pattern recognition methods to verify the authenticity of pulsar candidates.

[0045] FAST: Five-hundred-meter Aperture Spherical Radio Telescope. FAST conducts sky surveys in a drift-scanning manner, receiving weak signals from hundreds of millions or even billions of light years away. Through signal preprocessing, it can generate tens of millions of pulsar candidates every day, obtain the FAST survey data set, and search for pulsar signals from the FAST survey data set.

[0046] ResNet: The residual network is a convolutional neural network proposed by four scholars from Microsoft Research. The residual network is easy to optimize and can improve accuracy by increasing the depth. The residual block inside it uses skip connections to alleviate the gradient vanishing problem caused by increasing the depth in the deep neural network.

[0047] See also Figure 1 , which shows a schematic diagram of an application scenario of an image detection model generation method provided by an embodiment of the present application, wherein the application scenario includes a client 110 and a server 120, wherein the client 110 is used to collect source domain sample images and target domain sample images, and after obtaining the source domain sample images and the target domain sample images from the client 110, the server 120 inputs the source domain sample images and the target domain sample images into the model to be trained for the first image detection, and determines the identification label corresponding to the unlabeled sample image in the target domain sample image according to the result of the first image detection. The server 120 inputs the labeled sample images in the source domain sample images and the target domain sample images into the model to be trained for the second image detection, and performs model training on the model to be trained according to the result of the second image detection, the result of the first image detection, the identification label, the label information of the source domain sample images, and the label information of the labeled sample images to obtain an image detection model.

[0048] In the embodiment of the present application, the client 110 includes but is not limited to mobile phones, computers, intelligent voice interaction devices, smart home appliances, vehicle terminals, aircraft, processors of astronomical radio telescopes, etc.

[0049] In the embodiment of the present application, the server adopts a machine learning method when performing model training. Machine Learning (ML) is a multi-disciplinary interdisciplinary subject involving probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory and other disciplines. It specializes in how computers simulate or implement human learning behavior to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental way to make computers intelligent. Its applications are spread across all fields of artificial intelligence. Machine learning and deep learning generally include artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and learning by teaching.

[0050] Artificial intelligence technology is a comprehensive discipline that covers a wide range of fields, including both hardware-level and software-level technologies. The basic technologies of artificial intelligence generally include sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics and other technologies. Artificial intelligence software technology mainly includes computer vision technology, speech processing technology, natural language processing technology, and machine learning / deep learning.

[0051] See also Figure 2 , which shows a method for generating an image detection model, which can be applied to the server side, and the method includes:

[0052] S210. Obtain a source domain sample image and a target domain sample image, the source domain sample image is a sample image with label information, and the target domain sample image includes a labeled sample image with label information and an unlabeled sample image without label information;

[0053] In some embodiments, the source domain sample images and the target domain sample images may be training data sets with similar data distribution. All sample images in the source domain sample images have label information, and some sample images in the target domain sample images have label information, while some sample images do not have label information. The number of target domain sample images without label information is greater than the number of target domain sample images with label information.

[0054] For example, when training a pulsar detection model, the time-phase distribution diagram and frequency-phase distribution diagram that exist in both the pulsar candidate signal and the pulsar signal can be used as the source domain sample image and the target domain sample image, such as Figure 3 Shown are the time-phase distribution and frequency-phase distribution in a pulsar candidate.

[0055] The source domain sample images may include the time-phase distribution diagram and frequency-phase distribution diagram in the pulsar annotation dataset. The pulsar annotation dataset is a collection of data determined to be pulsar signals. The target domain sample images may include the time-phase distribution diagram and frequency-phase distribution diagram in the survey dataset. Only part of the data in the survey dataset is annotated as pulsar signals, and the other part is pulsar candidate body signals. Figure 4 Shown is a schematic diagram of the signal of a pulsar candidate without label information.

[0056] In some embodiments, acquiring the source domain sample image and the target domain sample image further includes:

[0057] Obtaining an initial source domain sample image and an initial target domain sample image;

[0058] Image enhancement processing is performed on the initial source domain sample image and the initial target domain sample image to obtain a source domain sample image and a target domain sample image.

[0059] In some embodiments, an initial source domain sample image and an initial target domain sample image are obtained, and image enhancement processing is performed on the initial source domain sample image and the initial target domain sample image to obtain a source domain sample image and a target domain sample image. The image enhancement processing may be performed by flipping, cropping, etc., to obtain a source domain sample image having image difference information with the initial source domain sample image, and to obtain a target domain sample image having image difference information with the initial target domain sample image.

[0060] Image enhancement processing can increase the model generalization ability of the image detection model, thereby improving the effectiveness of the image detection model in image detection.

[0061] S220. Inputting the first sample image in the source domain sample image and the target domain sample image into the to-be-trained model for image detection, and obtaining a first image detection result corresponding to the first sample image and a second image detection result corresponding to the target domain sample image;

[0062] In some embodiments, a first sample image in the source domain sample image and a target domain sample image are input into the model to be trained for image detection, and a first image detection result corresponding to the first sample image and a second image detection result corresponding to the target domain sample image can be obtained. When the image detection executable by the model to be trained is to identify the target object in the image, the first image detection result is used to represent the recognition result of the target object in the first sample image, and the second image detection result is used to represent the recognition result of the target object in the target domain sample image.

[0063] In some embodiments, model training may include multiple rounds of model training, and in each round of model training, a first preset number of sample images may be obtained from the two image sets of source domain sample images and target domain sample images until all target domain sample images are trained. The first preset number of sample images in each round of model training that belong to the source domain sample images are the first sample images, wherein the first sample images may also be all the source domain sample images.

[0064] For example, when the image detection that can be performed by the model to be trained is to identify pulsars, the pulsar is the target object, and both the source domain sample image and the target domain sample image include a time-phase distribution map and a frequency-phase distribution map. In each round of model training, a total of Na sample images are selected from the source domain sample image and the target domain sample image, wherein each sample image includes two features of the same size of [64,64]. The two features correspond to the time-phase distribution map and the frequency-phase distribution map, respectively. The two features in the Na sample images are concatenated to generate data of [2,64,64], which is input into the feature processing layer in the model to be trained to generate feature embedding information of a size of [Na,512]. The feature embedding information is input into the feature classification layer in the model to be trained to obtain a first image detection result of a size of [Na,2] and a second image detection result of a size of [Na,2]. The first image detection result is used to represent the recognition result of the pulsar in the first sample image, and the second image detection result is used to represent the recognition result of the pulsar in the target domain sample image.

[0065] S230. Determine an identification label corresponding to the unlabeled sample image based on the first image detection result and the second image detection result;

[0066] In some embodiments, the second image detection result includes the detection result corresponding to the labeled sample image and the detection result corresponding to the unlabeled sample image. The first image detection result is all the detection results corresponding to the source domain sample image with label information. Therefore, the label distribution data corresponding to the second image detection result can be mapped according to the label distribution data corresponding to the first image detection result, so as to determine the label distribution data corresponding to the unlabeled sample image. According to the label distribution data corresponding to the unlabeled sample image, the identification label corresponding to the unlabeled sample image can be obtained, and the identification label is a pseudo label.

[0067] In some embodiments, see Figure 5 , based on the first image detection result and the second image detection result, determining the identification label corresponding to the unlabeled sample image includes:

[0068] S510. Based on the first image detection result and the second image detection result, determine label distribution alignment information between the first image detection result and the second image detection result;

[0069] S520. Based on the label distribution alignment information, data processing is performed on the second image detection result to obtain target label distribution data corresponding to the target domain sample image;

[0070] S530. Determine the identification label based on the label distribution data corresponding to the unlabeled sample image in the target label distribution data.

[0071] In some embodiments, based on the first image detection result and the second image detection result, label distribution alignment information between the first image detection result and the second image detection result can be determined. The label distribution alignment information can be used to indicate the degree of distribution difference between the label distribution data corresponding to the target domain sample image and the label distribution data corresponding to the source domain sample image. The data obtained by dividing the second image detection result by the first image detection result can be used as the label distribution alignment information. Based on the label distribution alignment information, the second image detection result is data processed to obtain the target label distribution data corresponding to the target domain sample image, so that the label distribution data corresponding to the source domain sample image and the target label distribution data can be matched. The second image detection result after data processing can be normalized to obtain the target label distribution data. An identification label is generated for the unlabeled sample image, and the identification label can be determined based on the label distribution data corresponding to the unlabeled sample image in the target label distribution data.

[0072] In some embodiments, the formula for generating target label distribution data is as follows:

[0073]

[0074] in, represents the target label distribution data, normaize is the normalization function, y target Represents the second image detection result, y source represents the first image detection result, Represents label distribution alignment information.

[0075] By aligning the label distribution information, the data offset between the source domain sample image and the target domain sample image is avoided, so that the label distribution data corresponding to the target domain sample image matches the label distribution data corresponding to the source domain sample image, so that the target label distribution data can be approximated by the label distribution data corresponding to the source domain sample image, thereby improving the accuracy of the recognition label.

[0076] In some embodiments, see Figure 6 , based on the label distribution data corresponding to the unlabeled sample image in the target label distribution data, determining the identification label includes:

[0077] S610. Obtain target probability information from label distribution data corresponding to the unlabeled sample image;

[0078] S620. Using the image category corresponding to the target probability information as an identification label;

[0079] or;

[0080] S630. Use the label distribution data corresponding to the unlabeled sample image as the identification label.

[0081] In some embodiments, the label distribution data corresponding to the unlabeled sample image is the probability expectation information corresponding to each image category when the unlabeled sample image is classified into different image categories. The target probability information can be obtained from the label distribution data corresponding to the unlabeled sample image. The target probability information is the maximum value among the probability expectation information corresponding to each image category. Therefore, the image category corresponding to the maximum value is the identification label. As shown in the following formula:

[0082]

[0083] Among them, arg max is the function of taking the maximum value, To identify the tag, Represents the target label distribution data. The identification label determined by the target probability information only includes the image category corresponding to the target probability information, and there is no noise data corresponding to other image categories. For example, in the case of binary classification, the label distribution data corresponding to a certain unlabeled sample image is [0.3, 0.7]. Therefore, 0.7 is the target probability information, and the image category corresponding to 0.7 is the identification label, which can be expressed as [0, 1].

[0084] In some embodiments, the label distribution data corresponding to the unlabeled sample image can be directly used as the identification label. In this case, the label distribution data corresponding to the unlabeled sample image includes not only the target probability information, but also the probability expectation information corresponding to other image categories. Therefore, the obtained identification label includes not only the image category corresponding to the target probability information, but also the noise data corresponding to other image categories. For example, in the case of binary classification, the label distribution data corresponding to a certain unlabeled sample image is [0.3, 0.7]. When the label distribution data corresponding to the unlabeled sample image is directly used as the identification label, the identification label can be expressed as [0.3, 0.7].

[0085] The identification labels determined by the target probability information can simplify the calculation of model training, while the identification labels determined by the label distribution data corresponding to the unlabeled sample images can reduce the impact of noise data on the model parameter update and utilize all the information of the label distribution data corresponding to the unlabeled sample images, thereby improving the effectiveness of the identification labels.

[0086] S240. Input the second sample image and the label sample image in the source domain sample image into the to-be-trained model for image detection, and obtain a third image detection result corresponding to the second sample image and a fourth image detection result corresponding to the label sample image;

[0087] In some embodiments, the second sample image and the label sample image in the source domain sample image are input into the model to be trained for image detection, and a third image detection result corresponding to the second sample image and a fourth image detection result corresponding to the label sample image can be obtained. When the image detection executable by the model to be trained is to identify the target object in the image, the third image detection result is used to represent the recognition result of the target object in the second sample image, and the fourth image detection result is used to represent the recognition result of the target object in the label sample image.

[0088] In some embodiments, model training may include multiple rounds of model training, and in each round of model training, a second preset number of sample images may be obtained from the two image sets of source domain sample images and label sample images until all sample images are trained. The part of the second preset number of sample images in each round of model training that belongs to the source domain sample image is the second sample image, wherein the second sample image may also be all the source domain sample images, so the second sample image and the first sample image may be reused. When the second sample image and the label sample image in the source domain sample image are input into the model to be trained, the parameters in the BN layer (batch normalization layer) and the dropout layer (feature discarding layer) in the model to be trained may be fixed, so that the parameters in the two layers of the model to be trained when the data is input for the second time are consistent with the parameters in the two layers of the model to be trained when the data is input for the first time, so as to avoid the reuse of the source domain sample image causing the model to be trained to be biased towards the source domain sample image.

[0089] For example, when the image detection that can be performed by the model to be trained is to identify pulsars, the pulsar is the target object, and both the source domain sample image and the target domain sample image include a time-phase distribution map and a frequency-phase distribution map. In each round of model training, a total of Ns sample images are selected from the source domain sample image and the label sample image, wherein each sample image includes two features of the same size of [64,64]. The two features correspond to the time-phase distribution map and the frequency-phase distribution map, respectively. The two features in the Ns sample images are concatenated to generate data of [2,64,64], which is input into the feature processing layer in the model to be trained to generate feature embedding information of a size of [Ns,512]. The feature embedding information is input into the feature classification layer in the model to be trained to obtain a third image detection result of a size of [Ns,2] and a fourth image detection result of a size of [Ns,2]. The third image detection result is used to represent the recognition result of the pulsar in the second sample image, and the fourth image detection result is used to represent the recognition result of the pulsar in the label sample image.

[0090] S250. Based on the label information corresponding to the source domain sample image, the first image detection result, the third image detection result, the label information corresponding to the labeled sample image, the identification label, the fourth image detection result, and the image detection result corresponding to the unlabeled sample image in the second image detection result, the model to be trained is trained to obtain an image detection model.

[0091] In some embodiments, loss data is determined once for the label information and detection results of the sample image input into the model to be trained for the first time, and loss data is determined once for the label information and detection results of the sample image input into the model to be trained for the second time. The model to be trained can be trained using the loss data determined twice to obtain an image detection model.

[0092] In some embodiments, see Figure 7 Based on the label information corresponding to the source domain sample image, the first image detection result, the third image detection result, the label information corresponding to the label sample image, the identification label, the fourth image detection result, and the image detection result corresponding to the unlabeled sample image in the second image detection result, the model to be trained is trained to obtain an image detection model including:

[0093] S710. Generate source domain loss data based on the label information corresponding to the source domain sample image, the first image detection result and the third image detection result;

[0094] S720. Generate target domain loss data based on the label information corresponding to the labeled sample image, the identification label, the fourth image detection result, and the image detection result corresponding to the unlabeled sample image in the second image detection result;

[0095] S730. Based on the source domain loss data and the target domain loss data, the model to be trained is trained to obtain an image detection model.

[0096] In some embodiments, the first image detection result and the third image detection result are both detection results corresponding to the source domain sample image. Therefore, based on the difference information between the label information corresponding to the source domain sample image and the first image detection result, and the difference information between the label information corresponding to the source domain sample image and the third image detection result, source domain loss data can be generated. The source domain loss data can be cross entropy loss data. As shown in the following formula:

[0097]

[0098] Among them, L source (θ) represents the source domain loss data, y ij Represents the label information corresponding to the source domain sample image, q ij Indicates the first image detection result or the third image detection result.

[0099] Based on the difference information between the label information corresponding to the labeled sample image and the fourth image detection result, and the difference information between the identification label and the image detection result corresponding to the unlabeled sample image in the second image detection result, the target domain loss data is generated. The target domain loss data may be cross entropy loss data, wherein the formula for calculating the cross entropy loss data based on the difference information between the label information corresponding to the labeled sample image and the fourth image detection result is consistent with that for calculating the source domain loss data. The difference information between the image detection results corresponding to the unlabeled sample image in the identification label and the second image detection result is as shown in the following formula:

[0100]

[0101] Among them, L target (θ) represents the target domain loss data, pseudo ij Indicates the identification tag, p ij It represents the image detection result corresponding to the unlabeled sample image in the second image detection result, and detach represents a function that does not perform back propagation.

[0102] Based on the preset hyperparameters, the source domain loss data can be processed, and then the processed source domain loss data and the target domain loss data can be added to obtain the first target loss data. Based on the first target loss data, the model parameters in the training model can be updated to obtain the image detection model. The hyperparameters can be multiplied with the source domain loss data to obtain the processed source domain loss data. The hyperparameters are used to control the influence of the source domain sample image on the first target loss data. As shown in the following formula:

[0103] L total (θ)=λL source +L target (Formula 5)

[0104] Among them, L total (θ) represents the first target loss data, λ represents the hyperparameter, L source represents the source domain loss data, L target Represents the target domain loss data.

[0105] By training the model to be trained through the source domain loss data and the target domain loss data, the model to be trained can learn the cross-features of the source domain sample images and the target domain sample images, thereby improving the recall rate of the image detection model and reducing the false alarm rate of the image detection model, thereby improving the accuracy of image detection. In addition, by setting hyperparameters, the influence of the source domain sample images on the loss function can be controlled to avoid the prediction results of the image detection model being biased towards the source domain sample images.

[0106] In some embodiments, based on the source domain loss data and the target domain loss data, the model to be trained is trained to obtain the image detection model, including:

[0107] Back-propagation is performed on the loss data corresponding to the labeled sample images in the source domain loss data and the target domain loss data to obtain parameter update information;

[0108] Based on the parameter update information and the loss data corresponding to the unlabeled sample images in the target domain loss data, the model parameters of the model to be trained are updated to obtain an image detection model.

[0109] In some embodiments, the loss data corresponding to the unlabeled sample images are not back-propagated, and only the loss data corresponding to the labeled sample images in the source domain loss data and the target domain loss data are back-propagated, but the loss data corresponding to the unlabeled sample images need to participate in the parameter update of the training model. That is to say, when the partial derivatives of the source domain loss data and the target domain loss data are calculated, the partial derivatives of the loss data corresponding to the unlabeled sample images are not calculated, and only the partial derivatives of the loss data corresponding to the labeled sample images in the source domain loss data and the target domain loss data are calculated to obtain the gradient update information, which is the parameter update information.

[0110] Based on the parameter update information and the loss data corresponding to the unlabeled sample images in the target domain loss data, the model parameters of the model to be trained are updated to obtain an image detection model.

[0111] In some embodiments, as described in the above formula, a detach function can be used to cut off the back propagation of the loss data corresponding to the unlabeled sample image, so that the loss data corresponding to the unlabeled sample image does not participate in the gradient update.

[0112] During model training, since the recognition label is the result of semi-supervised adaptive domain training and its authenticity cannot be guaranteed, the loss data corresponding to the unlabeled sample image can be not reversely transmitted, so that the loss data corresponding to the unlabeled sample image is only used as enhanced information of the loss data, thereby avoiding problems caused by errors in the recognition label during model training.

[0113] In some embodiments, see Figure 8 Based on the label information corresponding to the source domain sample image, the first image detection result, the third image detection result, the label information corresponding to the label sample image, the identification label, the fourth image detection result, and the image detection result corresponding to the unlabeled sample image in the second image detection result, the model to be trained is trained to obtain an image detection model including:

[0114] S810. Obtaining an initial source domain sample image, an initial target domain sample image, a source domain sample image, and a target domain sample image;

[0115] S820. Obtain image enhancement loss data based on image difference information between the initial source domain sample image and the source domain sample image before and after image enhancement, and image difference information between the initial target domain sample image and the target domain sample image before and after image enhancement;

[0116] S830. Generate source domain loss data based on the label information corresponding to the source domain sample image, the first image detection result, and the third image detection result;

[0117] S840. Generate target domain loss data based on the label information corresponding to the labeled sample image, the identification label, the fourth image detection result, and the image detection result corresponding to the unlabeled sample image in the second image detection result;

[0118] S850. Based on the source domain loss data, the target domain loss data and the image enhancement loss data, the model to be trained is trained to obtain an image detection model.

[0119] In some embodiments, when the initial source domain sample image is enhanced to obtain the source domain sample image, and the initial target domain sample image is enhanced to obtain the target domain sample image, image enhancement loss data can be obtained based on the image difference information between the initial source domain sample image and the source domain sample image before and after image enhancement, and the image difference information between the initial target domain sample image and the target domain sample image before and after image enhancement, so that the feature embedding information output by the feature processing layer of the model to be trained is similar before and after image enhancement. As shown in the following formula:

[0120]

[0121] Among them, L con (θ) is the image enhancement loss data, x represents the source domain sample image and the target domain sample image obtained after image enhancement, and x' represents the initial source domain sample image and the initial target domain sample image before image enhancement.

[0122] The source domain loss data can be determined based on Formula 3, and the target domain loss data can be determined based on Formula 4. The source domain loss data can be processed based on the preset hyperparameters, and the processed source domain loss data, target domain loss data and image enhancement loss data can be added to obtain the second target loss data. Based on the second target loss data, the model parameters in the training model can be updated to obtain the image detection model. The hyperparameters can be multiplied with the source domain loss data to obtain the processed source domain loss data. The hyperparameters are used to control the influence of the source domain sample image on the second target loss data. As shown in the following formula:

[0123] L' total (θ)=λLsource +L target +L con (Formula 7)

[0124] Among them, L' total (θ) represents the second objective loss data, λ represents the hyperparameter, L source represents the source domain loss data, L target represents the target domain loss data, L con Loss data for image enhancement.

[0125] Adding image enhancement loss data to the source domain loss data and the target domain loss data can ensure that the trained model can generate similar feature embeddings for the source domain sample images and the target domain sample images before and after enhancement, thereby improving the generalization of the image detection model.

[0126] In some embodiments, an image detection method is also proposed, the method comprising:

[0127] Acquire the image to be detected;

[0128] The image to be detected is input into the image detection model obtained based on the above-mentioned image detection model generation method to perform image detection, and an image detection result corresponding to the image to be detected is obtained.

[0129] In some embodiments, when the object detected by the image is a pulsar, see Fig. 9 ,like Fig. 9 The schematic diagram of the PICS model architecture is shown as follows: Fig.10 The figure shows a schematic diagram of the PICS-ResNet model architecture. If the model to be trained in the method for generating the image detection model is a CNN model, the obtained image detection model can be used to replace the CNN network in the PICS model architecture to obtain a target PICS model. After obtaining the pulsar image to be detected, the pulsar image can be input into the target PICS model for image detection to obtain an image detection result corresponding to the pulsar image to be detected.

[0130] If the model to be trained in the method for generating the image detection model is a ResNet model, the obtained image detection model can be used to replace the -ResNet network in the PICS-ResNet model architecture to obtain a target PICS-ResNet model. After obtaining the pulsar image to be detected, the pulsar image can be input into the target PICS-ResNet model for image detection to obtain an image detection result corresponding to the pulsar image to be detected.

[0131] The model obtained by the above-mentioned image detection model generation method has learned the cross-features of the source domain sample images and the target domain sample images. When applied, it can generate better feature embedding information and then perform downstream classification tasks, thereby improving the accuracy of image detection.

[0132] In some embodiments, the model structure of the image detection model generation method when applied to pulsar detection is as follows: Fig.11 As shown, the initial source domain sample images are the time-phase distribution diagram and frequency-phase distribution diagram in the PICS public data set, the initial target domain sample images are the time-phase distribution diagram and frequency-phase distribution diagram in the FAST survey data set, and the backbone network can be a ResNet18 model, a CNN model, or other models that can be used for image detection and classification. Image enhancement is performed on the initial source domain sample images and the initial target domain sample images to obtain source domain sample images and target domain sample images, and the target domain sample images include labeled sample images and unlabeled sample images.

[0133] The backbone network will have two inputs. The first time, the first sample image in the source domain sample image and the target domain sample image are input into the backbone network for image detection, and the first image detection result corresponding to the first sample image and the second image detection result corresponding to the target domain sample image are obtained. After aligning the first image detection result and the second image detection result, the target label distribution data corresponding to the target domain sample image is determined, and based on the target label distribution data, the identification label corresponding to the unlabeled sample image is generated.

[0134] The second sample image and the labeled sample image in the source domain sample image are input into the backbone network for image detection for the second time, and the parameters of the BN layer and the dropout layer in the backbone network are fixed in the image detection to obtain the third image detection result corresponding to the second sample image and the fourth image detection result corresponding to the labeled sample image.

[0135] Image enhancement loss data can be obtained based on image difference information between the initial source domain sample image and the source domain sample image before and after image enhancement, as well as image difference information between the initial target domain sample image and the target domain sample image before and after image enhancement.

[0136] Based on the label information corresponding to the source domain sample image, the first image detection result and the third image detection result, the source domain loss data is generated. Based on the label information corresponding to the labeled sample image, the identification label, the fourth image detection result and the image detection result corresponding to the unlabeled sample image in the second image detection result, the target domain loss data is generated. Based on the source domain loss data, the target domain loss data and the image enhancement loss data, the model to be trained is trained to obtain an image detection model. The image detection model can adaptively detect pulsar candidate signals.

[0137] The embodiment of the present application provides a method for generating an image detection model, which includes: inputting a source domain sample image and a target domain sample image into a model to be trained for a first image detection, and determining the identification label corresponding to the unlabeled sample image in the target domain sample image according to the result of the first image detection, and then inputting the source domain sample image and the labeled sample image in the target domain sample image into the model to be trained for a second image detection, and training the model to be trained according to the result of the second image detection, the result of the first image detection, the identification label, the label information of the source domain sample image and the label information of the labeled sample image to obtain an image detection model. This method can reduce the time cost of manually annotating data and improve the efficiency of image detection model training. And through semi-supervised domain adaptive pre-training, the cross-features of the source domain sample image and the target domain sample image are learned, so as to improve the accuracy of image detection.

[0138] The present application also provides an image detection model generation device, see Fig.12 , the device comprises:

[0139] The sample image acquisition module 1210 is used to acquire a source domain sample image and a target domain sample image, wherein the source domain sample image is a sample image with label information, and the target domain sample image includes a labeled sample image with label information and an unlabeled sample image without label information;

[0140] The first image detection module 1220 is used to input the first sample image in the source domain sample image and the target domain sample image into the to-be-trained model for image detection, and obtain a first image detection result corresponding to the first sample image and a second image detection result corresponding to the target domain sample image;

[0141] An identification label determination module 1230 is used to determine an identification label corresponding to the unlabeled sample image based on the first image detection result and the second image detection result;

[0142] The second image detection module 1240 is used to input the second sample image and the label sample image in the source domain sample image into the to-be-trained model for image detection, and obtain a third image detection result corresponding to the second sample image and a fourth image detection result corresponding to the label sample image;

[0143] The model training module 1250 is used to perform model training on the model to be trained based on the label information corresponding to the source domain sample image, the first image detection result, the third image detection result, the label information corresponding to the labeled sample image, the identification label, the fourth image detection result, and the image detection result corresponding to the unlabeled sample image in the second image detection result to obtain an image detection model.

[0144] In some embodiments, the identification tag determination module 1230 includes:

[0145] an alignment information determining unit, configured to determine label distribution alignment information between the first image detection result and the second image detection result based on the first image detection result and the second image detection result;

[0146] a label distribution determining unit, configured to perform data processing on the second image detection result based on the label distribution alignment information, to obtain target label distribution data corresponding to the target domain sample image;

[0147] The identification label determination unit is used to determine the identification label based on the label distribution data corresponding to the unlabeled sample image in the target label distribution data.

[0148] In some embodiments, the identification tag determining unit includes:

[0149] A target probability information acquisition unit, used to acquire target probability information from label distribution data corresponding to the unlabeled sample image;

[0150] A first identification label acquisition unit, configured to use the image category corresponding to the target probability information as an identification label;

[0151] or;

[0152] The second identification label acquisition unit is used to use the label distribution data corresponding to the unlabeled sample image as the identification label.

[0153] In some embodiments, the model training module 1250 includes:

[0154] A first source domain loss determination unit, configured to generate source domain loss data based on label information corresponding to the source domain sample image, the first image detection result, and the third image detection result;

[0155] A first target domain loss determination unit is used to generate target domain loss data based on label information corresponding to the labeled sample image, the identification label, the fourth image detection result, and the image detection result corresponding to the unlabeled sample image in the second image detection result;

[0156] The first model training unit is used to perform model training on the to-be-trained model based on the source domain loss data and the target domain loss data to obtain an image detection model.

[0157] In some embodiments, the first model training unit includes:

[0158] An update information acquisition unit, used to perform back-propagation processing on the loss data corresponding to the label sample image in the source domain loss data and the target domain loss data to obtain parameter update information;

[0159] The parameter updating unit is used to update the model parameters of the model to be trained based on the parameter updating information and the loss data corresponding to the unlabeled sample images in the target domain loss data to obtain the image detection model.

[0160] In some embodiments, the sample image acquisition module 1210 further includes:

[0161] An initial sample image acquisition unit, used to acquire an initial source domain sample image and an initial target domain sample image;

[0162] The sample image enhancement unit is used to perform image enhancement processing on the initial source domain sample image and the initial target domain sample image to obtain a source domain sample image and a target domain sample image.

[0163] In some embodiments, the model training module 1250 includes:

[0164] An image acquisition unit to be processed, used to acquire an initial source domain sample image, an initial target domain sample image, a source domain sample image, and a target domain sample image;

[0165] An image enhancement loss determination unit, used to obtain image enhancement loss data based on image difference information between an initial source domain sample image and the source domain sample image before and after image enhancement, and image difference information between an initial target domain sample image and the target domain sample image before and after image enhancement;

[0166] A second source domain loss determination unit, configured to generate source domain loss data based on label information corresponding to the source domain sample image, the first image detection result, and the third image detection result;

[0167] A second target domain loss determination unit is used to generate target domain loss data based on label information corresponding to the labeled sample image, the identification label, the fourth image detection result, and the image detection result corresponding to the unlabeled sample image in the second image detection result;

[0168] The second model training unit is used to perform model training on the to-be-trained model based on the source domain loss data, the target domain loss data and the image enhancement loss data to obtain an image detection model.

[0169] The present application also provides an image detection device, which includes:

[0170] An image acquisition module to be detected is used to acquire the image to be detected;

[0171] The image detection module is used to input the image to be detected into the image detection model obtained by the above-mentioned image detection model generation method to perform image detection and obtain the image detection result corresponding to the image to be detected.

[0172] The device provided in the above embodiment can execute the method provided in any embodiment of the present application, and has the corresponding functional modules and beneficial effects of executing the method. For technical details not described in detail in the above embodiment, please refer to the image detection model generation method provided in any embodiment of the present application.

[0173] This embodiment also provides a computer-readable storage medium, in which computer-executable instructions are stored. The computer-executable instructions are loaded by a processor and execute the above-mentioned image detection model generation method of this embodiment.

[0174] This embodiment also provides a computer program product or a computer program, which includes computer instructions stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the methods provided in various optional implementations of the above-mentioned image detection model generation.

[0175] This embodiment also provides an electronic device, which includes a processor and a memory, wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the image detection model generation method mentioned above in this embodiment.

[0176] The device may be a computer terminal, a mobile terminal or a server, and the device may also participate in constituting the apparatus or system provided in the embodiments of the present application. Fig.13 As shown, the server 13 may include one or more (1302a, 1302b, ..., 1302n are used to illustrate) processors 1302 (the processor 1302 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 1304 for storing data, and a transmission device 1306 for communication functions. In addition, it may also include: an input / output interface (I / O interface) and a network interface. It can be understood by those skilled in the art that Fig.13 The structure shown is only for illustration and does not limit the structure of the above electronic device. Fig.13 More or fewer components as shown, or with Fig.13 Different configurations shown.

[0177] It should be noted that the one or more processors 1302 and / or other data processing circuits described above may generally be referred to herein as "data processing circuits". The data processing circuits may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuits may be a single independent processing module, or may be incorporated in whole or in part into any of the other components in the server 13.

[0178] The memory 1304 can be used to store software programs and modules of application software, such as program instructions / data storage devices corresponding to the methods in the embodiments of the present application. The processor 1302 executes various functional applications and data processing by running the software programs and modules stored in the memory 1304, that is, to implement the above-mentioned method for generating a temporal behavior capture frame based on a self-attention network. The memory 1304 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 1304 may further include a memory remotely arranged relative to the processor 1302, and these remote memories may be connected to the server 13 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0179] The transmission device 1306 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the server 13. In one example, the transmission device 1306 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 1306 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0180] This specification provides method operation steps as described in the embodiments or flow charts, but more or fewer operation steps may be included based on conventional or non-creative labor. The steps and sequence listed in the embodiments are only one way of executing the sequence of many steps and do not represent the only execution sequence. When the actual system or interrupt product is executed, it can be executed in sequence or in parallel according to the method shown in the embodiments or the drawings (for example, in a parallel processor or multi-threaded processing environment).

[0181] The structure shown in this embodiment is only a partial structure related to the scheme of the present application, and does not constitute a limitation on the device to which the scheme of the present application is applied. The specific device may include more or fewer components than shown, or combine certain components, or have different arrangements of components. It should be understood that the method, device, etc. disclosed in this embodiment can be implemented in other ways. For example, the device embodiment described above is only schematic. For example, the division of the modules is only a division of a logical function. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or unit modules.

[0182] Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the whole or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., various media that can store program codes.

[0183] Those skilled in the art may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in this specification can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0184] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for generating an image detection model, characterized in that: The method comprises: Acquire a source domain sample image and a target domain sample image, wherein the source domain sample image is a sample image with label information, and the target domain sample image includes a labeled sample image with label information and an unlabeled sample image without label information; Inputting a first sample image in the source domain sample image and the target domain sample image into the to-be-trained model for image detection, and obtaining a first image detection result corresponding to the first sample image and a second image detection result corresponding to the target domain sample image; Determining label distribution alignment information between the first image detection result and the second image detection result based on the first image detection result and the second image detection result; Based on the label distribution alignment information, data processing is performed on the second image detection result to obtain target label distribution data corresponding to the target domain sample image; Determine, based on the label distribution data corresponding to the unlabeled sample image in the target label distribution data, an identification label corresponding to the unlabeled sample image; Inputting a second sample image in the source domain sample image and the label sample image into the to-be-trained model for image detection, and obtaining a third image detection result corresponding to the second sample image and a fourth image detection result corresponding to the label sample image; Generate source domain loss data based on label information corresponding to the source domain sample image, the first image detection result, and the third image detection result; Generate target domain loss data based on the label information corresponding to the labeled sample image, the identification label, the fourth image detection result, and the image detection result corresponding to the unlabeled sample image in the second image detection result; Based on the source domain loss data and the target domain loss data, model training is performed on the model to be trained to obtain an image detection model.

2. The image detection model generation method according to claim 1, characterized in that: The determining, based on the label distribution data corresponding to the unlabeled sample image in the target label distribution data, the identification label corresponding to the unlabeled sample image comprises: Obtaining target probability information from label distribution data corresponding to the unlabeled sample image; Using the image category corresponding to the target probability information as the identification label; or; The label distribution data corresponding to the unlabeled sample image is used as the identification label.

3. The image detection model generation method according to claim 1, characterized in that: The performing model training on the model to be trained based on the source domain loss data and the target domain loss data to obtain the image detection model comprises: Performing back-propagation processing on the loss data corresponding to the label sample image in the source domain loss data and the target domain loss data to obtain parameter update information; Based on the parameter update information and the loss data corresponding to the unlabeled sample image in the target domain loss data, the model parameters of the model to be trained are updated to obtain the image detection model.

4. The image detection model generation method according to claim 1, characterized in that: The acquiring of the source domain sample image and the target domain sample image further includes: Obtaining an initial source domain sample image and an initial target domain sample image; Image enhancement processing is performed on the initial source domain sample image and the initial target domain sample image to obtain the source domain sample image and the target domain sample image.

5. The image detection model generation method according to claim 4, characterized in that: The performing model training on the model to be trained based on the source domain loss data and the target domain loss data to obtain the image detection model comprises: Acquire the initial source domain sample image, the initial target domain sample image, the source domain sample image, and the target domain sample image; Obtaining image enhancement loss data based on image difference information between the initial source domain sample image and the source domain sample image before and after image enhancement, and image difference information between the initial target domain sample image and the target domain sample image before and after image enhancement; Based on the source domain loss data, the target domain loss data and the image enhancement loss data, model training is performed on the model to be trained to obtain the image detection model.

6. An image detection method, characterized in that: The method comprises: Acquire the image to be detected; The image to be detected is input into the image detection model obtained based on the image detection model generation method described in any one of claims 1 to 5 to perform image detection, so as to obtain an image detection result corresponding to the image to be detected.

7. An image detection model generation device, characterized in that: The device comprises: A sample image acquisition module is used to acquire a source domain sample image and a target domain sample image, wherein the source domain sample image is a sample image with label information, and the target domain sample image includes a labeled sample image with label information and an unlabeled sample image without label information; A first image detection module, used for inputting a first sample image in the source domain sample image and the target domain sample image into the to-be-trained model for image detection, and obtaining a first image detection result corresponding to the first sample image and a second image detection result corresponding to the target domain sample image; an alignment information determination module, configured to determine label distribution alignment information between the first image detection result and the second image detection result based on the first image detection result and the second image detection result; a label distribution determination module, configured to perform data processing on the second image detection result based on the label distribution alignment information to obtain target label distribution data corresponding to the target domain sample image; An identification label determination module, configured to determine an identification label corresponding to the unlabeled sample image based on label distribution data corresponding to the unlabeled sample image in the target label distribution data; A second image detection module is used to input the second sample image in the source domain sample image and the label sample image into the to-be-trained model for image detection, and obtain a third image detection result corresponding to the second sample image and a fourth image detection result corresponding to the label sample image; A first source domain loss determination module, configured to generate source domain loss data based on label information corresponding to the source domain sample image, the first image detection result, and the third image detection result; A first target domain loss determination module is used to generate target domain loss data based on the label information corresponding to the labeled sample image, the identification label, the fourth image detection result, and the image detection result corresponding to the unlabeled sample image in the second image detection result; The model training module is used to perform model training on the model to be trained based on the source domain loss data and the target domain loss data to obtain an image detection model.

8. The image detection model generation device according to claim 7, characterized in that: The identification tag determination module includes: A target probability information acquisition unit, used to acquire target probability information from label distribution data corresponding to the unlabeled sample image; A first identification label acquisition unit, configured to use the image category corresponding to the target probability information as the identification label; or; The second identification label acquisition unit is used to use the label distribution data corresponding to the unlabeled sample image as the identification label.

9. The image detection model generation device according to claim 7, characterized in that: The model training module includes: An update information acquisition unit, configured to perform back-propagation processing on the loss data corresponding to the label sample image in the source domain loss data and the target domain loss data to obtain parameter update information; A parameter updating unit is used to update the model parameters of the model to be trained based on the parameter update information and the loss data corresponding to the unlabeled sample image in the target domain loss data to obtain the image detection model.

10. The image detection model generation device according to claim 7, characterized in that: The sample image acquisition module also includes: An initial sample image acquisition unit, used to acquire an initial source domain sample image and an initial target domain sample image; The sample image enhancement unit is used to perform image enhancement processing on the initial source domain sample image and the initial target domain sample image to obtain the source domain sample image and the target domain sample image.

11. The image detection model generation device according to claim 10, characterized in that: The model training module also includes: a to-be-processed image acquisition unit, configured to acquire the initial source domain sample image, the initial target domain sample image, the source domain sample image, and the target domain sample image; an image enhancement loss determining unit, configured to obtain image enhancement loss data based on image difference information between the initial source domain sample image and the source domain sample image before and after image enhancement, and image difference information between the initial target domain sample image and the target domain sample image before and after image enhancement; A model training unit is used to perform model training on the model to be trained based on the source domain loss data, the target domain loss data and the image enhancement loss data to obtain the image detection model.

12. An image detection device, characterized in that: The device comprises: An image acquisition module to be detected is used to acquire the image to be detected; An image detection module is used to input the image to be detected into an image detection model obtained based on the image detection model generation method according to any one of claims 1 to 5 to perform image detection, and obtain an image detection result corresponding to the image to be detected.

13. An electronic device, characterized in that: The electronic device includes a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by the processor to implement an image detection model generation method as described in any one of claims 1 to 5 or an image detection method as described in claim 6.

14. A computer-readable storage medium, characterized in that: The storage medium includes a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by the processor to implement an image detection model generation method as described in any one of claims 1 to 5 or an image detection method as described in claim 6.

15. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, it implements an image detection model generation method described in any one of claims 1 to 5 or an image detection method described in claim 6.