Image acquisition equipment for computer vision

By introducing a multi-module integrated model of GAN and attention mechanism in corneal confocal microscopy image processing, the problem of poor image quality is solved, the image clarity and diagnostic accuracy are significantly improved, and it is suitable for a variety of medical imaging scenarios.

CN119205551AInactive Publication Date: 2024-12-27JINGDEZHEN UNIV
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202411323957.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-23
Publication Date
2024-12-27
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the prior art, when processing corneal confocal microscope images, noise interference, insufficient contrast and artifacts lead to poor image quality, affecting diagnostic accuracy, and deep learning-based models have insufficient feature extraction and Overfitting problem.

Method used

A multi-module integrated image enhancement model based on GAN and attention mechanism was designed. By constructing the initial paired image dataset, basic medical image enhancement modules and auxiliary enhancement modules were designed, combined with GAN generators and discriminators, the jump layer connections and The spatial attention mechanism optimizes the image enhancement process and uses a comprehensive loss function for model training.

Benefits of technology

Significantly improve the denoising effect and detail retention ability of the image, the enhanced image is clearer, and the lesion area can be more accurately identified, the diagnostic accuracy of ophthalmic diseases is improved, and the robustness and detail retention is maintained in complex noise environments. ability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119205551A_ABST
    Figure CN119205551A_ABST
Patent Text Reader

Abstract

The invention discloses an image acquisition method and device for computer vision. The method comprises the following steps: S1, constructing an initial pairing image data set; s2, designing a basic medical image enhancement module based on a generative adversarial network (GAN), and respectively designing a generator network architecture and a discriminator network architecture of the GAN; s3, designing an attention mechanism-based auxiliary enhancement module; s4, designing a loss function of a medical image enhancement model, and performing model training based on the paired image data set constructed in S1; and S5, deploying the image enhancement model and obtaining a to-be-enhanced medical image. Compared with the prior art, the method has the following beneficial effects: 1, the image acquisition and enhancement quality can be obviously improved; 2, the accuracy of subsequent diagnosis is improved, and the misdiagnosis risk is reduced; 3, the robustness and the detail retention capability of the model are enhanced; 4, a more flexible image enhancement mechanism is provided; and 5, real-time image processing is realized to adapt to clinical application requirements.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of computer vision, and in particular relates to a medical corneal image acquisition and enhancement method based on deep learning. Background Art

[0002] In modern medical imaging scenarios, confocal corneal microscopy (CCM) is a high-precision imaging device that is widely used in the field of ophthalmology, especially in the diagnosis and research of corneal diseases. CCM can capture corneal cells, nerve fibers and other microscopic structures at micron-level resolution, providing doctors with detailed microscopic images of the cornea, which helps to detect and evaluate diseases such as corneal neuropathy, dry eye, diabetic retinopathy, etc. at an early stage.

[0003] However, although CCM plays an important role in ophthalmic diagnosis, the quality of images collected by it in practical applications is uneven, mainly facing the following major problems: ① Noise interference: Noise interference reduces the clarity of CCM images, making it difficult to accurately identify the lesion area; ② Insufficient contrast: Low contrast makes it difficult to distinguish important subtle structures in CCM images, affecting the accuracy of diagnosis; ③ Artifact influence: Artifacts produce false signals, which may mislead doctors' judgment and lead to misdiagnosis. These image quality problems not only reduce the visual effect of the image, but also directly affect doctors' identification and diagnosis of diseases. In order to improve the usability of CCM images, existing technologies attempt to improve image quality by means of denoising, contrast enhancement, and artifact elimination, mainly including traditional image processing methods and image enhancement methods based on machine learning.

[0004] Traditional image processing methods, such as Gaussian filtering, median filtering, histogram equalization, and Laplace enhancement, are usually used to remove noise and enhance image contrast. These methods perform well when dealing with simple noise, but have limited effectiveness when faced with complex and diverse noise types and artifacts in CCM images. More importantly, traditional methods often blur the details of the image while removing noise, resulting in the loss of corneal microstructures, which affects doctors' diagnosis.

[0005] Image enhancement methods based on machine learning: Based on deep learning technology, deep learning models such as convolutional neural networks (CNNs) are used to achieve image denoising and enhancement. This type of method can automatically extract features from images and perform effective denoising and enhancement through training with a large amount of data. However, the existing CNN architecture often suffers from insufficient feature extraction and overfitting problems when processing high-resolution medical images. In addition, due to the high resolution and complexity of CCM images, it may be difficult for the model to retain image details during training, especially to retain important features of the image while removing noise.

[0006] In view of the limitations of existing methods, this paper proposes a medical corneal image acquisition and enhancement method based on deep learning. This method combines GAN and attention mechanism to design a multi-module integrated image enhancement model, aiming to significantly improve the denoising effect and detail retention ability of CCM images, thereby providing clearer and more reliable image support for the diagnosis of ophthalmic diseases. Summary of the invention

[0007] A computer vision image acquisition method comprises the following steps:

[0008] S1. Construct an initial paired image dataset, including noisy Source image data and denoised and enhanced Target image data;

[0009] S2. Design a basic medical image enhancement module based on GAN, and design the generator network architecture and discriminator network architecture of GAN respectively;

[0010] S3. Design an auxiliary enhancement module based on the attention mechanism, which uses the deep features of the Target and integrates them into the GAN generator network to guide the image enhancement process; the basic medical image enhancement module and the auxiliary enhancement module together constitute the image enhancement model of the present invention;

[0011] S4, design the loss function of the medical image enhancement model and train the model based on the paired image dataset constructed in S1;

[0012] S5. Deploy the image enhancement model and obtain the medical image to be enhanced. Design the image matching module to find the enhanced image that is closest to the image to be enhanced from the initial data set, input it and the image to be enhanced into the image enhancement model, and finally obtain the acquired enhanced medical image result.

[0013] In the acquisition method described above, the step of constructing the initial paired image data set in step S1 includes:

[0014] S1-1. Collect a large amount of CCM image data from different ages, genders, and disease states, and then select CCM images with high contrast, moderate brightness, and as little noise and artifacts as possible, scale their resolution to 1024*1024 and use them as Target image data;

[0015] S1-2, filter and scale S1-1 to obtain the Target image data, and perform operations such as adding random noise, increasing / decreasing brightness, adding artifact interference, etc. to obtain the Source image data, and the Source and Target images corresponding to each operation are a set of paired data sets;

[0016] S1-3, repeat step S1-2, add different degrees of noise / artifacts to each Target image data, and adjust different degrees of brightness to finally obtain N sets of paired data sets, and the Source image containing noise is represented as S i , the denoised Target image is represented as T i , i∈[1,N].

[0017] In the acquisition method described above, the step of constructing the basic medical image enhancement module in step S2 includes:

[0018] S2-1. The encoder part in the generator is based on residual blocks and ReLU activation functions; each residual block consists of a 3*3 convolution block, a 1*1 convolution block, a ReLU activation function, and a residual connection. Therefore, the first residual block of the encoder is calculated as:

[0019] ME1 = conv1(ReLU(conv3(S i ))) (1)

[0020] FE1=ReLU(concat(ME1,S i )) (2)

[0021] Among them, S i is the i-th Source image containing noise, i∈[1,N]; ME1 is the intermediate feature representation after two convolutions, FE1 is the feature after the first residual block, conv3(*) and conv1(*) are 3*3 and 1*1 convolution operations respectively, ReLU(*) is the activation function, and concat(*) is the channel concatenation operation;

[0022] The encoder in the generator architecture designed by the present invention contains a total of K residual blocks, so the feature extracted by the encoder is represented as FE K , and use it as the input feature FD0 of the decoder;

[0023] S2-2. The decoder part in the generator is composed of deconvolution residual blocks corresponding to the encoder network; the calculation of the first residual block is expressed as:

[0024] MD1=convT1(ReLU(convT3(FD0))) (3)

[0025] ID1=ReLU(concat(MD1,FD0)) (4)

[0026] Among them, MD1 is the intermediate feature after two deconvolutions; ID1 is the feature restored by the deconvolution block of the decoder, which is similar to FE KHave the same dimensions; convT3(*) and convT1(*) are 3*3 and 1*1 deconvolution operations respectively;

[0027] In order to ensure the consistency of the content before and after image enhancement, a skip-layer connection is added between the encoder and the decoder. In addition, the present invention designs an auxiliary enhancement module, which extracts the feature details of the enhanced image and introduces them into the decoder of the generator to guide the image enhancement process. Therefore, the feature output result of this layer of the decoder is:

[0028] FD1=concat(ID1,FE K ,GD1)) (5)

[0029] Among them, GD1 is the auxiliary guidance feature of the first layer of the decoder, FE K is the encoder feature corresponding to the first layer of the decoder network (the second layer of the decoder network corresponds to the K-1th layer output of the encoder); the decoder in the generator architecture designed by the present invention also includes K residual blocks. Through the above calculation method, the feature extracted by the decoder is expressed as FD K ; The decoder finally obtains the output of the overall generator through a 1*1 convolution block:

[0030] G i =ReLU(conv1(FD K )) (6)

[0031] Among them, G i Represents the image to be enhanced S i is the image enhancement result obtained by input; therefore, the overall network processing of the generator is expressed as:

[0032] G i =Gen(S i ) (7)

[0033] Among them, Gen(*) is the generator function;

[0034] S2-3, the discriminator of GAN is used to judge the quality of the output image of the generator during the training process; since the resolution of CCM images is relatively high, the accuracy of directly using the discriminator to judge them is relatively poor, so the present invention adopts a block discrimination mechanism to discriminate CCM images; specifically, the image to be judged is divided into 4*4 small area blocks, and then these 16 area blocks are respectively input into the discriminator network, and finally all the results of the discriminator are averaged as the comprehensive discrimination result; in addition, the network architecture of the discriminator is composed of convolutional layers and Dropout layers;

[0035]

[0036] Among them, Imgj is the region block of the jth image to be discriminated, D is the discriminator discrimination result, and Dis(*) is the discriminator processing function.

[0037] In the acquisition method described above, the step of constructing the auxiliary enhancement module based on the attention mechanism in step S3 includes:

[0038] S3-1. For the enhanced image T in the paired dataset i , i∈[1,N], using the first K layers of the VGG19 model pre-trained on a large-scale dataset as a feature extractor, we get the basic guided features of K layers:

[0039] BF k =VGG19 k (T i ) (9)

[0040] Among them, BF k Represents the basic guidance features of the kth layer, VGG19 k (*) represents the k-th layer network output of the pre-trained VGG19 model, and k∈[1,K];

[0041] S3-2. Based on basic guidance features BF k , and use the spatial attention mechanism to further obtain spatial features:

[0042] MS k =σ(Conv5(concat(AvgPool(BF k ),MaxPool(BF k )))) (10)

[0044] AF k =MS k ⊙BF k (11)

[0045] Among them, MS k represents the spatial attention weight, AF k is the spatial feature after attention calculation; AvgPool(*) and MaxPool(*) are the average pooling layer and the maximum pooling layer respectively; Conv5(*) is a 5*5 convolution operation, σ(*) is the Sigmoid activation function, and ⊙ represents the element-by-element multiplication operation;

[0046] S3-3. Using AdaLN layer standardization to AF k Normalize the information features and map them to the auxiliary guide feature GD of the kth layer through a 3*3 convolution layer k :

[0047] GDk =Conv3(AdaLN(AF k )) (12)

[0048] Among them, AdaLN(*) is the layer normalization function, and the auxiliary guide feature GD k The dimension of the decoder layer and the feature ID restored k have the same dimension, and k∈[1,K];

[0049] S3-4, the auxiliary guidance feature GD obtained in S3-3 k It is integrated into the decoder layer of S2-2 to guide the image enhancement effect in details.

[0050] In the acquisition method described above, the process of loss function design and model training in step S4 includes:

[0051] S4-1. First, the basic loss function based on GAN is designed as:

[0052]

[0053] in, and represents the computational expectation, Dis(*) and Gen(*) are the discriminator and generator network functions respectively, and G i =Gen(S i ) indicates that the image enhancement module is based on S i is the denoising and enhancement result of the input image; T i is the real enhanced image, and i∈[1,N]; log(*) is the logarithmic function;

[0054] S4-2. In order to improve the accuracy and robustness of the image enhancement module, the present invention separately designs a high-frequency information loss function and a deep feature loss function; wherein the high-frequency information loss function is obtained by performing Haar wavelet transform on the real image and the output result of the image enhancement module, and quantifying the difference between the two, that is:

[0055] L Hr =‖Haar(G i )-haar(T i )‖1 (14)

[0056] Among them, Haar(*) is the Haar wavelet operator, and ‖*‖1 is the calculation of the L1 norm.

[0057] S4-3, the deep feature loss function extracts features based on the InceptionV3 model pre-trained under a large data set, obtains the corresponding deep feature vectors, and quantifies the difference between the two, namely:

[0058] L Ft =‖Inception(G i )-Inception(T i )‖2 (15)

[0059] Among them, Inception(*) represents the pre-trained InceptionV3 model, ‖*‖2 is the calculation of L2 norm;

[0060] S4-4. The overall medical image enhancement model loss function is expressed as:

[0061] Loss i =L GAN +w1·L Hr +w2·L Ft (16)

[0062] Among them, w1 and w2 are the weight factors of the loss function, and w1 = 2, w2 = 3; Loss i represents the overall loss function calculated for the i-th group of training data, and i∈[1,N];

[0063] S4-5. Use the paired image dataset constructed by S1 and the overall image enhancement model constructed by S2 and S3 to train the model, and use the Adam algorithm to optimize the model. It iterates 500 times in total to finally obtain the trained image enhancement model.

[0064] In the acquisition method described above, the deployment of the image enhancement model and the design process of the image matching module in step S5 include:

[0065] S5-1. Deploy the image enhancement model to the backend server, receive the image collected by CCM in real time, and scale it to 1024*1024 resolution to obtain the image to be enhanced Test in ;

[0066] S5-2. Design an image matching module. Specifically, use the pre-trained InceptionV3 model to extract features from the image to be enhanced and all target images in the data set, and calculate the matching coefficient between the image to be enhanced and the existing real image:

[0067]

[0068] Among them, C i is the matching coefficient between the image to be enhanced and the i-th Target image, and i∈[1,N], P is the data dimension after feature extraction of the pre-trained InceptionV3 model;

[0069] S5-3, find the maximum value of N matching coefficients, and use the corresponding Target image as the reference guide image Ref for image enhancement in ,Right now:

[0070] Ref in =Tgt(max(C1,C2,...,C N )) (18)

[0071] Among them, max(*) is the calculated maximum value, Tgt(*) is the Target image corresponding to the corresponding matching coefficient;

[0072] S5-4, Test the image to be enhanced in and the reference guidance image Ref in Input the image enhancement model and get the enhanced image result Test out ;

[0073] S5-5, repeat steps S5-2 to S5-4 to achieve real-time acquisition and enhancement of CCM images, and test the enhanced images out Real-time feedback to the backend.

[0074] The invention also provides a device using the method.

[0075] Compared with the prior art, the present invention has the following beneficial effects:

[0076] 1. Significantly improve the quality of image acquisition and enhancement: By introducing GAN and attention mechanism, the present invention has significant effects in removing noise, enhancing contrast, eliminating artifacts, etc. The enhanced CCM image is clearer and has richer details;

[0077] 2. Improve the accuracy of subsequent diagnosis: This method can effectively preserve and enhance the microstructure of the cornea, allowing doctors to more accurately identify the lesion area, thereby reducing the risk of misdiagnosis and improving the accuracy of diagnosis of ophthalmic diseases;

[0078] 3. Enhance the robustness and detail retention of the model: The comprehensive loss function designed by the present invention, including GAN basic loss, high-frequency information loss and deep feature loss, optimizes the performance of the model in complex noisy environments and retains the key details of the image;

[0079] 4. More flexible image enhancement mechanism: The multi-module integrated image enhancement model designed using GAN and attention mechanism has stronger adaptability and can cope with different noise types and complex image structures, making it suitable for a variety of medical imaging scenarios;

[0080] 5. Real-time image processing: Through the image matching module and optimized deep learning model, real-time acquisition, enhancement and feedback of CCM images are achieved, greatly improving the efficiency and reliability of image processing to meet the needs of clinical applications. BRIEF DESCRIPTION OF THE DRAWINGS

[0081] Figure 1 It is a flowchart of the overall technical route of the present invention;

[0082] Figure 2 This is the overall block diagram of the image enhancement model;

[0083] Figure 3 Training flowchart for image enhancement model;

[0084] Figure 4 It is the overall deployment and implementation framework. DETAILED DESCRIPTION

[0085] The present invention proposes an image acquisition method for computer vision, such as Figure 1 As shown, first, a Source and Target paired dataset is constructed to provide basic data support for the training of the subsequent enhancement model; then, an image enhancement module is designed based on GAN, and the generator of the U-Net architecture is used for image enhancement, and a discriminator network is designed to guide the optimization of the generator; on this basis, the present invention further introduces an auxiliary enhancement module based on the attention mechanism to extract the deep features of the enhanced image to guide the generator to perform more detailed enhancement processing. Subsequently, a comprehensive loss function is designed, including GAN basic loss, high-frequency information loss, and deep feature loss, and the model is trained using the constructed paired dataset to optimize the image enhancement effect. Finally, the trained image enhancement model is deployed to the server, and the designed image matching module is used to select the reference image that best matches the image to be enhanced, thereby realizing real-time acquisition, enhancement, and feedback of the CCM image;

[0086] Figure 2 The overall block diagram of the image enhancement model is shown. The generator takes the image to be enhanced as input and obtains the enhanced image result. The discriminator guides the generator to be trained.

[0087] Figure 3 This is the training flow chart of the model. The overall image enhancement model constructed in steps S1 and S3 is used for model training, and the Adam algorithm is used to optimize the model. The model is iterated 500 times in total, and finally the trained image enhancement model is obtained.

[0088] Figure 4It is an overall deployment and implementation block diagram. By deploying the image enhancement model to the back-end server, it can receive the images collected by CCM in real time and scale the images to a suitable resolution. It uses the pre-trained InceptionV3 model to extract features from the image to be enhanced and all target images in the data set, calculate the matching coefficient, and use the image corresponding to the maximum value of the matching coefficient as the reference guide image. Then, the reference guide image and the image to be enhanced are input into the image enhancement model to obtain the enhanced image, and the CCM image can be fed back to the back end in real time.

[0089] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

[0090] Although the above describes the specific implementation methods of the present invention, it is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art on the basis of the technical solution of the present invention without creative work are still within the scope of protection of the present invention.

Claims

1. A computer vision image acquisition method, characterized in that: This includes the following steps: S1. Construct an initial paired image dataset, including noisy medical corneal images (Source) and denoised and enhanced corneal images (Target); S2. Design a basic medical image enhancement module based on the Generative Adversarial Network (GAN), and design the generator network architecture and discriminator network architecture of GAN respectively; S3. Design an auxiliary enhancement module based on the attention mechanism, which uses the deep features of the Target and integrates them into the GAN generator network to guide the image enhancement process; The basic medical image enhancement module and the auxiliary enhancement module together constitute the image enhancement model of the present invention; S4, design the loss function of the medical image enhancement model and train the model based on the paired image dataset constructed in S1; S5. Deploy the image enhancement model and obtain the medical image to be enhanced. Design the image matching module to find the enhanced image that is closest to the image to be enhanced from the initial data set, input it and the image to be enhanced into the image enhancement model, and finally obtain the acquired enhanced medical image result.

2. The image acquisition method according to claim 1, characterized in that: The steps of constructing the initial paired image data set in step S1 include: S1-1. Collect a large amount of CCM image data from different ages, genders, and disease states, and then select CCM images with high contrast, moderate brightness, and as little noise and artifacts as possible, scale their resolution to 1024*1024 and use them as Target data; S1-2, filter and scale S1-1 to obtain the Target image data, and perform operations such as adding random noise, increasing / decreasing brightness, adding artifact interference, etc. to obtain the Source image, and the Source and Target images corresponding to each operation are a set of paired data sets; S1-3, repeat step S1-2, add different degrees of noise / artifacts to each Target image data, and adjust different degrees of brightness to finally obtain N sets of paired data sets, and the Source image containing noise is represented as S i , the denoised Target image is represented as T i , i∈[1,N].

3. The image acquisition method according to claim 1, characterized in that: The step of constructing the basic medical image enhancement module in step S2 includes: S2-1. The encoder part in the generator is based on residual blocks and ReLU activation functions; each residual block consists of a 3*3 convolution block, a 1*1 convolution block, a ReLU activation function, and a residual connection. Therefore, the first residual block of the encoder is calculated as: ME1=conv1(ReLU(conv3(S i ))) (1) FE1=ReLU(concat(ME1,S i )) (2) Among them, S i is the i-th Source image containing noise, i∈[1,N]; ME1 is the intermediate feature representation after two convolutions, FE1 is the feature after the first residual block, conv3(*) and conv1(*) are 3*3 and 1*1 convolution operations respectively, ReLU(*) is the activation function, and concat(*) is the channel concatenation operation; The encoder in the generator architecture designed by the present invention contains a total of K residual blocks, so the feature extracted by the encoder is represented as FE K , and use it as the input feature FD0 of the decoder; S2-2. The decoder part in the generator is composed of deconvolution residual blocks corresponding to the encoder network; the calculation of the first residual block is expressed as: MD1=convT1(ReLU(convT3(FD0))) (3) ID1=ReLU(concat(MD1,FD0)) (4) Among them, MD1 is the intermediate feature after two deconvolutions; ID1 is the feature restored by the deconvolution block of the decoder, which is similar to FE K Have the same dimensions; convT3(*) and convT1(*) are 3*3 and 1*1 deconvolution operations respectively; In order to ensure the consistency of the content before and after image enhancement, a skip-layer connection is added between the encoder and the decoder. In addition, the present invention designs an auxiliary enhancement module, which extracts the feature details of the enhanced image and introduces them into the decoder of the generator to guide the image enhancement process. Therefore, the feature output result of this layer of the decoder is: FD1=concat(ID1,FE K ,GD1)) (5) Among them, GD1 is the auxiliary guidance feature of the first layer of the decoder, FE K is the encoder feature corresponding to the first layer of the decoder network (the second layer of the decoder network corresponds to the K-1th layer output of the encoder); the decoder in the generator architecture designed by the present invention also includes K residual blocks. Through the above calculation method, the feature extracted by the decoder is expressed as FD K ; The decoder finally obtains the output of the overall generator through a 1*1 convolution block: G i =ReLU(conv1(FD K )) (6) Among them, G i Represents the image to be enhanced S i is the image enhancement result obtained by input; therefore, the overall network processing of the generator is expressed as: G i =Gen(S i ) (7) Among them, Gen(*) is the generator function; S2-3, the discriminator of GAN is used to judge the quality of the output image of the generator during the training process; since the resolution of CCM images is relatively high, the accuracy of directly using the discriminator to judge them is relatively poor, so the present invention adopts a block discrimination mechanism to discriminate CCM images; specifically, the image to be judged is divided into 4*4 small area blocks, and then these 16 area blocks are respectively input into the discriminator network, and finally all the results of the discriminator are averaged as the comprehensive discrimination result; in addition, the network architecture of the discriminator is composed of convolutional layers and Dropout layers; Among them, Img j is the region block of the jth image to be discriminated, D is the discriminator discrimination result, and Dis(*) is the discriminator processing function.

4. The image acquisition method according to claim 1, characterized in that: The steps of constructing the auxiliary enhancement module based on the attention mechanism in step S3 include: S3-1. For the enhanced image T in the paired dataset i , i∈[1,N], using the first K layers of the VGG19 model pre-trained on a large-scale dataset as a feature extractor, we get the basic guided features of K layers: BF k =VGG19 k (T i ) (9) Among them, BF k Represents the basic guidance features of the kth layer, VGG19 k (*) represents the k-th layer network output of the pre-trained VGG19 model, and k∈[1,K]; S3-2. Based on basic guidance features BF k , and use the spatial attention mechanism to further obtain spatial features: MS k =σ(Conv5(concat(AvgPool(BF k ),MaxPool(BF k ))))(10) OF k =MS k ⊙BF k (11) Among them, MS k represents the spatial attention weight, AF k is the spatial feature after attention calculation; AvgPool(*) and MaxPool(*) are the average pooling layer and the maximum pooling layer respectively; Conv5(*) is a 5*5 convolution operation, σ(*) is the Sigmoid activation function, and ⊙ represents the element-by-element multiplication operation; S3-3. Using AdaLN layer standardization to AF k Normalize the information features and map them to the auxiliary guide feature GD of the kth layer through a 3*3 convolution layer k : DG k =Conv3(AdaLN(AF k )) (12) Among them, AdaLN(*) is the layer normalization function, and the auxiliary guide feature GD k The dimension of the decoder layer and the feature ID restored k have the same dimension, and k∈[1,K]; S3-4, the auxiliary guidance feature GD obtained in S3-3 k It is integrated into the decoder layer of S2-2 to guide the image enhancement effect in details.

5. The image acquisition method according to claim 1, characterized in that: The process of loss function design and model training in step S4 includes: S4-1. First, the basic loss function based on GAN is designed as: in, and represents the computational expectation, Dis(*) and Gen(*) are the discriminator and generator network functions respectively, and G i =Gen(S i ) indicates that the image enhancement module is based on S i is the denoising and enhancement result of the input image; T i is the real enhanced image, and i∈[1,N]; log(*) is the logarithmic function; S4-2. In order to improve the accuracy and robustness of the image enhancement module, the present invention separately designs a high-frequency information loss function and a deep feature loss function; wherein the high-frequency information loss function is obtained by performing Haar wavelet transform on the real image and the output result of the image enhancement module, and quantifying the difference between the two, that is: L Hr =‖Hair(G i )-Hair(T i )‖1 (14) Among them, Haar(*) is the Haar wavelet operator, ‖*‖1 is the calculation of L1 norm; S4-3, the deep feature loss function extracts features based on the InceptionV3 model pre-trained under a large data set, obtains the corresponding deep feature vectors, and quantifies the difference between the two, namely: L Ft =‖Inception(G i )-Inception(T i )‖2 (15) Among them, Inception(*) represents the pre-trained InceptionV3 model, ‖*‖2 is the calculation of L2 norm; S4-4. The overall medical image enhancement model loss function is expressed as: Loss i =L GAN +w1·L Hr +w2·L Ft (16) Among them, w1 and w2 are the weight factors of the loss function, and w1 = 2, w2 = 3; Loss i represents the overall loss function calculated for the i-th group of training data, and i∈[1,N]; S4-5. Use the paired image dataset constructed by S1 and the overall image enhancement model constructed by S2 and S3 to train the model, and use the Adam algorithm to optimize the model. It iterates 500 times in total to finally obtain the trained image enhancement model.

6. The image acquisition method according to claim 1, characterized in that: The deployment of the image enhancement model and the design process of the image matching module in step S5 include: S5-1. Deploy the image enhancement model to the backend server, receive the image collected by CCM in real time, and scale it to 1024*1024 resolution to obtain the image to be enhanced Test in ; S5-2. Design an image matching module. Specifically, use the pre-trained InceptionV3 model to extract features from the image to be enhanced and all target images in the data set, and calculate the matching coefficient between the image to be enhanced and the existing real image: Among them, C i is the matching coefficient between the image to be enhanced and the i-th Target image, and i∈[1,N], P is the data dimension after feature extraction of the pre-trained InceptionV3 model; S5-3, find the maximum value of N matching coefficients, and use the corresponding Target image as the reference guide image Ref for image enhancement in ,Right now: Ref in =Tgt(max(C1,C2,...,C N )) (18) Among them, max(*) is the calculated maximum value, Tgt(*) is the Target image corresponding to the corresponding matching coefficient; S5-4, Test the image to be enhanced in and the reference guidance image Ref in Input the image enhancement model and get the enhanced image result Test out ; S5-5, repeat steps S5-2 to S5-4 to achieve real-time acquisition and enhancement of CCM images, and test the enhanced images out Real-time feedback to the backend.

7. An image acquisition device for computer vision, characterized in that: The device uses the image acquisition method described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Wear surface damage depth estimation method and system based on multi-attention mechanism

    CN114972882A

  • Underwater image enhancement method based on semantic guidance and attention fusion

    CN116596795A

  • Eye fundus image enhancement method and system based on high-frequency information fusion

    CN118297823A

  • Underwater image enhancement method and system based on feature learning and multi-dimensional replacement

    CN118333884A

  • Training and utilizing an image exposure transformation neural network to generate a long-exposure image from a single short-exposure image

    US20190333198A1