A semi-supervised image instance segmentation method, system and medium
By performing data augmentation and cross-modal conversion on infrared images, combined with the self-attention encoding model and the diffusion generation model, high-precision annotation of unlabeled infrared images is achieved, solving the problems of low instance segmentation accuracy and poor model generalization of infrared images. problem, improving the segmentation accuracy and stability of infrared images of transmission line equipment.
Patent Information
- Application Number
- CN202410782431.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-18
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2044-06-18
AI Technical Summary
It is difficult to perform fully automatic and high-precision annotation of a large number of unlabeled infrared images with existing technology. In addition, the segmentation accuracy of infrared image instances is low, greatly affected by environmental conditions, and the model generalization is poor.
A semi-supervised image instance segmentation method is used to generate visible light images through data augmentation and cross-mode conversion of infrared images. The self-attention encoding model and diffusion generation model are combined to perform feature extraction and instance segmentation on infrared and visible light images, and through Multi-layer perceptron weighted fusion achieves high-precision annotation of unlabeled images.
It improves the accuracy of infrared image instance segmentation and the robustness of the model. It can effectively utilize the precise visual perception capabilities of visible light imaging to achieve fully automatic and high-precision annotation of a large number of unlabeled images, and improves the stability of infrared image segmentation of power transmission line equipment. sex and accuracy.
Smart Images

Figure CN118365886B
Abstract
Description
Technical Field
[0001] The present invention relates to the fields of image processing and computer vision, and in particular to a semi-supervised image instance segmentation method, system and medium. Background Art
[0002] Transmission line equipment image instance segmentation aims to segment targets such as suspension clamps and insulators from a large range of transmission line equipment images and distinguish different instances. Currently, most transmission line image instance segmentation is performed using infrared images of transmission lines taken by infrared imaging equipment. On the one hand, since infrared images themselves lack information such as color and texture, and the imaging is easily affected by environmental conditions such as temperature and humidity, manual interpretation is relatively difficult, and instance semantic annotation is difficult and costly; on the other hand, infrared images have the problem of small imaging scale and insufficient diversity, which seriously affects the generalization of the model in real scenarios.
[0003] In order to alleviate the problems existing in the segmentation of infrared images for power transmission line equipment, a content-generated model is usually used to convert infrared images into visible images for annotation, and obtain higher accuracy in image instance segmentation through visual signals such as rich colors and textures in visible light images. However, due to the significant differences in the imaging mechanism between infrared images and visible light images, the semantic instability before and after the image conversion increases the risk of instance semantic decoding errors, resulting in low segmentation accuracy. In addition, under the supervised learning paradigm, the model is highly dependent on paired images and their labels, making it difficult to effectively use a large number of unlabeled infrared images. The prior information contained in these data is the key factor in achieving fully automatic and high-precision annotation of target instances. Therefore, it is of great significance to annotate a large number of unlabeled infrared images and improve the accuracy of instance segmentation of infrared images of power transmission line equipment. Summary of the invention
[0004] The present invention provides a semi-supervised image instance segmentation method, system and medium to solve the problem in the prior art that a large number of input unlabeled images cannot be fully automatically and accurately labeled.
[0005] In order to solve the above technical problems, the present invention provides a semi-supervised image instance segmentation method, comprising:
[0006] Inputting an infrared image of a power transmission line device, and performing data augmentation on the infrared image to obtain an augmented infrared image;
[0007] Inputting the augmented infrared image into a preset first diffusion generation model for cross-mode conversion to obtain a visible light image;
[0008] Performing feature extraction on the augmented infrared image and the visible light image respectively to obtain an infrared image representation and a visible light image representation, and performing instance segmentation on the infrared image representation and the visible light image representation respectively to obtain an infrared image representation instance segmentation result and a visible light image representation instance segmentation result;
[0009] Performing weighted fusion on the infrared image representation instance segmentation result and the visible light image representation instance segmentation result through a multi-layer perceptron to obtain a final instance segmentation result;
[0010] Among them, the augmented infrared image is input into a preset first diffusion generation model for cross-mode conversion to obtain a visible light image, specifically: the features of the augmented infrared image are extracted using a preset first self-attention encoding model to obtain a first infrared image representation; the augmented infrared image and the first infrared image representation are input into the first diffusion generation model to be converted into the visible light image.
[0011] The embodiment of the present application can improve data diversity and model robustness by performing data augmentation on the input infrared image. By converting the augmented infrared image into a visible light image, the precise visual perception ability and higher resolution characteristics of visible light imaging can be effectively utilized, which is helpful for image interpretation, thereby obtaining higher accuracy in image instance segmentation; by performing feature extraction and instance segmentation on the augmented infrared image and the visible light image respectively, the instance analysis results can be obtained effectively and in real time; by fusing the infrared image representation instance segmentation results with the visible light image representation instance segmentation results, the stable detection ability of infrared imaging and the precise visual perception ability of visible light imaging can be combined to obtain more detailed instance analysis results, and realize fully automatic and high-precision labeling of a large number of input unlabeled images.
[0012] Furthermore, an infrared image of the power transmission line equipment is input, and data augmentation is performed on the infrared image to obtain an augmented infrared image, specifically:
[0013] performing affine transformation and color transformation on the infrared image in sequence to obtain the augmented infrared image;
[0014] The affine transformation includes one or more combinations of the following: rotation, translation and scaling; the color transformation includes: adjusting the grayscale value of the image and adding Gaussian noise.
[0015] In this way, by using affine transformation and color transformation to augment the input infrared image, the data diversity and model robustness can be effectively improved.
[0016] Furthermore, the formula of the first diffusion generation model is:
[0017] ;
[0018] In the formula, is the visible light image, is the augmented infrared image, For the first infrared image characterization, is the time step, is a random value, is the noise sampled from a standard normal distribution, is a standard normal distribution.
[0019] In this way, by using cross-modal conversion for image interpretation, the machine can understand the image scene and analyze its semantic content, thereby accurately determining different target instances.
[0020] Furthermore, feature extraction is performed on the augmented infrared image and the visible light image to obtain infrared image representation and visible light image representation, specifically:
[0021] The augmented infrared image and the visible light image are respectively feature extracted using a preset second self-attention encoding model and a preset third self-attention encoding model to obtain the infrared image representation and the visible light image representation, wherein the formula of the second self-attention encoding model is:
[0022] ;
[0023] ;
[0024] In the formula, is the augmented infrared image, For the infrared image characterization, , , is the coding feature of the augmented infrared image in multiple projection spaces, represents the matrix transpose operation, is convolution, is the activation function.
[0025] Among them, the formula of the third self-attention encoding model is:
[0026] ;
[0027] ;
[0028] In the formula, is the visible light image, is the visible light image representation, , , is the coding feature of the visible light image in multiple projection spaces, represents the matrix transpose operation, is convolution, is the activation function.
[0029] In this way, the encoding characteristics of the augmented infrared image and the visible light image in multiple projection spaces are helpful to promote feature diversity and effectively extract image representations of the augmented infrared image and the visible light image.
[0030] Furthermore, the infrared image representation and the visible light image representation are respectively subjected to instance segmentation to obtain an infrared image representation instance segmentation result and a visible light image representation instance segmentation result, specifically:
[0031] Using a first semantic decoding model to perform instance segmentation on the infrared image representation to obtain an instance segmentation result of the infrared image representation;
[0032] The visible light image representation is instance segmented using a preset second semantic decoding model to obtain the visible light image representation instance segmentation result.
[0033] In this way, by performing instance segmentation on the infrared image representation and the visible light image representation respectively and outputting corresponding instance segmentation results, the input image can be fully automatically annotated in real time.
[0034] Further, two sets of cross entropy loss functions are used to calculate the infrared image representation instance segmentation result and the visible light image representation instance segmentation result respectively, so as to iteratively train the first semantic decoding model and the second semantic decoding model. The two sets of cross entropy loss functions are specifically:
[0035] ;
[0036] ;
[0037] In the formula, is the cross entropy loss function, is the number of segmentation categories, Characterize the instance segmentation result of the infrared image, The segmentation result of the visible light image representation instance, is the instance segmentation label.
[0038] In this way, the infrared image representation instance segmentation result and the visible light image representation instance segmentation result are iteratively trained through the cross entropy loss function, so that parameter optimization of the semantic decoding model under supervised conditions can be achieved.
[0039] Furthermore, before weighted fusion of the infrared image representation instance segmentation result and the visible light image representation instance segmentation result is performed by a multi-layer perceptron to obtain a final instance segmentation result, the method further includes:
[0040] Inputting the visible light image and the visible light image representation into a preset second diffusion generation model to obtain a dual infrared image;
[0041] Two sets of image-semantic consistency regularization functions are used to calculate the augmented infrared image, the dual infrared image, the infrared image representation instance segmentation result, and the visible light image representation instance segmentation result, respectively, to iteratively train the first semantic decoding model, the second semantic decoding model, the first diffusion generation model, and the second diffusion generation model.
[0042] In this way, the mutual conversion between augmented infrared images and visible light images (i.e., dual learning) is realized through the diffusion generation model, and image-semantic consistency regularization constraints are performed on the infrared images, dual infrared images, infrared image representation instance segmentation results, and visible light image representation instance segmentation results. This can ensure the controllability of the dual learning process and the consistency of the instance semantic concepts, and can effectively improve the segmentation accuracy of the model.
[0043] Furthermore, the formula of the two sets of image-semantic consistency regularization function is:
[0044] ;
[0045] ;
[0046] In the formula, is the average error loss function, is the augmented infrared image, is the dual infrared image, Characterize the instance segmentation result of the infrared image, An instance segmentation result is characterized for the visible light image.
[0047] In this way, by applying different levels of image-semantic consistency regularization constraints to infrared images, dual infrared images, infrared image representation instance segmentation results, and visible light image representation instance segmentation results, unsupervised training is provided for the semantic decoding model and the diffusion generation model, thereby effectively improving the instance segmentation performance.
[0048] Furthermore, the formula of the weighted fusion is specifically:
[0049] ;
[0050] ;
[0051] In the formula, is a multi-layer perceptron, is the activation function, and is the weight of the infrared image representation instance segmentation prediction result and the weight of the visible light image representation instance segmentation prediction result, Characterize the instance segmentation result of the infrared image, The segmentation result of the visible light image representation instance, is the final instance segmentation result.
[0052] In this way, by inputting the infrared image representation instance segmentation result and the visible light image representation instance segmentation result into a multi-layer perceptron to generate different weights, and outputting the final instance segmentation result by weighted summation, the stable detection capability of infrared imaging and the precise visual perception capability of visible light imaging can be combined to obtain a more detailed instance analysis result.
[0053] In a second aspect, the present application provides a semi-supervised image instance segmentation system, comprising:
[0054] A data augmentation module, used for performing data augmentation on the input infrared image of the power transmission line equipment to obtain an augmented infrared image;
[0055] A cross-mode conversion module, used for inputting the augmented infrared image into a preset first diffusion generation model for cross-mode conversion to obtain a visible light image;
[0056] An infrared image feature extraction and segmentation module, comprising an extraction unit and a segmentation unit, wherein the extraction unit is used to perform feature extraction on the augmented infrared image and the visible light image respectively to obtain an infrared image representation and a visible light image representation, and the segmentation unit is used to perform instance segmentation on the infrared image representation and the visible light image representation respectively to obtain an infrared image representation instance segmentation result and a visible light image representation instance segmentation result;
[0057] A fusion module, used for weighted fusion of the infrared image representation instance segmentation result and the visible light image representation instance segmentation result through a multi-layer perceptron to obtain a final instance segmentation result;
[0058] Among them, the augmented infrared image is input into a preset first diffusion generation model for cross-mode conversion to obtain a visible light image, specifically: the features of the augmented infrared image are extracted using a preset first self-attention encoding model to obtain a first infrared image representation; the augmented infrared image and the first infrared image representation are input into the first diffusion generation model to be converted into the visible light image.
[0059] The embodiment of the present application performs data augmentation on the input infrared image through the data augmentation module, which can improve data diversity and model robustness. By converting the augmented infrared image into a visible light image through the cross-mode conversion module, the precise visual perception ability and higher resolution characteristics of visible light imaging can be effectively utilized, which is helpful for image interpretation, thereby obtaining higher accuracy in image instance segmentation; by performing feature extraction and instance segmentation on the augmented infrared image and the visible light image respectively through the infrared image feature extraction and segmentation module, the instance analysis results can be obtained effectively and in real time. By fusing the infrared image representation instance segmentation result with the visible light image representation instance segmentation result through the fusion module, the stable detection capability of infrared imaging and the precise visual perception capability of visible light imaging can be combined to obtain a more detailed instance analysis result, and realize fully automatic and high-precision labeling of a large number of input unlabeled images.
[0060] Furthermore, the data augmentation module is used to perform data augmentation on the input power transmission line equipment infrared image to obtain an augmented infrared image, specifically:
[0061] The data augmentation module is used to perform affine transformation and color transformation on the infrared image in sequence to obtain the augmented infrared image;
[0062] The affine transformation includes one or more combinations of the following: rotation, translation and scaling; the color transformation includes: adjusting the grayscale value of the image and adding Gaussian noise.
[0063] Furthermore, the formula of the first diffusion generation model is:
[0064] ;
[0065] In the formula, is the visible light image, is the augmented infrared image, For the first infrared image characterization, is the time step, is a random value, is the noise sampled from a standard normal distribution, is a standard normal distribution.
[0066] Furthermore, the infrared image feature extraction and segmentation module includes an extraction unit and a segmentation unit, wherein the extraction unit is used to perform feature extraction on the augmented infrared image and the visible light image respectively to obtain an infrared image representation and a visible light image representation, and the segmentation unit is used to perform instance segmentation on the infrared image representation and the visible light image representation respectively to obtain an infrared image representation instance segmentation result and a visible light image representation instance segmentation result, specifically:
[0067] The augmented infrared image and the visible light image are respectively feature extracted using a preset second self-attention encoding model and a preset third self-attention encoding model to obtain the infrared image representation and the visible light image representation, wherein the formula of the second self-attention encoding model is:
[0068] ;
[0069] ;
[0070] In the formula, is the augmented infrared image, For the infrared image characterization, , , is the coding feature of the augmented infrared image in multiple projection spaces, represents the matrix transpose operation, is convolution, is the activation function.
[0071] Among them, the formula of the third self-attention encoding model is:
[0072] ;
[0073] ;
[0074] In the formula, is the visible light image, is the visible light image representation, , , is the coding feature of the visible light image in multiple projection spaces, represents the matrix transpose operation, is convolution, is the activation function.
[0075] Further, the infrared image feature extraction and segmentation module includes an extraction unit and a segmentation unit, the extraction unit is used to perform feature extraction on the augmented infrared image and the visible light image respectively to obtain an infrared image representation and a visible light image representation, the segmentation unit is used to perform instance segmentation on the infrared image representation and the visible light image representation respectively to obtain an infrared image representation instance segmentation result and a visible light image representation instance segmentation result, including a first semantic decoding subunit and a second semantic decoding subunit, specifically:
[0076] The first semantic decoding subunit is used to perform instance segmentation on the infrared image representation using a preset first semantic decoding model to obtain an instance segmentation result of the infrared image representation;
[0077] The second semantic decoding subunit is used to perform instance segmentation on the visible light image representation by using a preset second semantic decoding model to obtain the visible light image representation instance segmentation result.
[0078] Furthermore, the first semantic decoding model and the second semantic decoding model are specifically:
[0079] Two sets of cross entropy loss functions are used to calculate the infrared image representation instance segmentation result and the visible light image representation instance segmentation result respectively, so as to iteratively train the first semantic decoding model and the second semantic decoding model. The two sets of cross entropy loss functions are specifically:
[0080] ;
[0081] ;
[0082] In the formula, is the cross entropy loss function; is the number of segmentation categories, Characterize the instance segmentation result of the infrared image, The segmentation result of the visible light image representation instance, is the instance segmentation label.
[0083] Furthermore, it also includes a dual learning module, including a dual infrared conversion unit and a constraint unit, specifically:
[0084] The dual infrared conversion unit is used for inputting the visible light image and the visible light image representation into a preset second diffusion generation model before the dual learning module is used in the fusion module to obtain a dual infrared image;
[0085] The constraint unit is used to use two sets of image-semantic consistency regularization functions to respectively calculate the augmented infrared image, the dual infrared image, the infrared image representation instance segmentation result and the visible light image representation instance segmentation result, so as to iteratively train the first semantic decoding model, the second semantic decoding model, the first diffusion generation model and the second diffusion generation model.
[0086] Furthermore, the formula of the two sets of image-semantic consistency regularization function is:
[0087] ;
[0088] ;
[0089] In the formula, is the average error loss function, is the augmented infrared image, is the dual infrared image, Characterize the instance segmentation result of the infrared image, An instance segmentation result is characterized for the visible light image.
[0090] Furthermore, the formula of the weighted fusion is specifically:
[0091] ;
[0092] ;
[0093] In the formula, is a multi-layer perceptron, is the activation function, and is the weight of the infrared image representation instance segmentation prediction result and the weight of the visible light image representation instance segmentation prediction result, Characterize the instance segmentation result of the infrared image, The segmentation result of the visible light image representation instance, is the final instance segmentation result.
[0094] In a third aspect, the present application provides a computer-readable storage medium, which includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute a semi-supervised image instance segmentation method as described in this embodiment. BRIEF DESCRIPTION OF THE DRAWINGS
[0095] In order to more clearly illustrate the technical solution of the present invention, the drawings required for use in the implementation mode will be briefly introduced below. Obviously, the drawings described below are only some implementation modes of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0096] Figure 1 It is a flowchart of an embodiment of the semi-supervised image instance segmentation method provided by the present invention;
[0097] Figure 2 is a flow chart of another embodiment of the semi-supervised image instance segmentation method provided by the present invention;
[0098] Figure 3 It is a structural schematic diagram of an embodiment of the semi-supervised image instance segmentation system provided by the present invention. DETAILED DESCRIPTION
[0099] 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 ordinary technicians in this field without creative work are within the scope of protection of this application.
[0100] It should be understood that the step numbers used in this article are only for the convenience of description and are not intended to limit the order in which the steps are executed.
[0101] It should be understood that the terms used in the present specification are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the present specification and the appended claims, the singular forms "a", "an" and "the" are intended to include plural forms unless the context clearly indicates otherwise.
[0102] The terms “include” and “comprising” indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.
[0103] The term "and / or" means and includes any and all possible combinations of one or more of the associated listed items.
[0104] In the field of image processing and computer vision, the low instance segmentation accuracy of infrared images of power transmission line equipment is an important problem. Based on this, the present invention proposes a semi-supervised image instance segmentation method, which can automatically annotate a large number of unlabeled infrared images and improve the instance segmentation accuracy of infrared images of power transmission line equipment. It should be noted that this method is applied to remote monitoring, fault detection, historical data analysis and intelligent inspection of smart grids, which will greatly improve the efficiency and accuracy of power grid operation and maintenance, and provide a strong guarantee for the stable operation of smart grids.
[0105] like Figure 1 As shown, Figure 1 : is a flow chart of an embodiment of the semi-supervised image instance segmentation method provided by the present invention, including steps S11 to S14, each step is specifically as follows:
[0106] Step S11: input an infrared image of a power transmission line device, and perform data augmentation on the infrared image to obtain an augmented infrared image.
[0107] It should be noted that data augmentation refers to a technology that artificially expands the training data set by allowing limited data to generate more equivalent data. The infrared images of the power transmission line equipment input in this embodiment may contain few samples. When the amount of sample data is small, data augmentation can make it suitable for complex scenes with different perspectives and different imaging conditions, which helps to improve data diversity and model robustness.
[0108] In this step, the infrared image is subjected to affine transformation and color transformation in sequence to obtain the augmented infrared image. ;
[0109] The affine transformation includes one or more combinations of the following: rotation, translation and scaling; the color transformation includes: adjusting the grayscale value of the image and adding Gaussian noise.
[0110] Specifically, the probability value of the affine transformation is 0.5, the grayscale value range in the color change is in the interval [0, 1], the mean and variance of the Gaussian noise are 0 and 1 respectively, and other parameters remain unchanged.
[0111] In this way, by using affine transformation and color transformation to augment the input infrared image, the data diversity and model robustness can be effectively improved.
[0112] Step S12: input the augmented infrared image into a preset first diffusion generation model for cross-mode conversion to obtain a visible light image.
[0113] In this step, it includes step S121, using a preset first self-attention encoding model to extract features of the augmented infrared image to obtain a first infrared image representation; step S122, inputting the augmented infrared image and the first infrared image representation into the first diffusion generation model to convert them into the visible light image.
[0114] Specifically, in step S121, the augmented infrared image is encoded using a preset first self-attention encoding model. Perform feature extraction to obtain the first infrared image representation , where the first self-attention encoding model is , using Swin Transformer (Liu, Ze, et al. "Swin transformer: Hierarchical visiontransformer using shifted windows." Proceedings of the IEEE / CVF international conference on computer vision. 2021.):
[0115] ;
[0116] Among them, the first self-attention encoding model is composed of It consists of a self-attention module, which is implemented through matrix projection and matrix multiplication operations:
[0117] ;
[0118] ;
[0119] In the formula, is the augmented infrared image, For the first infrared image characterization, , , is the coding feature of the augmented infrared image in multiple projection spaces, represents the matrix transpose operation, is convolution, is the activation function.
[0120] Specifically, in step S122, the augmented infrared image And the first infrared image representation Input the first pre-trained diffusion generation model to perform cross-mode conversion to obtain the visible light image , wherein the first diffusion generation model is , the pre-trained Stable Diffusion is used (Rombach, Robin, etal. "High-resolution image synthesis with latent diffusion models." Proceedings of the IEEE / CVF conference on computer vision and pattern recognition. 2022.):
[0121] ;
[0122] It should be noted that the first diffusion generation model is implemented by the Unet network, which consists of Down-sampled convolutions and In the first diffusion generation model, the diffusion process will perform times, each operation is as follows:
[0123] ;
[0124] In the formula, is the visible light image, is the augmented infrared image, For the first infrared image characterization, is the time step, is a random value, is the noise sampled from a standard normal distribution, is a standard normal distribution.
[0125] In this way, by using cross-modal conversion for image interpretation, the machine can understand the image scene and analyze its semantic content, thereby accurately determining different target instances.
[0126] Step S13, respectively extracting features from the augmented infrared image and the visible light image to obtain an infrared image representation and a visible light image representation, and respectively performing instance segmentation on the infrared image representation and the visible light image representation to obtain an infrared image representation instance segmentation result and a visible light image representation instance segmentation result.
[0127] In this step, it includes step S131, respectively performing feature extraction on the augmented infrared image and the visible light image to obtain an infrared image representation and a visible light image representation; and step S132, respectively performing instance segmentation on the infrared image representation and the visible light image representation to obtain an infrared image representation instance segmentation result and a visible light image representation instance segmentation result.
[0128] Specifically, in step S131, the augmented infrared image is respectively encoded using a preset second self-attention encoding model and a preset third self-attention encoding model. and the visible light image Perform feature extraction to obtain the infrared image representation And the visible light image characterization , where the formula of the second self-attention encoding model is:
[0129] ;
[0130] ;
[0131] In the formula, is the augmented infrared image, For the infrared image characterization, , , is the coding feature of the augmented infrared image in multiple projection spaces, represents the matrix transpose operation, is convolution, is the activation function.
[0132] Among them, the formula of the third self-attention encoding model is:
[0133] ;
[0134] ;
[0135] In the formula, is the visible light image, is the visible light image representation, , , is the coding feature of the visible light image in multiple projection spaces, represents the matrix transpose operation, is convolution, is the activation function.
[0136] In this way, the encoding characteristics of the augmented infrared image and the visible light image in multiple projection spaces are helpful to promote feature diversity and effectively extract image representations of the augmented infrared image and the visible light image.
[0137] Specifically, in step S132, the infrared image is represented by using a first semantic decoding model and using a second semantic decoding model to represent the visible light image Perform instance segmentation and obtain the infrared image representation instance segmentation results respectively and visible light image representation instance segmentation results , the formulas of the first semantic decoding model and the second semantic decoding model are:
[0138] ;
[0139] ;
[0140] It should be noted that the first semantic decoding model and the second semantic decoding model are , both use the trainable Mask r-cnn (He, Kaiming, et al. "Mask r-cnn." Proceedings of theIEEE international conference on computer vision. 2017.), where Mask r-cnn is composed of It consists of upsampling deconvolution.
[0141] In this way, by performing instance segmentation on the infrared image representation and the visible light image representation respectively and outputting corresponding instance segmentation results, the input image can be fully automatically annotated in real time.
[0142] Furthermore, this embodiment also iteratively trains the instance segmentation results through a cross entropy loss function to optimize the parameters of the first semantic decoding model and the second semantic decoding model.
[0143] Specifically, this embodiment uses two sets of cross entropy loss functions to represent the instance segmentation results of the infrared image respectively. And the visible light image representation instance segmentation result Iterative training is performed to achieve parameter optimization of the model under supervised conditions, wherein the formulas of the two sets of cross entropy loss functions are as follows:
[0144] ;
[0145] ;
[0146] In the formula, is the cross entropy loss function, is the number of segmentation categories, Characterize the instance segmentation result of the infrared image, The segmentation result of the visible light image representation instance, is the instance segmentation label.
[0147] In this way, the infrared image representation instance segmentation result and the visible light image representation instance segmentation result are iteratively trained through the cross entropy loss function, so that parameter optimization of the semantic decoding model under supervised conditions can be achieved.
[0148] Furthermore, before fusing the infrared image representation instance segmentation result and the visible light image representation instance segmentation result to obtain the final instance segmentation result, this embodiment may further include two steps:
[0149] Step 1: Input the visible light image and the visible light image representation into a preset second diffusion generation model to obtain a dual infrared image; Step 2: Use two sets of image-semantic consistency regularization functions to constrain the augmented infrared image, the dual infrared image, the infrared image representation instance segmentation result, and the visible light image representation instance segmentation result.
[0150] In step 1, the visible light image And the visible light image characterization Input to the diffusion generation model , and get the dual infrared image :
[0151] ;
[0152] The second diffusion generation model is implemented by a Unet network, which consists of Down-sampled convolutions and In the second diffusion generation model, the diffusion process will perform times, each operation is as follows:
[0153] ;
[0154] In the formula, is the dual infrared image, is the time step, is a random value, is the noise sampled from a standard normal distribution, is a standard normal distribution.
[0155] In step 2, the augmented infrared image is regularized by using two sets of image-semantic consistency regularization functions. , the dual infrared image , the infrared image representation instance segmentation result And the visible light image representation instance segmentation result To constrain.
[0156] The formulas of the two sets of image-semantic consistency regularization functions are:
[0157] ;
[0158] ;
[0159] In the formula, is the average error loss function, is the augmented infrared image, is the dual infrared image, Characterize the instance segmentation result of the infrared image, An instance segmentation result is characterized for the visible light image.
[0160] Step S14: Fusing the infrared image representation instance segmentation result and the visible light image representation instance segmentation result to obtain a final instance segmentation result.
[0161] Specifically, through the multi-layer perceptron Characterize the instance segmentation result of the infrared image And the visible light image representation instance segmentation result Perform weighted fusion to obtain the final instance segmentation result ; Among them, the formula of weighted fusion is as follows:
[0162] ;
[0163] ;
[0164] In the formula, is a multi-layer perceptron, is the activation function, and is the weight of the infrared image representation instance segmentation prediction result and the weight of the visible light image representation instance segmentation prediction result, Characterize the instance segmentation result of the infrared image, The segmentation result of the visible light image representation instance, is the final instance segmentation result.
[0165] It should be noted that the infrared image representation instance segmentation result And the visible light image representation instance segmentation result By inputting into the multi-layer perceptron, different weights can be generated, and the final image instance segmentation result can be output by weighted summation. .
[0166] In this way, by inputting the infrared image representation instance segmentation result and the visible light image representation instance segmentation result into a multi-layer perceptron to generate different weights, and outputting the final instance segmentation result by weighted summation, the stable detection capability of infrared imaging and the precise visual perception capability of visible light imaging can be combined to obtain a more detailed instance analysis result.
[0167] It should be noted that the first attention encoding model, the second self-attention encoding model and the third self-attention encoding model can be the same encoding model, the first diffusion generation model and the second diffusion generation model can be the same model, and the first semantic decoding model and the second semantic decoding model can be the same model.
[0168] The semi-supervised image instance segmentation method provided in this embodiment can improve data diversity and model robustness by performing data augmentation on the input infrared image; by converting the augmented infrared image into a visible light image, the precise visual perception ability and higher resolution characteristics of visible light imaging can be effectively utilized, which is helpful for image interpretation, thereby obtaining higher accuracy in image instance segmentation; by performing feature extraction and instance segmentation on the augmented infrared image and the visible light image respectively, the instance analysis results can be obtained effectively and in real time; by fusing the infrared image representation instance segmentation result with the visible light image representation instance segmentation result, the stable detection capability of infrared imaging and the precise visual perception capability of visible light imaging can be combined to obtain more detailed instance analysis results, thereby realizing fully automatic and high-precision labeling of a large number of input unlabeled images.
[0169] like Figure 2 As shown, Figure 2 It is a flowchart of another embodiment of the semi-supervised image instance segmentation method provided by the present invention.
[0170] In order to explain in more detail a semi-supervised image instance segmentation method provided by the present invention, it is provided Figure 2 For illustration, the following steps are included:
[0171] Step S21, performing data augmentation on the infrared image of the power transmission line equipment to obtain an augmented infrared image ;
[0172] Step S22: augmenting the infrared image The pre-trained first self-attention encoding model and the second attention encoding model are respectively input for feature extraction to obtain the first infrared image representation and infrared image characterization ;
[0173] Step S23: augment the infrared image And the first infrared image representation Input into the first diffusion generation model and converted into the visible light image ;
[0174] Step S24: convert the visible light image Input the pre-trained third attention encoding model for feature extraction to obtain visible light image representation ;
[0175] Step S25: characterize the infrared images Characterization with the visible light image Input the first semantic decoding model and the second semantic decoding model for instance segmentation to obtain the infrared image representation instance segmentation result and visible light image representation instance segmentation results ;
[0176] Step S26: Segment the infrared image using a multi-layer perceptron And the visible light image representation instance segmentation result Perform weighted fusion to obtain the final instance segmentation result ;
[0177] Furthermore, in order to optimize the parameters of the first semantic decoding model and the second semantic decoding model, two sets of cross entropy loss functions are used to respectively represent the instance segmentation results of the infrared image. And the visible light image representation instance segmentation result Perform iterative training.
[0178] In this way, the infrared image representation instance segmentation result and the visible light image representation instance segmentation result are iteratively trained through the cross entropy loss function, so that parameter optimization of the semantic decoding model under supervised conditions can be achieved.
[0179] Furthermore, after step S24, two steps are further included: step 1: converting the visible light image Input to the second diffusion generation model for cross-mode conversion to obtain the dual infrared image ; Step 2, by using two sets of image-semantic consistency regularization functions to augment the infrared image , the dual infrared image , the infrared image representation instance segmentation result And the visible light image representation instance segmentation result To constrain.
[0180] In this way, the mutual conversion between augmented infrared images and visible light images (i.e., dual learning) is realized through the diffusion generation model, and image-semantic consistency regularization constraints are performed on the infrared images, dual infrared images, infrared image representation instance segmentation results, and visible light image representation instance segmentation results. This can ensure the controllability of the dual learning process and the consistency of instance semantic concepts, and can effectively improve the segmentation accuracy of the model; by performing different levels of image-semantic consistency regularization constraints on the infrared images, dual infrared images, infrared image representation instance segmentation results, and visible light image representation instance segmentation results, unsupervised training is provided for the semantic decoding model and the diffusion generation model, thereby effectively improving the instance segmentation performance.
[0181] It should be noted that all steps, models and functions involved in this embodiment have been expanded in detail above and will not be repeated here.
[0182] See also Figure 3 , Figure 3 : is a schematic diagram of a structure of an embodiment of a semi-supervised image instance segmentation system provided by the present invention, comprising the following modules:
[0183] The data augmentation module 01 is used to perform data augmentation on the input power transmission line equipment infrared image to obtain an augmented infrared image;
[0184] It should be noted that data augmentation refers to a technology that artificially expands the training data set by allowing limited data to generate more equivalent data. The infrared images of the power transmission line equipment input in this embodiment may contain few samples. When the amount of sample data is small, data augmentation can make it suitable for complex scenes with different perspectives and different imaging conditions, which helps to improve data diversity and model robustness.
[0185] Specifically, the data augmentation module 01 is used to perform affine transformation and color transformation on the infrared image in sequence to obtain the augmented infrared image ;
[0186] The affine transformation includes one or more combinations of the following: rotation, translation and scaling; the color transformation includes: adjusting the grayscale value of the image and adding Gaussian noise.
[0187] Specifically, the probability value of the affine transformation is 0.5, the grayscale value range in the color change is in the interval [0, 1], the mean and variance of the Gaussian noise are 0 and 1 respectively, and other parameters remain unchanged.
[0188] In this way, by using affine transformation and color transformation to augment the input infrared image, the data diversity and model robustness can be effectively improved.
[0189] The cross-mode conversion module 02 is used to input the augmented infrared image into a preset first diffusion generation model for cross-mode conversion to obtain a visible light image.
[0190] This module includes a feature extraction unit, which is used to use a preset first self-attention encoding model to extract features from the augmented infrared image to obtain a first infrared image representation; and a visible light conversion unit, which is used to input the augmented infrared image and the first infrared image representation into the pre-trained first diffusion generation model to perform cross-modal conversion to obtain the visible light image.
[0191] Specifically, the feature extraction unit is used to use a preset first self-attention encoding model to encode the augmented infrared image Perform feature extraction to obtain the first infrared image representation , where the first self-attention encoding model is , using Swin Transformer (Liu, Ze, et al. "Swin transformer: Hierarchical vision transformer using shifted windows." Proceedings of the IEEE / CVF international conference on computer vision. 2021.):
[0192] ;
[0193] The first self-attention encoding model is composed of It consists of a self-attention module, which is implemented through matrix projection and matrix multiplication operations:
[0194] ;
[0195] ;
[0196] In the formula, is the augmented infrared image, For the first infrared image characterization, , , is the coding feature of the augmented infrared image in multiple projection spaces, represents the matrix transpose operation, is convolution, is the activation function.
[0197] Specifically, the visible light conversion unit is used to convert the augmented infrared image And the first infrared image representation Input the first pre-trained diffusion generation model to perform cross-mode conversion to obtain the visible light image , wherein the first diffusion generation model is , the pre-trained Stable Diffusion is used (Rombach, Robin, et al. "High-resolution image synthesis with latent diffusion models." Proceedings of the IEEE / CVF conference on computer vision and pattern recognition. 2022.):
[0198] ;
[0199] It should be noted that the first diffusion generation model is implemented by the Unet network, which consists of Down-sampled convolutions and In the first diffusion generation model, the diffusion process will perform times, each operation is as follows:
[0200] ;
[0201] In the formula, is the visible light image, is the augmented infrared image, For the first infrared image characterization, is the time step, is a random value, is the noise sampled from a standard normal distribution, is a standard normal distribution.
[0202] In this way, by using cross-modal conversion for image interpretation, the machine can understand the image scene and analyze its semantic content, thereby accurately determining different target instances.
[0203] The infrared image feature extraction and segmentation module 03 comprises an extraction unit and a segmentation unit, wherein the extraction unit is used to perform feature extraction on the augmented infrared image and the visible light image respectively to obtain an infrared image representation and a visible light image representation, and the segmentation unit is used to perform instance segmentation on the infrared image representation and the visible light image representation respectively to obtain an infrared image representation instance segmentation result and a visible light image representation instance segmentation result;
[0204] Specifically, the extraction unit is used to respectively extract the augmented infrared image by using a preset second self-attention encoding model and a preset third self-attention encoding model. and the visible light image Perform feature extraction to obtain the infrared image representation And the visible light image characterization , where the formula of the second self-attention encoding model is:
[0205] ;
[0206] ;
[0207] In the formula, is the augmented infrared image, For the infrared image characterization, , , is the coding feature of the augmented infrared image in multiple projection spaces, represents the matrix transpose operation, is convolution, is the activation function.
[0208] Among them, the formula of the third self-attention encoding model is:
[0209] ;
[0210] ;
[0211] In the formula, is the visible light image, is the visible light image representation, , , is the coding feature of the visible light image in multiple projection spaces, represents the matrix transpose operation, is convolution, is the activation function.
[0212] In this way, the encoding characteristics of the augmented infrared image and the visible light image in multiple projection spaces are helpful to promote feature diversity and effectively extract image representations of the augmented infrared image and the visible light image.
[0213] Specifically, the segmentation unit includes a first semantic decoding subunit and a second semantic decoding subunit, wherein the first semantic decoding subunit is used to represent the infrared image using a preset first semantic decoding model. Perform instance segmentation to obtain the infrared image representation instance segmentation result The second semantic decoding subunit is used to represent the visible light image using a preset second semantic decoding model. Perform instance segmentation to obtain the instance segmentation result of visible light image representation .
[0214] The formulas of the first semantic decoding model and the second semantic decoding model are:
[0215] ;
[0216] ;
[0217] It should be noted that the first semantic decoding model and the second semantic decoding model are , both use the trainable Mask r-cnn (He, Kaiming, et al. "Mask r-cnn." Proceedings of theIEEE international conference on computer vision. 2017.), where Mask r-cnn is composed of It consists of upsampling deconvolution.
[0218] In this way, by performing instance segmentation on the infrared image representation and the visible light image representation respectively and outputting corresponding instance segmentation results, the input image can be fully automatically annotated in real time.
[0219] Furthermore, this embodiment also iteratively trains the instance segmentation results through a cross entropy loss function to optimize the parameters of the first semantic decoding model and the second semantic decoding model.
[0220] Specifically, this embodiment uses two sets of cross entropy loss functions to represent the instance segmentation results of the infrared image respectively. And the visible light image representation instance segmentation result Iterative training is performed to achieve parameter optimization of the model under supervised conditions, wherein the formulas of the two sets of cross entropy loss functions are as follows:
[0221] ;
[0222] ;
[0223] In the formula, is the cross entropy loss function, is the number of segmentation categories, Characterize the instance segmentation result of the infrared image, The segmentation result of the visible light image representation instance, is the instance segmentation label.
[0224] In this way, the infrared image representation instance segmentation result and the visible light image representation instance segmentation result are iteratively trained through the cross entropy loss function, so that parameter optimization of the semantic decoding model under supervised conditions can be achieved.
[0225] Furthermore, this embodiment also includes a dual learning module, and the dual learning module includes a dual infrared conversion unit and a constraint unit.
[0226] Specifically, the dual infrared conversion unit is used to convert the visible light image into And the visible light image characterization Input the preset second diffusion generation model to obtain the dual infrared image :
[0227] ;
[0228] The second diffusion generation model is implemented by a Unet network, which consists of Down-sampled convolutions and In the second diffusion generation model, the diffusion process will perform times, each operation is as follows:
[0229] ;
[0230] In the formula, is the dual infrared image, is the time step, is a random value, is the noise sampled from a standard normal distribution, is a standard normal distribution.
[0231] Specifically, the constraint unit is used to use two sets of image-semantic consistency regularization functions to enlarge the infrared image , the dual infrared image , the infrared image representation instance segmentation result And the visible light image representation instance segmentation result To constrain.
[0232] The formulas of the two sets of image-semantic consistency regularization functions are:
[0233] ;
[0234] ;
[0235] In the formula, is the average error loss function, is the augmented infrared image, is the dual infrared image, Characterize the instance segmentation result of the infrared image, An instance segmentation result is characterized for the visible light image.
[0236] The fusion module 04 is used to fuse the infrared image representation instance segmentation result and the visible light image representation instance segmentation result to obtain a final instance segmentation result.
[0237] The fusion module 04 is used to segment the infrared image representation instance through a multi-layer perceptron. And the visible light image representation instance segmentation result Perform weighted fusion to obtain the final instance segmentation result .
[0238] Among them, the formula of weighted fusion is specifically:
[0239] ;
[0240] ;
[0241] In the formula, is a multi-layer perceptron, is the activation function, and is the weight of the infrared image representation instance segmentation prediction result and the weight of the visible light image representation instance segmentation prediction result, Characterize the instance segmentation result of the infrared image, The segmentation result of the visible light image representation instance, is the final instance segmentation result.
[0242] It should be noted that the infrared image representation instance segmentation result And the visible light image representation instance segmentation result Input Multilayer Perceptron In the example above, different weights can be generated, and the final image instance segmentation result can be output by weighted summation. .
[0243] In this way, by inputting the infrared image representation instance segmentation result and the visible light image representation instance segmentation result into a multi-layer perceptron to generate different weights, and outputting the final instance segmentation result by weighted summation, the stable detection capability of infrared imaging and the precise visual perception capability of visible light imaging can be combined to obtain a more detailed instance analysis result.
[0244] It should be noted that the first attention encoding model, the second self-attention encoding model and the third self-attention encoding model can be the same encoding model, the first diffusion generation model and the second diffusion generation model can be the same model, and the first semantic decoding model and the second semantic decoding model can be the same model.
[0245] The semi-supervised image instance segmentation system provided in this embodiment can improve data diversity and model robustness by performing data augmentation on the input infrared image; by converting the augmented infrared image into a visible light image, the precise visual perception ability and higher resolution characteristics of visible light imaging can be effectively utilized, which is helpful for image interpretation, thereby obtaining higher accuracy in image instance segmentation; by performing feature extraction and instance segmentation on the augmented infrared image and the visible light image respectively, the instance analysis results can be obtained effectively and in real time; by fusing the infrared image representation instance segmentation result with the visible light image representation instance segmentation result, the stable detection capability of infrared imaging and the precise visual perception capability of visible light imaging can be combined to obtain more detailed instance analysis results, thereby realizing fully automatic and high-precision labeling of a large number of input unlabeled images.
[0246] An embodiment of the present application also provides a computer-readable storage medium, which stores processor-executable instructions. When the processor-executable instructions are executed by the processor, they are used to implement the above-mentioned semi-supervised image instance segmentation method.
[0247] The contents of the above-mentioned semi-supervised image instance segmentation method embodiment are all applicable to the present storage medium embodiment. The functions specifically implemented by the present storage medium embodiment are the same as those of the above-mentioned semi-supervised image instance segmentation method embodiment, and the beneficial effects achieved are also the same as those achieved by the above-mentioned semi-supervised image instance segmentation method embodiment. Therefore, this embodiment can also realize fully automatic and high-precision labeling of a large number of input unlabeled images.
[0248] The above is a preferred embodiment of the present invention. It should be pointed out that a person skilled in the art can make several improvements and modifications without departing from the principle of the present invention. These improvements and modifications are also considered to be within the scope of protection of the present invention.
[0249] Those skilled in the art can understand that all or part of the processes in the above embodiments can be implemented by instructing related hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes in the above embodiments. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.
Claims
1. A semi-supervised image instance segmentation method, characterized in that: include: Inputting an infrared image of a power transmission line device, and performing data augmentation on the infrared image to obtain an augmented infrared image; Inputting the augmented infrared image into a preset first diffusion generation model for cross-mode conversion to obtain a visible light image; Performing feature extraction on the augmented infrared image and the visible light image respectively to obtain an infrared image representation and a visible light image representation, and performing instance segmentation on the infrared image representation and the visible light image representation respectively to obtain an infrared image representation instance segmentation result and a visible light image representation instance segmentation result; Performing weighted fusion on the infrared image representation instance segmentation result and the visible light image representation instance segmentation result through a multi-layer perceptron to obtain a final instance segmentation result; Among them, the augmented infrared image is input into a preset first diffusion generation model for cross-mode conversion to obtain a visible light image, specifically: the features of the augmented infrared image are extracted using a preset first self-attention encoding model to obtain a first infrared image representation; the augmented infrared image and the first infrared image representation are input into the first diffusion generation model to be converted into the visible light image.
2. A semi-supervised image instance segmentation method according to claim 1, characterized in that: An infrared image of a power transmission line device is input, and data augmentation is performed on the infrared image to obtain an augmented infrared image, specifically: performing affine transformation and color transformation on the infrared image in sequence to obtain the augmented infrared image; The affine transformation includes one or more combinations of the following: rotation, translation and scaling; the color transformation includes: adjusting the grayscale value of the image and adding Gaussian noise.
3. A semi-supervised image instance segmentation method according to claim 1, characterized in that: The formula of the first diffusion generation model is: ; In the formula, is the visible light image, is the augmented infrared image, For the first infrared image characterization, is the time step, is a random value, is the noise sampled from a standard normal distribution, is a standard normal distribution.
4. A semi-supervised image instance segmentation method according to claim 1, characterized in that: Feature extraction is performed on the augmented infrared image and the visible light image respectively to obtain an infrared image representation and a visible light image representation, specifically: The augmented infrared image and the visible light image are respectively feature extracted using a preset second self-attention encoding model and a preset third self-attention encoding model to obtain the infrared image representation and the visible light image representation, wherein the formula of the second self-attention encoding model is: ; ; In the formula, is the augmented infrared image, For the infrared image characterization, , , is the coding feature of the augmented infrared image in multiple projection spaces, represents the matrix transpose operation, is convolution, is the activation function; Among them, the formula of the third self-attention encoding model is: ; ; In the formula, is the visible light image, is the visible light image representation, , , is the coding feature of the visible light image in multiple projection spaces, represents the matrix transpose operation, is convolution, is the activation function.
5. The semi-supervised image instance segmentation method according to claim 1, characterized in that: The infrared image representation and the visible light image representation are respectively subjected to instance segmentation to obtain an infrared image representation instance segmentation result and a visible light image representation instance segmentation result, specifically: Using a first semantic decoding model to perform instance segmentation on the infrared image representation to obtain an instance segmentation result of the infrared image representation; The visible light image representation is instance segmented using a preset second semantic decoding model to obtain the visible light image representation instance segmentation result.
6. A semi-supervised image instance segmentation method according to claim 5, characterized in that: Also includes: Two sets of cross entropy loss functions are used to calculate the infrared image representation instance segmentation result and the visible light image representation instance segmentation result respectively, so as to iteratively train the first semantic decoding model and the second semantic decoding model. The two sets of cross entropy loss functions are specifically: ; ; In the formula, is the cross entropy loss function, is the number of segmentation categories, Characterize the instance segmentation result of the infrared image, The segmentation result of the visible light image representation instance, is the instance segmentation label.
7. A semi-supervised image instance segmentation method according to claim 5, characterized in that: Before weighted fusion of the infrared image representation instance segmentation result and the visible light image representation instance segmentation result is performed by a multi-layer perceptron to obtain a final instance segmentation result, the method further includes: Inputting the visible light image and the visible light image representation into a preset second diffusion generation model to obtain a dual infrared image; Two sets of image-semantic consistency regularization functions are used to calculate the augmented infrared image, the dual infrared image, the infrared image representation instance segmentation result, and the visible light image representation instance segmentation result, respectively, to iteratively train the first semantic decoding model, the second semantic decoding model, the first diffusion generation model, and the second diffusion generation model.
8. A semi-supervised image instance segmentation method according to claim 7, characterized in that: The formula of the two sets of image-semantic consistency regularization functions is: ; ; In the formula, is the average error loss function, is the augmented infrared image, is the dual infrared image, Characterize the instance segmentation result of the infrared image, An instance segmentation result is characterized for the visible light image.
9. A semi-supervised image instance segmentation method according to claim 1, characterized in that: The formula of weighted fusion is specifically: ; ; In the formula, is a multi-layer perceptron, is the activation function, and is the weight of the infrared image representation instance segmentation prediction result and the weight of the visible light image representation instance segmentation prediction result, Characterize the instance segmentation result of the infrared image, The segmentation result of the visible light image representation instance, is the final instance segmentation result.
10. A semi-supervised image instance segmentation system, characterized in that: include: A data augmentation module, used for performing data augmentation on the input infrared image of the power transmission line equipment to obtain an augmented infrared image; A cross-mode conversion module, used for inputting the augmented infrared image into a preset first diffusion generation model for cross-mode conversion to obtain a visible light image; An infrared image feature extraction and segmentation module, comprising an extraction unit and a segmentation unit, wherein the extraction unit is used to perform feature extraction on the augmented infrared image and the visible light image respectively to obtain an infrared image representation and a visible light image representation, and the segmentation unit is used to perform instance segmentation on the infrared image representation and the visible light image representation respectively to obtain an infrared image representation instance segmentation result and a visible light image representation instance segmentation result; A fusion module, used for weighted fusion of the infrared image representation instance segmentation result and the visible light image representation instance segmentation result through a multi-layer perceptron to obtain a final instance segmentation result; Among them, the augmented infrared image is input into a preset first diffusion generation model for cross-mode conversion to obtain a visible light image, specifically: the features of the augmented infrared image are extracted using a preset first self-attention encoding model to obtain a first infrared image representation; the augmented infrared image and the first infrared image representation are input into the first diffusion generation model to be converted into the visible light image.
11. A semi-supervised image instance segmentation system according to claim 10, characterized in that: The data augmentation module is used to perform data augmentation on the input power transmission line equipment infrared image to obtain an augmented infrared image, specifically: The data augmentation module is used to perform affine transformation and color transformation on the infrared image in sequence to obtain the augmented infrared image; Wherein, the affine transformation includes one or more combinations of the following: rotation, translation and scaling; The color transformation includes: adjusting the grayscale value of the image and adding Gaussian noise.
12. A semi-supervised image instance segmentation system according to claim 10, characterized in that: The formula of the first diffusion generation model is: ; In the formula, is the visible light image, is the augmented infrared image, For the first infrared image characterization, is the time step, is a random value, is the noise sampled from a standard normal distribution, is a standard normal distribution.
13. A semi-supervised image instance segmentation system according to claim 10, characterized in that: The infrared image feature extraction and segmentation module includes an extraction unit and a segmentation unit. The extraction unit is used to perform feature extraction on the augmented infrared image and the visible light image respectively to obtain an infrared image representation and a visible light image representation. The segmentation unit is used to perform instance segmentation on the infrared image representation and the visible light image representation respectively to obtain an infrared image representation instance segmentation result and a visible light image representation instance segmentation result. The extraction unit is specifically: The augmented infrared image and the visible light image are respectively feature extracted using a preset second self-attention encoding model and a preset third self-attention encoding model to obtain the infrared image representation and the visible light image representation, wherein the formula of the second self-attention encoding model is: ; ; In the formula, is the augmented infrared image, For the infrared image characterization, , , is the coding feature of the augmented infrared image in multiple projection spaces, represents the matrix transpose operation, is convolution, is the activation function; Among them, the formula of the third self-attention encoding model is: ; ; In the formula, is the visible light image, is the visible light image representation, , , is the coding feature of the visible light image in multiple projection spaces, represents the matrix transpose operation, is convolution, is the activation function.
14. A semi-supervised image instance segmentation system according to claim 10, characterized in that: The infrared image feature extraction and segmentation module includes an extraction unit and a segmentation unit, wherein the extraction unit is used to perform feature extraction on the augmented infrared image and the visible light image respectively to obtain an infrared image representation and a visible light image representation, and the segmentation unit is used to perform instance segmentation on the infrared image representation and the visible light image representation respectively to obtain an infrared image representation instance segmentation result and a visible light image representation instance segmentation result, and includes a first semantic decoding subunit and a second semantic decoding subunit, specifically: The first semantic decoding subunit is used to perform instance segmentation on the infrared image representation using a preset first semantic decoding model to obtain an instance segmentation result of the infrared image representation; The second semantic decoding subunit is used to perform instance segmentation on the visible light image representation by using a preset second semantic decoding model to obtain the visible light image representation instance segmentation result.
15. A semi-supervised image instance segmentation system according to claim 14, characterized in that: The first semantic decoding model and the second semantic decoding model are specifically: Two sets of cross entropy loss functions are used to calculate the infrared image representation instance segmentation result and the visible light image representation instance segmentation result respectively, so as to iteratively train the first semantic decoding model and the second semantic decoding model. The two sets of cross entropy loss functions are specifically: ; ; In the formula, is the cross entropy loss function; is the number of segmentation categories, Characterize the instance segmentation result of the infrared image, The segmentation result of the visible light image representation instance, is the instance segmentation label.
16. A semi-supervised image instance segmentation system according to claim 14, characterized in that: It also includes a dual learning module, including a dual infrared conversion unit and a constraint unit, specifically: The dual infrared conversion unit is used to input the visible light image and the visible light image representation into a preset second diffusion generation model to obtain a dual infrared image; The constraint unit is used to use two sets of image-semantic consistency regularization functions to respectively calculate the augmented infrared image, the dual infrared image, the infrared image representation instance segmentation result and the visible light image representation instance segmentation result, so as to iteratively train the first semantic decoding model, the second semantic decoding model, the first diffusion generation model and the second diffusion generation model.
17. A semi-supervised image instance segmentation system according to claim 16, characterized in that: The formula of the two sets of image-semantic consistency regularization functions is: ; ; In the formula, is the average error loss function, is the augmented infrared image, is the dual infrared image, Characterize the instance segmentation result of the infrared image, An instance segmentation result is characterized for the visible light image.
18. A semi-supervised image instance segmentation system according to claim 10, characterized in that: The formula of weighted fusion is specifically: ; ; In the formula, is a multi-layer perceptron, is the activation function, and is the weight of the infrared image representation instance segmentation prediction result and the weight of the visible light image representation instance segmentation prediction result, Characterize the instance segmentation result of the infrared image, The segmentation result of the visible light image representation instance, is the final instance segmentation result.
19. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored computer program, wherein when the computer program is executed, the device where the computer-readable storage medium is located is controlled to execute a semi-supervised image instance segmentation method according to any one of claims 1 to 9.
Citation Information
Patent Citations
Unsupervised infrared image-to-visible light image conversion method, device and equipment
CN116977243A
Cross-modal pedestrian re-identification method based on spatial data enhancement and symmetric mutual attention
CN116978093A
RGB-T multi-mode image instance segmentation method based on deep learning
CN117934843A
Power equipment semantic segmentation method based on visible light and infrared image feature fusion
CN118196405A
