Capsule endoscope image high-definition display method
By transferring capsule endoscopic image processing to external devices and using a local implicit image function super-segment model based on deep learning, the problems of low image resolution and low processing efficiency of traditional capsule endoscopic images are solved, achieving efficient Image quality improvement and diagnostic support.
Patent Information
- Application Number
- CN202411153485.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-21
- Publication Date
- 2024-12-10
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Due to the size and power consumption limitations of traditional capsule endoscopes, the image resolution is low, and the image processing has problems such as increasing power consumption, affecting real-time and overall effect. Traditional image interpolation methods are difficult to deal with complex geometric deformation and serrated effects.
Transfer capsule endoscopic image processing to an external receiving device, use JPEG to transmit images, and use deep learning-based local implicit image function (LIIF) super-segment model for image processing, including feature extraction and implicit functions Mapping, coordinate encoding, feature fusion and attention mechanisms to generate high-resolution images of any resolution.
Reduces power consumption of capsule endoscopes, extends equipment working time, improves image resolution and quality, can handle complex geometric deformations and detailed reconstruction, and provides higher diagnostic accuracy and visual effects.
Smart Images

Figure CN119110141A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a method for high-definition display of capsule endoscope images, and belongs to the technical field of image processing. Background Art
[0002] Due to size and power consumption limitations, the images captured by traditional capsule endoscopes have relatively low resolution. Common resolutions range from 320x320 pixels to 640x640 pixels. And due to the lens design of the capsule endoscope, the captured images usually have a fisheye effect, that is, the center of the image is clearer, but the edges are obviously distorted and blurred. In addition, the image may have a certain color distortion or unevenness. Although the built-in LED light source of the capsule endoscope can provide the necessary lighting, the lighting may be uneven, resulting in problems such as too bright or too dark in some areas of the image and more image noise.
[0003] Capsule endoscopes need to perform basic image processing such as denoising, automatic exposure, and automatic white balance under limited computing resources to improve image quality. After the image is transmitted to an external device, it usually needs further processing, including distortion correction, contrast enhancement, and color correction, and finally adjust the image to a suitable resolution size so that doctors can make better diagnoses.
[0004] Although image processing in capsule endoscopy can improve image quality, it also has some potential drawbacks and challenges, such as increased power consumption, affecting real-time performance and overall performance, and generating additional heat. At the same time, although traditional image interpolation methods are widely used in image magnification, reduction, and rotation operations, they also have some obvious disadvantages: such as producing jagged effects, blurring images, generating edge artifacts, and difficulty in handling complex geometric deformations. Summary of the invention
[0005] The present invention provides a method for high-definition display of capsule endoscope images, which transfers the image processing of the capsule endoscope to an external receiving device, effectively avoiding a series of disadvantages caused by image processing in the capsule endoscope; and can generate images with arbitrary resolution, reconstruct image details more finely, and improve image quality.
[0006] In order to solve the above technical problems, the technical solutions adopted by the present invention are as follows:
[0007] A method for high-definition display of capsule endoscope images comprises the following steps:
[0008] S1, performing JPEG compression on the original image P1 captured by the capsule endoscope to obtain image P2;
[0009] S2, transmitting the image P2 to an external receiver through the wireless transmission module in the capsule endoscope to obtain the image P3, without performing any image processing operation from the image P2 to the image P3, that is, the image P3 is exactly the same as the image P2;
[0010] S3. In the external receiver, use the OpenCV tool to perform denoising, white balance, contrast enhancement and color correction operations on the image P3 to obtain the image P4.
[0011] S4. Use the local implicit image function (LIIF) super-resolution model based on deep learning to super-resolution image P4 at any magnification (the magnification that the doctor wants to see) to obtain the final image P5 displayed in the host computer.
[0012] In the above S1, JPEG compression can greatly reduce the size of the original image and greatly improve the transmission efficiency. In theory, no image processing operation is performed in this process.
[0013] The above-mentioned method for high-definition display of capsule endoscope images transfers the image processing of the capsule endoscope to an external receiving device, effectively avoiding a series of disadvantages caused by image processing in the capsule endoscope; and can generate images of arbitrary resolution, which can reconstruct image details more finely and improve image quality.
[0014] In the above step S1, the original image P1 is a Bayer format original image directly captured by the CMOS image sensor of the capsule endoscope. Images in this format occupy a large storage space. After the shooting is completed, the image is compressed by the JPEG image compression algorithm burned in the capsule endoscope chip to obtain image P2.
[0015] In the above step S4, the local implicit image function (LIIF) super-resolution model based on deep learning includes:
[0016] Feature extraction network: The feature extraction network uses ResNet (the network structure of convolutional neural network) to extract the features of the input low-resolution image. CNN (convolutional neural network) can capture the local and global feature information of the image and provide rich feature representation for subsequent processing;
[0017] Implicit function network, the core part of which is a multilayer perceptron network, which is used to realize the mapping of implicit functions. The multilayer perceptron network (MLP) receives image features and query coordinates as input, outputs the color value of the corresponding coordinates, and takes each pixel coordinate of the image as input, combined with the local features obtained from the feature extraction network, and inputs it into the multilayer perceptron network (MLP) for processing;
[0018] The coordinate encoding module encodes the input coordinates to improve the model's ability to represent high-frequency details and uses Fourier transform to map the coordinates to a high-dimensional space.
[0019] The feature fusion module uses feature concatenation to concatenate local image features with the encoded coordinates as input to a multi-layer perceptron network (MLP);
[0020] In the prediction module, the multi-layer perceptron network (MLP) outputs the RGB color value of the corresponding coordinates to generate high-resolution image pixels. At the same time, it generates images of different resolutions through input of features and coordinates of different scales to further enhance the image details.
[0021] Attention mechanism module: Using spatial attention mechanism can help the model automatically and selectively focus on important areas at different spatial positions of the feature map. For super-resolution tasks, the spatial attention mechanism can allow the model to pay more attention to key areas such as edges and textures, thereby generating higher quality fine-grained images.
[0022] The loss function module uses L1 loss (Mean Absolute Error, MAE) to calculate the absolute difference in pixel values between the generated image and the real image. It is used to calculate the loss function in model training.
[0023] In order to provide high model adaptability and processing accuracy, a training data set of the local implicit image function (LIIF) super-resolution model based on deep learning is prepared, and the training data set is input into the local implicit image function (LIIF) super-resolution model based on deep learning for training to obtain the trained image super-resolution model. The trained image super-resolution model is used to super-resolve image P4 at any magnification (the magnification that the doctor wants to see) to obtain the final image P5 displayed on the host computer.
[0024] The above training data sets include: open source data sets div2k, celebAHQ, 1,000 images of colon parts taken by electronic high-definition electronic endoscopes, and 1,000 images of colon parts taken by capsule endoscopes.
[0025] The above training process includes:
[0026] Image downsampling: A low-resolution image is obtained from a high-resolution image (HR) by downsampling. During the downsampling process, the spatial resolution of the image is reduced and the detail information is reduced;
[0027] Data enhancement: Randomly crop, rotate, flip, and adjust the color of low-resolution and high-resolution images simultaneously to increase data diversity, prevent model overfitting, and improve the generalization ability of the model;
[0028] Feature extraction: Low-resolution images are input into a pre-trained convolutional neural network (ResNet) to extract multi-scale feature representations of the image. The extracted features contain local and global information of the image and provide input for the subsequent implicit function network.
[0029] Generate coordinate encoding: Encode the image coordinates and use Fourier transform for high-dimensional representation to enhance the model's perception of spatial information;
[0030] Feature fusion: The extracted image features and the encoded coordinates are concatenated as the input of the implicit function network, and the fused features are input into the multi-layer perceptron (MLP) network. Through the stacking of multiple fully connected layers and activation functions, the model can learn more complex functional relationships, thereby accurately predicting the pixel values of high-resolution images.
[0031] Calculate loss and back propagation: Calculate the pixel-level difference between the generated image and the real high-resolution image, calculate the gradient of the loss function relative to the model parameters through the back propagation algorithm, update the model parameters until convergence, and obtain the super-resolution model.
[0032] As a specific implementation scheme, in the above S4, the super-resolution model reads the step image P4, normalizes its pixel values into a tensor t between [0,1], and then inputs the tensor t into the feature extraction network ResNet. After a series of convolutions, pooling, and normalization, the high-level feature tensor f of the tensor t is extracted before the final fully connected layer; then, the implicit function network combines the feature map of the image with the high-resolution coordinates, and generates the pixel values of the high-resolution image through a multi-layer perception network (MLP); in the coordinate encoding module, the target high-resolution image P5 is generated by adjusting the resolution ratio specified. Label (x_new, y_new), in the feature fusion module, the local feature f2 corresponding to the coordinates of the high-resolution image P5 is extracted according to the feature tensor f, and finally the local feature f2 and the high-resolution coordinates (x_new, y_new) are input into the implicit function to map the local features of the image to the continuous latent space; finally, in the prediction module, by querying on the high-resolution network, the numerical value calculated by the above implicit function is decoded into the high-resolution pixel value of the corresponding position, and the target high-resolution image is generated by interpolation through the implicit function. This process can be understood as "sampling" from the implicit function to generate high-resolution details of the image.
[0033] The technologies not mentioned in the present invention are all referred to the prior art.
[0034] Compared with the prior art, the present invention has the following beneficial effects:
[0035] 1. Transferring the image processing part to an external receiving device can reduce power consumption. The internal battery capacity of the capsule endoscope is limited. By reducing the internal image processing work, power consumption can be significantly reduced, thereby extending the working time of the device and ensuring that the capsule can complete the inspection of the entire digestive tract. Reducing the processing tasks within the capsule can reduce the heat generated by electronic components and reduce the potential impact of temperature rise on the capsule and the human body. The external receiving device can process and analyze the received image data in real time and provide immediate feedback to the operator to help him make adjustments during the inspection process.
[0036] 2. The image resolution is adjusted based on the LIIF super-resolution model, which can handle super-resolution tasks of any magnification, rather than being limited to predefined fixed magnifications (such as 2x, 4x). Since images of any resolution can be generated, image details can be reconstructed more finely, improving image resolution by at least 40%. It can also improve the overall quality and visual effect of the image, and can better handle complex geometric deformations in the image, such as rotation, scaling, and perspective transformation, providing more robust image reconstruction capabilities. The most important thing is the ability to preserve and reconstruct complex image structures and details, such as textures, edges, and small objects.
[0037] 3. Adaptive processing of complex endoscopic images: Capsule endoscopy images usually have complex backgrounds and irregular tissue structures. The LIIF model can better adapt to these complex scenes through the method of local implicit functions. When processing endoscopic images, LIIF can extract finer features from local information, thereby improving the clarity and detail of the image.
[0038] 4. Enhanced resolution of fine structures: Fine structures in capsule endoscopy images (such as mucosal texture, small lesions, and flat polyps) are crucial for diagnosis. The LIIF model is able to restore these details more accurately through implicit functions, especially in situations where high-resolution observation is required, such as identifying small lesions, and can provide higher-quality magnified images.
[0039] 5. Multi-scale information fusion: Capsule endoscopy images often contain lesion information of different scales. The multi-resolution support capability of the LIIF model allows images to be generated at different scales, which can help doctors better observe and analyze lesions of different sizes and improve the accuracy of diagnosis.
[0040] 6. Flexible adaptation to different resolution requirements: In practical applications, different diagnostic scenarios may require different image resolutions. The LIIF model can flexibly adjust the image resolution according to specific needs, thereby providing the best image quality for different diagnostic tasks.
[0041] 7. Improve image acquisition efficiency and reduce storage requirements: Capsule endoscopy equipment is limited by size and battery capacity, and the resolution and number of images collected are usually limited. By applying the LIIF model, high-quality super-resolution images can be generated based on low-resolution images, reducing the demand for original image acquisition, thereby reducing the burden on the equipment and extending the working time of the capsule.
[0042] 8. Potential for unsupervised or weakly supervised learning: It is usually difficult to obtain high-quality labeled data for capsule endoscopy images. LIIF's implicit representation method provides the potential for unsupervised or weakly supervised learning, which can still generate high-quality super-resolution images in the absence of high-resolution labeled data.
[0043] 9. The SE attention mechanism is added to the model to improve the robustness and generalization ability of the model. When the model processes complex images (capsule endoscopy images), the images may contain a lot of irrelevant background information. It can reduce the impact of these unimportant areas, highlight the key areas, and improve the performance of the model in key areas. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 This is a flow chart of the method for high-definition display of capsule endoscope images of the present invention;
[0045] Figure 2 Processing flow chart of SE attention module;
[0046] Figure 3 Flowchart for LIIF model training;
[0047] Figure 4 This is the image super-resolution effect diagram of the present invention; DETAILED DESCRIPTION
[0048] In order to better understand the present invention, the content of the present invention is further explained below in conjunction with the embodiments, but the content of the present invention is not limited to the following embodiments.
[0049] This embodiment provides a method for high-definition display of capsule endoscope images. Figure 1 The method is based on an image processing strategy and an image super-resolution model based on LIIF, and comprises the following steps:
[0050] Step 1: The original Bayer image P1 captured by the CMOS image sensor in the capsule endoscope is compressed by the JPEG image compression algorithm burned into the capsule endoscope chip to obtain image P2. JPEG compression can greatly reduce the size of the original image and greatly improve the transmission efficiency. In theory, no image processing operation is performed in this process.
[0051] Step 2: The image P2 obtained in step 1 is transmitted to an external receiver through the wireless transmission module in the capsule scope to obtain image P3. No image processing operation is performed from image P2 to image P3. The image P3 received by the external receiving device is exactly the same as P2.
[0052] Step 3: The image P3 obtained in step 2 is subjected to denoising, white balance, contrast enhancement, and color correction in an external receiver by using OpenCV tools to obtain a preliminarily processed image P4. The image processing steps all require the use of CMOS to shoot a standard color card in advance for correction, and the scope of correction includes but is not limited to: white balance, color response, gamma correction, and color uniformity correction.
[0053] Step 4: Build an image super-resolution model based on LIIF.
[0054] The image super-resolution model is based on the local implicit image function (Local Implicit Image Function), including: a feature extraction network, which uses ResNet (the network structure of convolutional neural network) to extract the features of the input low-resolution image. CNN (convolutional neural network) can capture the local and global feature information of the image and provide rich feature representation for subsequent processing; implicit function network, the core part of which is a multi-layer perceptron network, which is used to realize the mapping of implicit functions. The multi-layer perceptron network (MLP) receives image features and query coordinates as input, outputs the color value of the corresponding coordinates, and takes each pixel coordinate of the image as input, combined with the local features obtained from the feature extraction network, and inputs it into the MLP for processing; the coordinate encoding module, in order to improve the model's ability to represent high-frequency details, encodes the input coordinates and uses Fourier transform to map the coordinates to a high-dimensional space; the feature fusion module, uses feature splicing to splice the local image features with the encoded coordinates as the input of the MLP; the prediction module, the MLP network outputs the RGB color value of the corresponding coordinates to generate high-resolution image pixels, and generates images of different resolutions through features and coordinate inputs of different scales, further improving image details; the attention mechanism module, using the spatial attention mechanism can help the model automatically and selectively focus on important areas at different spatial locations in the feature map. For super-resolution tasks, the spatial attention mechanism can allow the model to pay more attention to key areas such as edges and textures, thereby generating higher-quality details. The loss function module uses L1 loss (Mean Absolute Error, MAE) to calculate the absolute difference in pixel values between the generated image and the real image.
[0055] Specifically, read the image P4 obtained in step 3 and normalize its pixel values into a tensor t between [0,1], then input the tensor t into the feature extraction network ResNet, and after a series of convolutions, pooling, and normalization, extract the high-level feature tensor f of the tensor t before the final fully connected layer. After that, the implicit function network combines the feature map of the image with the high-resolution coordinates, and generates the pixel values of the high-resolution image through a multi-layer perceptron (MLP). Specifically, in the coordinate encoding module, the target high-resolution image P5 coordinates (x_new, y_new) are generated by the specified resolution adjustment ratio, and in the feature fusion module, the local feature f2 corresponding to the high-resolution image P5 coordinates is extracted according to the feature tensor f, and finally the local feature f2 and the high-resolution coordinates (x_new, y_new) are input into the implicit function to map the local features of the image to the continuous latent space. Finally, in the prediction module, the numerical value calculated by the above implicit function is decoded into the high-resolution pixel value of the corresponding position by querying on the high-resolution network. Interpolation is performed through the implicit function to generate the target high-resolution image. This process can be understood as "sampling" the latent function to generate high-resolution details of the image.
[0056] Compared with existing technologies, super-resolution technology using the LIIF model has the following advantages:
[0057] Adaptive processing of complex endoscopic images:
[0058] Capsule endoscopy images usually have complex backgrounds and irregular tissue structures. The LIIF model can better adapt to these complex scenes through the method of local implicit functions. When processing endoscopy images, LIIF can extract finer features from local information, thereby improving the clarity and detail of the image.
[0059] Enhanced resolution of fine structures:
[0060] The fine structures in capsule endoscopy images (such as mucosal texture, tiny lesions, and flat polyps) are crucial for diagnosis. The LIIF model is able to restore these details more accurately through implicit functions, especially in situations where high-resolution observation is required, such as identifying tiny lesions, and can provide higher-quality magnified images.
[0061] Multi-scale information fusion:
[0062] Capsule endoscopy images often contain lesion information of different scales. The multi-resolution support capability of the LIIF model allows the generation of images at different scales, which can help doctors better observe and analyze lesions of different sizes and improve the accuracy of diagnosis.
[0063] Flexible adaptation to different resolution requirements:
[0064] In practical applications, different diagnostic scenarios may require different image resolutions. The LIIF model can flexibly adjust the image resolution according to specific needs, thereby providing the best image quality for different diagnostic tasks.
[0065] Improve image acquisition efficiency and reduce storage requirements:
[0066] Capsule endoscopy devices are limited by size and battery capacity, and usually the resolution and number of images collected are limited. By applying the LIIF model, high-quality super-resolution images can be generated based on low-resolution images, reducing the need to collect original images, thereby reducing the burden on the device and extending the working time of the capsule.
[0067] Potential for unsupervised or weakly supervised learning:
[0068] It is usually difficult to obtain high-quality annotated data for capsule endoscopy images. LIIF's implicit representation method provides the potential for unsupervised or weakly supervised learning, which can generate high-quality super-resolution images even in the absence of high-resolution annotated data.
[0069] At the same time, the SE attention (Squeeze-Excitation Attention Model) module is added to the model, see Figure 2 , receiving the H*W*C-shaped feature map F1 extracted from ResNet as input, compressing the input feature map spatially, realizing global average pooling, and obtaining a 1*1*C feature map F2;
[0070] For the compressed feature map F2, channel feature learning is performed, and the feature map F3 with channel attention is obtained through the FC fully connected layer operation learning, and its dimension is still 1*1*C;
[0071] Finally, the feature map F3 of the channel attention and the original input feature map F1 are multiplied by the weight coefficient channel by channel, and finally the feature map F4 with channel attention is output;
[0072] The added SE module improves the robustness and generalization ability of the model. When the model processes complex images (capsule endoscopy images), the images may contain a lot of irrelevant background information. It can reduce the impact of these unimportant areas, highlight the key areas, and improve the performance of the model in key areas.
[0073] The fifth step is to create a training dataset for the LIIF-based image super-resolution model.
[0074] Specifically, in addition to using the open source datasets div2k and celebAHQ in the field of image super-resolution, 1,000 images of colon parts taken by electronic high-definition electronic endoscopes and 1,000 images of colon parts taken by capsule endoscopes were added to the training dataset.
[0075] Step 6: Input the LIIF-based image super-resolution model dataset into the model for training to obtain a trained image super-resolution model;
[0076] For details, see Figure 3 , Image downsampling: A low-resolution image is obtained by downsampling from a high-resolution image (HR). During the downsampling process, the spatial resolution of the image is reduced and the detail information is reduced.
[0077] Data enhancement: Randomly crop, rotate, flip, and adjust the color of low-resolution and high-resolution images at the same time to increase data diversity, prevent model overfitting, and improve the generalization ability of the model.
[0078] Feature extraction: Low-resolution images are fed into a pre-trained convolutional neural network (ResNet) to extract multi-scale feature representations of the image. The extracted features contain local and global information of the image and provide input for the subsequent implicit function network.
[0079] Generate coordinate encoding: Encode the image coordinates and use Fourier transform for high-dimensional representation to enhance the model's perception of spatial information.
[0080] Feature fusion: The extracted image features are concatenated with the encoded coordinates as the input of the implicit function network. The fused features are input into the multi-layer perceptron (MLP) network, and through a series of nonlinear transformations, specifically stacking multiple fully connected layers and activation functions, the model can learn more complex functional relationships and accurately predict the pixel values of high-resolution images.
[0081] Calculate loss and back propagation: Calculate the pixel-level difference between the generated image and the real high-resolution image, calculate the gradient of the loss function relative to the model parameters through the back propagation algorithm, and update the model parameters until convergence.
[0082] In the seventh step, the trained super-resolution model is used to adjust the resolution of the image P4 obtained in step three to any magnification (the specific magnification is selected by the doctor according to the usage scenario), and finally the obtained high-definition image P5 is displayed on the host computer for the doctor to read.
[0083] The present invention is based on image processing technology and deep learning technology, and provides a method for high-definition display of capsule endoscope images through an image processing strategy and an image super-resolution model, which effectively avoids a series of disadvantages brought about by image processing in capsule endoscopes, can realize the display of capsule endoscope images with arbitrary magnification / reduction, and can reconstruct image details more finely. Compared with other super-resolution methods, the method can improve the image resolution while ensuring clear display of image content and details, and at the same time can improve the image resolution in terms of details, which is not available in most existing methods. The method can improve the image resolution by more than 40%, which can help capsule endoscopy physicians improve the quality of film reading.
[0084] The image super-resolution effect achieved by the above method can be found in Figure 4 In the figure, the left side (a1, a2 and a3) are the original images taken by the capsule, and the right side (b1, b2 and b3) are the images processed by the method; a1 is the resolution card taken by the original capsule; b1 is the resolution card image after super resolution; a2 and a3 are the magnified areas of a1. b2 and b3 are the displays of a2 and a3 processed by the above method respectively; a resolution test card image taken by a capsule endoscope is processed by the above method ( Figure 4 b1) doubles its resolution (original 480x480, processed 960x960), and its detail display ( Figure 4 The clarity and resolution of b2 and b3) have been significantly improved.
[0085] Some steps in the embodiments of the present invention may be implemented using software, and the corresponding software program may be stored in a readable storage medium, such as a CD or a hard disk.
[0086] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for high-definition display of capsule endoscope images, characterized in that: The steps include: S1, performing JPEG compression on the original image P1 captured by the capsule endoscope to obtain image P2; S2, transmitting the image P2 to an external receiver through a wireless transmission module in the capsule endoscope to obtain an image P3, without performing any image processing operation from the image P2 to the image P3; S3, in the external receiver, use the OpenCV tool to perform denoising, white balance, contrast enhancement and color correction operations on the image P3 to obtain the image P4; S4. Use the local implicit image function super-resolution model based on deep learning to super-resolution the image P4 at any ratio to obtain the final image P5 displayed in the host computer.
2. The method for high-definition display of capsule endoscope images according to claim 1, characterized in that: In step S1, the original image P1 is a Bayer format original image directly captured by the CMOS image sensor of the capsule endoscope. Images in this format occupy a large storage space. After the shooting is completed, the image is compressed using the JPEG image compression algorithm burned into the capsule endoscope chip to obtain image P2.
3. The method for high-definition display of capsule endoscope images according to claim 1 or 2, characterized in that: In step S4, the local implicit image function super-resolution model based on deep learning includes: Feature extraction network: The feature extraction network uses ResNet to extract the features of the input low-resolution image. CNN can capture the local and global feature information of the image and provide rich feature representation for subsequent processing; The implicit function network, whose core part is a multi-layer perceptron network, is used to realize the mapping of implicit functions. The multi-layer perceptron network receives image features and query coordinates as input, outputs the color value of the corresponding coordinates, and takes each pixel coordinate of the image as input, combined with the local features obtained from the feature extraction network, and inputs it into the multi-layer perceptron network for processing; The coordinate encoding module encodes the input coordinates to improve the model's ability to represent high-frequency details and uses Fourier transform to map the coordinates to a high-dimensional space. The feature fusion module uses feature concatenation to concatenate local image features with the encoded coordinates as input to the multi-layer perceptron network; In the prediction module, the multi-layer perceptron network outputs the RGB color value of the corresponding coordinates to generate high-resolution image pixels. At the same time, it generates images of different resolutions through the input of features and coordinates of different scales to further enhance the image details. Attention mechanism module, using spatial attention mechanism to help the model automatically and selectively focus on important areas at different spatial positions of the feature map. For super-resolution tasks, the spatial attention mechanism allows the model to pay more attention to key areas such as edges and textures, thereby generating higher quality fine-grained images. The loss function module uses L1 loss to calculate the absolute difference in pixel values between the generated image and the real image.
4. The method for high-definition display of capsule endoscope images according to claim 1 or 2, characterized in that: A training data set for a local implicit image function super-resolution model based on deep learning is prepared, and the training data set is input into the local implicit image function super-resolution model based on deep learning for training to obtain a trained image super-resolution model. The trained image super-resolution model is used to perform super-resolution on image P4 at any ratio to obtain image P5 that is finally displayed in the host computer.
5. The method for high-definition display of capsule endoscope images according to claim 4, characterized in that: The training data sets include: open source data sets div2k, celebAHQ, 1,000 images of colon parts taken by electronic high-definition electronic endoscopes, and 1,000 images of colon parts taken by capsule endoscopes.
6. The method for high-definition display of capsule endoscope images according to claim 4, characterized in that: The training process includes: Image downsampling: Get a low-resolution image from a high-resolution image by downsampling; Data enhancement: Randomly crop, rotate, flip, and adjust the color of low-resolution and high-resolution images simultaneously to increase data diversity, prevent model overfitting, and improve the generalization ability of the model; Feature extraction: Low-resolution images are input into a pre-trained convolutional neural network to extract multi-scale feature representations of the image. The extracted features contain local and global information of the image and provide input for the subsequent implicit function network. Generate coordinate encoding: Encode the image coordinates and use Fourier transform for high-dimensional representation to enhance the model's perception of spatial information; Feature fusion: The extracted image features and the encoded coordinates are concatenated as the input of the implicit function network, and the fused features are input into the multi-layer perceptron network. Through the stacking of multiple fully connected layers and activation functions, the model can learn more complex functional relationships, thereby accurately predicting the pixel values of high-resolution images. Calculate loss and back propagation: Calculate the pixel-level difference between the generated image and the real high-resolution image, calculate the gradient of the loss function relative to the model parameters through the back propagation algorithm, update the model parameters until convergence, and obtain the super-resolution model.
7. The method for high-definition display of capsule endoscope images according to claim 1 or 2, characterized in that: In S4, the super-resolution model reads the step image P4, normalizes its pixel values into a tensor t between [0,1], and then inputs the tensor t into the feature extraction network ResNet. After a series of convolutions, pooling, and normalization, the high-level feature tensor f of the tensor t is extracted before the final fully connected layer. After that, the implicit function network combines the feature map of the image with the high-resolution coordinates, and generates the pixel values of the high-resolution image through a multi-layer perception network. In the coordinate encoding module, the target high-resolution image P5 coordinates (x_new, y_new) are generated by the specified resolution adjustment ratio. In the feature fusion module, the local feature f2 corresponding to the high-resolution image P5 coordinates is extracted according to the feature tensor f. Finally, the local feature f2 and the high-resolution coordinates (x_new, y_new) are input into the implicit function to map the local features of the image to a continuous latent space. Finally, in the prediction module, the numerical value calculated by the above implicit function is decoded into the high-resolution pixel value of the corresponding position by querying on the high-resolution network, and the target high-resolution image is generated by interpolation through the implicit function.
Citation Information
Patent Citations
Monitoring image super-resolution reconstruction method based on local texture estimator network
CN116630162A
Brain MRI super-resolution reconstruction method and system based on implicit nerve representation
CN117237196A
Automatic report processing method and system based on artificial intelligence
CN117827827A
Super-resolution method for any-scale image
CN117853339A
Endoscope imaging method, image acquisition terminal and storage medium
CN118138900A
