Visual odometer method and system based on geometric and luminosity consistency
By using a visual odometry network model coupled with depth and attitude in the intestinal environment, combined with self-supervision and supervised learning, the problem of lack of texture and unstable lighting in the intestinal environment is solved, and depth and attitude information in the intestinal environment are realized. The accurate estimation improves the accuracy and safety of colonoscopy.
Patent Information
- Application Number
- CN202411045290.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-01
- Publication Date
- 2024-08-30
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Two-dimensional images in traditional colonoscopy cannot provide depth information and colonoscope position information, making it difficult to evaluate lesions. In addition, existing visual odometry methods lack texture and unstable illumination in the intestinal environment, resulting in sparse depth estimation and inaccurate pose estimation. accurate.
A visual odometry network model based on depth and attitude coupling is used, combined with self-supervision and supervised learning, to design a depth estimation sub-network and an attitude estimation sub-network, using U-Net and encoder-regressor architecture, and through the photometric consistency calibration mechanism and Reconstructing the loss function to improve depth and pose estimation accuracy in intestinal environments.
It achieves the accuracy and robustness of simultaneously estimating depth information and colonoscopy posture information in the intestinal environment, overcomes the effects of texture lack and illumination changes, and improves the accuracy and safety of colonoscopy.
Smart Images

Figure CN118570613A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer vision technology, and in particular to a visual odometer method and system based on geometric and photometric consistency. Background Art
[0002] Colonoscopy is an endoscopic examination mainly used for the diagnosis and treatment of intestinal diseases. During the examination, the doctor needs to observe the video image of the colonoscope to determine the position and angle of the lens in order to adjust the movement direction of the colonoscope and plan the next operation. However, traditional colonoscopy remains at the two-dimensional level and cannot provide depth information and colonoscope position information, which makes it difficult to evaluate the size, shape and position of the lesion. At the same time, the two-dimensional image cannot fully depict the true three-dimensional distorted morphology of the intestine, which will lead to missed diagnosis or misdiagnosis. In addition, the two-dimensional image operation often requires doctors to rely on experience and guesswork when planning colonoscopy operations, which will lead to inaccurate operations and increased risks. Therefore, timely obtaining the dense depth corresponding to the image and accurate colonoscope posture information during the colonoscopy process is the key to improving colonoscopy technology.
[0003] Past research has mainly relied on computer vision technology and sensor technology to solve this problem. In terms of depth estimation, traditional methods use simultaneous localization and mapping (SLAM) based on multi-view geometry and structure from motion (SFM) to estimate the depth information of the intestine, but the depth information obtained by these methods is highly sparse and cannot depict the dense three-dimensional shape of complete tissues and lesions. In posture estimation methods, some methods use gyroscopes or magnetometer sensors to measure the orientation of the colonoscope. However, this type of method is not only complex and costly, but may also be affected by environmental interference in actual applications, resulting in large errors in the measurement results.
[0004] In recent years, the massive growth of colonoscopy data and the development of deep learning technology have provided new possibilities for solving this problem. Deep learning is a computational model that simulates the neural network of the human brain. It can learn the inherent laws and structures of data through training with a large amount of data, and then use it for prediction and decision-making. Among them, the deep learning visual odometry (VO) specializes in how to simultaneously estimate the dense depth information corresponding to the image and the motion posture of the camera through a continuous sequence of images. At present, most of these methods are designed for indoor and outdoor human activity scenes. However, applying visual odometry to the intestinal environment faces many unique challenges. First, intestinal images usually lack obvious texture features, making it difficult for depth and posture estimation modules to work. Secondly, the light source and lens of the colonoscope are bound and moved, and the lighting conditions in the intestinal environment are constantly changing, resulting in the failure of the inter-frame brightness consistency of the traditional method. Summary of the invention
[0005] To this end, an embodiment of the present invention provides a visual odometer method and system based on geometric and photometric consistency, which is used to overcome the problems of sparse depth estimation and inaccurate posture estimation in existing methods in the prior art, as well as the challenges of texture scarcity and unstable lighting in the intestinal environment.
[0006] In order to solve the above problems, an embodiment of the present invention provides a visual odometer method based on geometric and photometric consistency, the method comprising: Using colonoscopy to collect intestinal images, construct a data set, and divide the data set into a training set, a validation set, and a test set in proportion; Construct a visual odometry network model based on the coupling of depth and attitude estimation, input the image data in the training set into the visual odometry network model, train the visual odometry network model based on the loss function integrating self-supervision and supervision, use the validation set to evaluate the model performance, and obtain a trained visual odometry network model; The visual odometer network model includes a depth estimation subnetwork and a posture estimation subnetwork, wherein the depth estimation subnetwork adopts a U-Net type encoder-decoder architecture, and the posture estimation subnetwork adopts an encoder-regressor architecture; The depth estimation subnetwork is used to predict corresponding depth images based on the input continuous intestinal image frames; The posture estimation subnetwork is used to estimate relative posture information between consecutive intestinal image frames based on the input consecutive intestinal image frames and the corresponding depth images predicted by the depth estimation subnetwork; The image data in the test set is input into the trained visual odometry network model to obtain the depth information of the intestinal image and the posture information of the colonoscope.
[0007] Preferably, the posture estimation subnetwork adopts an encoder-regressor architecture. In the encoder part of the posture estimation subnetwork, a multi-layer incremental fusion strategy is used to fuse the extracted cross-modal features, which is expressed as: In the formula, Features extracted by the encoder in U-Net; It is a feature exchange layer that ensures that cross-modal features are in the same variable space; They are the fused depth features and posture features respectively; is the activation function; is convolution; is the input RGB image; and They are the predicted depth image and posture information respectively; is the pose estimation network.
[0008] Preferably, the method for constructing a visual odometer network model based on coupling of depth and posture estimation comprises: In order to cope with the lighting changes in the intestinal environment, a photometric consistency calibration mechanism is proposed to reconstruct the photometric loss function in the visual odometry network model based on the photometric loss function for estimating depth and posture. By recalibrating the lighting state of each image frame, the photometric consistency between adjacent image frames is adjusted to improve the continuity and accuracy of depth and posture estimation under lighting changes.
[0009] Preferably, the photometric loss function based on estimated depth and posture is expressed as: In the formula, is the photometric loss function based on estimated depth and pose, is the photometric loss function, is the target image, is the source image back-projected to the target image perspective; It is a structural measurement index, indicating the similarity between two images. The value of SSIM is between 0 and 1. is a constant, ; Represents the norm.
[0010] Preferably, the photometric consistency calibration mechanism is expressed as: In the formula, represents the photometric consistency calibration mechanism; are the luminosity of the target image and the luminosity of the source image respectively; is the intensity of the light source; are respectively the vector from the light source to the scene point in the target image scene and the vector from the light source to the scene point in the source image scene; The vector from the camera center to the light source and the vector from the camera center to the scene point in the target image scene By the same token, The vector from the camera center to the light source and the vector from the camera center to the scene point in the source image scene To make a difference is to obtain; is the surface albedo of the scene, are the surface normal vectors of the corresponding points in the target image and the source image respectively.
[0011] Preferably, the reconstructed photometric loss function is expressed as: In the formula, is the reconstructed photometric loss function, is the photometric loss function, is the target image, is the source image; Automatic masking to block moving objects in the scene; is a mask for shielding points where there are no corresponding points in the source and target images; It is pixel-by-pixel multiplication; is the source image back-projected to the target image perspective.
[0012] Preferably, the loss function based on fusion of self-supervision and supervision is expressed as: In the formula, is the total loss function; is the supervision loss function; is the self-supervised loss function; and They are the L1 losses of depth and pose respectively; is the reconstructed photometric loss function, is the photometric loss function, is the target image, is the source image; is the smoothing loss function; It is the regularization term of the posture estimation subnetwork, which is used to prevent the network from falling into the local optimum; Represents the parameters of the pose estimation network; and are the predicted depth image and posture information, respectively, and and are the true values of the depth image and posture information respectively; is the coefficient of each loss term, respectively .
[0013] The embodiment of the present invention further provides a visual odometer system based on geometric and photometric consistency, which is used to implement the visual odometer method based on geometric and photometric consistency described above, and specifically includes: An image acquisition module, used to acquire intestinal images using a colonoscope, construct a data set, and divide the data set into a training set, a validation set, and a test set in proportion; A network model training module is used to construct a visual odometry network model based on the coupling of depth and attitude estimation, input the image data in the training set into the visual odometry network model, train the visual odometry network model based on a loss function that integrates self-supervision and supervision, and use a validation set to evaluate the model performance to obtain a trained visual odometry network model; The visual odometer network model includes a depth estimation subnetwork and a posture estimation subnetwork, wherein the depth estimation subnetwork adopts a U-Net type encoder-decoder architecture, and the posture estimation subnetwork adopts an encoder-regressor architecture; The depth estimation subnetwork is used to predict corresponding depth images based on the input continuous intestinal image frames; The posture estimation subnetwork is used to estimate relative posture information between consecutive intestinal image frames based on the input consecutive intestinal image frames and the corresponding depth images predicted by the depth estimation subnetwork; The test module is used to input the image data in the test set into the trained visual odometry network model to obtain the depth information of the intestinal image and the posture information of the colonoscope.
[0014] An embodiment of the present invention further provides a colonoscopy robot, which includes the visual odometer system based on geometric and photometric consistency as described above and is used for colonoscopy.
[0015] An embodiment of the present invention also provides an electronic device, comprising a processor, a memory and a bus system, wherein the processor and the memory are connected via the bus system, the memory is used to store instructions, and the processor is used to execute the instructions stored in the memory to implement the above-mentioned visual odometer method based on geometric and photometric consistency.
[0016] An embodiment of the present invention further provides a computer storage medium storing a computer software product. The computer software product includes several instructions for enabling a computer device to execute the above-mentioned visual odometer method based on geometric and photometric consistency.
[0017] It can be seen from the above technical solutions that the present invention has the following beneficial effects: The present invention realizes the simultaneous estimation of the depth information of the intestinal environment and the motion posture information of the colonoscope by constructing a visual odometer network model based on the coupling of depth and posture estimation. First, a deep coupling strategy for depth and posture estimation is designed. The strategy overcomes the influence of low texture on posture estimation by multi-level fusion of depth features and image features from the depth estimation subnetwork on the network structure, and enhances the scale continuity and geometric consistency of posture estimation. In addition, the deep coupling strategy also couples the estimated depth and posture to the constraint network through the photometric loss function based on reprojection, thereby further improving the accuracy of posture estimation. Then, the present invention proposes a photometric consistency calibration mechanism to reconstruct the photometric loss function, and adjusts the photometric consistency between adjacent image frames by recalibrating the illumination state of each image frame to cope with the illumination changes in the intestinal environment. The continuity and accuracy of depth and posture estimation under illumination changes are improved. Finally, the present invention combines self-supervised learning and supervised learning to design a loss function to overcome the drastic illumination changes and weak texture challenges in the intestine. The intestinal visual odometer network model is trained using the designed loss function to improve its robustness and accuracy in complex intestinal environments. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the implementation cases of the present invention or the technical solutions in the prior art, the following is a brief description of the drawings required for use in the embodiments. By referring to the drawings, the features and advantages of the present invention will be more clearly understood. The drawings are schematic and should not be understood as limiting the present invention in any way. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. Among them: Figure 1 A flowchart of a visual odometer method based on geometric and photometric consistency provided in an embodiment; Figure 2 A schematic diagram of a visual odometer network model architecture based on depth and posture estimation coupling constructed by the present invention in an embodiment; Figure 3 Schematic diagram of a traditional visual odometer architecture in an embodiment; Figure 4 A block diagram of a visual odometer system based on geometric and photometric consistency provided in an embodiment. DETAILED DESCRIPTION
[0019] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention. Embodiment 1
[0020] In order to overcome the problems of sparse depth estimation and inaccurate pose estimation in existing methods, as well as the challenges of texture deficiency and unstable lighting in the intestinal environment. Figure 1 As shown, an embodiment of the present invention proposes a visual odometer method based on geometric and photometric consistency, the method comprising: Step S1: using a colonoscope to collect intestinal images, construct a data set, and divide the data set into a training set, a validation set, and a test set in proportion; Step S2: constructing a visual odometry network model based on the coupling of depth and attitude estimation, inputting the image data in the training set into the visual odometry network model, training the visual odometry network model based on a loss function that integrates self-supervision and supervision, and using a validation set to evaluate the model performance to obtain a trained visual odometry network model; Step S3: Input the image data in the test set into the trained visual odometry network model to obtain the depth information of the intestinal image and the posture information of the colonoscope.
[0021] It can be seen from the above technical scheme that the present invention provides a visual odometer method based on geometric and photometric consistency. The method realizes the simultaneous estimation of the depth information of the intestinal environment and the motion posture information of the colonoscope by constructing a visual odometer network model based on the coupling of depth and posture estimation. First, a deep coupling strategy for depth and posture estimation is designed. The strategy overcomes the influence of low texture on posture estimation by multi-level fusion of depth features and image features from the depth estimation subnetwork on the network structure, and enhances the scale continuity and geometric consistency of posture estimation. In addition, the deep coupling strategy also couples the estimated depth and posture to the constraint network through the photometric loss function based on reprojection, thereby further improving the accuracy of posture estimation. Then, the present invention proposes a photometric consistency calibration mechanism to reconstruct the photometric loss function, and adjusts the photometric consistency between adjacent image frames by recalibrating the illumination state of each image frame to cope with the illumination changes in the intestinal environment. The continuity and accuracy of depth and posture estimation under illumination changes are improved. Finally, the present invention combines self-supervised learning and supervised learning to design a loss function to overcome the drastic illumination changes and weak texture challenges in the intestine. The designed loss function is used to train the intestinal visual odometry network model to improve its robustness and accuracy in complex intestinal environments.
[0022] In this embodiment, in step S1, a colonoscope is used to collect intestinal images to construct a data set, and the data set is divided into a training set, a validation set, and a test set in proportion.
[0023] Specifically, a series of intestinal images are captured using a monocular or binocular enteroscope, and the captured images are preprocessed, including denoising, grayscale (if color images are used), and possible image enhancement techniques, to improve the accuracy of feature extraction and matching in subsequent steps.
[0024] In this embodiment, in step S2, a visual odometry network model based on the coupling of depth and attitude estimation is constructed, the image data in the training set is input into the visual odometry network model, the visual odometry network model is trained based on a loss function that integrates self-supervision and supervision, and the validation set is used to evaluate the model performance to obtain a trained visual odometry network model.
[0025] Specifically, a visual odometry network model based on the coupling of depth and pose estimation is constructed, such as Figure 2 As shown in the figure. The visual odometry network model includes a depth estimation subnetwork and a posture estimation subnetwork. The depth estimation subnetwork adopts a U-Net encoder-decoder architecture, and the posture estimation subnetwork adopts an encoder-regressor architecture. The depth estimation subnetwork is used to predict the corresponding depth image based on the input continuous intestinal image frames; the posture estimation subnetwork is used to estimate the relative posture information between continuous intestinal image frames based on the input continuous intestinal image frames and the corresponding depth image predicted by the depth estimation subnetwork.
[0026] Furthermore, the visual odometer proposed in the present invention uses monocular colonoscopy video data to jointly train two depth estimation subnetworks and posture estimation subnetworks. Given two consecutive intestinal image frames at time t and t+1, the dimensions are First, the depth estimation subnetwork generates corresponding dense depth images for consecutive image frames , the dimension is Then, the predicted depth image and the image are concatenated in the channel layer and input into the posture estimation subnetwork to estimate the relative posture information of 6 degrees of freedom between consecutive image frames, and expressed as the transformation matrix .
[0027] In traditional visual odometry, the depth estimation subnetwork and the pose estimation subnetwork often adopt independent parallel architectures, such as Figure 3As shown. On the one hand, under such a network structure, the depth estimation and attitude estimation subnetworks can only rely on a single image input for depth and attitude prediction, and the intestinal image texture features are severely lacking, which will affect the prediction accuracy of the visual odometer. On the other hand, the accuracy of the depth estimation will be affected by the inaccurate attitude estimation results, resulting in inconsistent depth scales of consecutive frames. Therefore, considering that the depth estimation task and the attitude estimation task themselves are interdependent and related, the present invention constructs a visual odometer network model based on the coupling of depth and attitude estimation. First, unlike the traditional parallel dual-stream structure that only uses a single image input for attitude estimation, the attitude estimation subnetwork of the present invention simultaneously uses the inferred depth of the depth estimation subnetwork and the corresponding image as input. In the attitude estimation subnetwork structure, the present invention uses a dual-stream structure based on ResNet-18. The dual-stream structure only shares weights except the batch normalization layer, thereby ensuring that the features before normalization are in the same feature space, so that subsequent features can be complementary and exchanged. In the encoder part of the attitude estimation subnetwork, the present invention adopts a multi-layer incremental fusion strategy to fuse the extracted cross-modal features. In order to preserve the complementary features between the image and depth modalities, the present invention uses a channel exchange strategy to exchange important feature elements at each feature fusion stage, which can be expressed as: In the formula, Features extracted by the encoder in U-Net; It is a feature exchange layer that ensures that cross-modal features are in the same variable space; They are the fused depth features and posture features respectively; is the activation function; is convolution; is the input RGB image; and They are the predicted depth image and posture information respectively; is the pose estimation network.
[0028] The depth coupling strategy of depth and attitude estimation designed by the present invention can effectively improve the overall geometric consistency of the visual odometer, that is, the depth between consecutive frames changes smoothly without severe jitter.
[0029] Furthermore, in order to cope with the lighting changes in the intestinal environment, a photometric consistency calibration mechanism is proposed to reconstruct the photometric loss function in the visual odometry network model based on the photometric loss function for estimating depth and posture. By recalibrating the lighting state of each image frame, the photometric consistency between adjacent image frames is adjusted to improve the continuity and accuracy of depth and posture estimation under lighting changes.
[0030] Specifically, the deep coupling of the depth and pose estimation subnetworks enhances the geometric consistency between consecutive frames at the network structure level. In terms of loss function, deep learning-based visual odometry usually minimizes the loss function based on the estimated depth. and posture The photometric loss function of the present invention trains the network to ensure the photometric consistency between consecutive frames. The photometric loss function of the present invention includes an image similarity error term and an image pixel-level error term, which is expressed as: In the formula, is the photometric loss function based on estimated depth and pose, is the photometric loss function, is the target image, is the source image back-projected to the target image perspective; It is a structural measurement index, indicating the similarity between two images. The value of SSIM is between 0 and 1. is a constant, and this embodiment defines ; Represents the norm.
[0031] Since the classic visual odometry system assumes that the absolute position of the light source in the global environment is fixed, the synthetic image With the target image The image has consistent pixel brightness. However, during colonoscopy, the light source moves with the colonoscope, resulting in changes in the photometric value of the same spatial position between consecutive frames. Therefore, even if the depth and pose estimates are completely correct, and There are still some differences between them, which is not conducive to the neural network constraining the colonoscope visual odometer through the loss function. In order to solve the problem of inconsistent photometry, the present invention proposes a photometry consistency calibration mechanism.
[0032] This mechanism defines the brightness ratio of light reflected from the intestinal surface at the same spatial point at continuous times t and s: In the formula, represents the photometric consistency calibration mechanism; are the luminosity of the target image and the luminosity of the source image respectively; is the intensity of the light source; are respectively the vector from the light source to the scene point in the target image scene and the vector from the light source to the scene point in the source image scene; The vector from the camera center to the light source and the vector from the camera center to the scene point in the target image scene By the same token, The vector from the camera center to the light source and the vector from the camera center to the scene point in the source image scene To make a difference is to obtain; is the surface albedo of the scene, are the surface normal vectors of the corresponding points in the target image and the source image respectively.
[0033] Through LCC, the present invention recalibrates the brightness values of adjacent image frames in the colonoscopy video and aligns the intestinal video frames originally captured under different lighting conditions to a unified lighting condition, thereby ensuring the lighting consistency between frames. Based on the photometric consistency calibration mechanism, the present invention reconstructs the photometric loss function in the visual odometer , to further improve the accuracy of depth and pose estimation.
[0034] In the intestinal environment, the irregular movement of the intestinal wall and the reflected light of the tissue fluid on the surface of the intestine violate the Lambertian reflection assumption. The present invention further uses automatic masking based on the reconstructed photometric loss function. and timing mask The automatic mask removes pixels that do not meet the photometric consistency assumption, while the temporal mask removes pixels that have no corresponding matches between the previous frame and the next frame. The final photometric loss is shown in formula (5): In the formula, is the reconstructed photometric loss function, is the photometric loss function, is the target image, is the source image; Automatic masking to block moving objects in the scene; is a mask for shielding points where there are no corresponding points in the source and target images; It is pixel-by-pixel multiplication; is the source image back-projected to the target image perspective.
[0035] Furthermore, in order to overcome the challenges of drastic lighting changes and weak textures in the intestine, the present invention designs a loss function that integrates self-supervision and supervision to train the intestinal visual odometry network model to improve its robustness and accuracy in complex intestinal environments.
[0036] Specifically, the self-supervised loss function is based on the photometric loss function, as shown in formula (3), which constrains the difference between the synthetic colonoscopy image and the target image by minimizing the difference to learn the depth and posture information. The self-supervised loss function is easily affected by the changes in the light source and the lack of texture in the intestinal environment, so the present invention also combines the supervised loss. The Euclidean distance between the results predicted by the network model and the true label based on the supervised loss function is further constrained. The real depth image and posture label can be obtained through the CT three-dimensional model and the advanced sensor of OptiTrack Prime. The total loss function includes the supervised loss function and the self-supervised loss function , the specific formula is as follows: In the formula, is the total loss function; is the supervision loss function; is the self-supervised loss function; and They are the L1 losses of depth and pose respectively; is the reconstructed photometric loss function, is the photometric loss function, is the target image, is the source image; is the smoothing loss function; It is the regularization term of the posture estimation subnetwork, which is used to prevent the network from falling into the local optimum; Represents the parameters of the pose estimation network; and are the predicted depth image and posture information, respectively, and and are the true values of the depth image and posture information respectively; is the coefficient of each loss term, respectively .
[0037] In this embodiment, in step S3, the image data in the test set is input into the trained visual odometry network model to obtain the depth information of the intestinal image and the 6-DOF posture information of the colonoscope. Embodiment 2
[0038] like Figure 4 As shown, the present invention provides a visual odometer system based on geometric and photometric consistency, which is used to implement the visual odometer method based on geometric and photometric consistency of the above-mentioned embodiment 1, and specifically includes: An image acquisition module 100 is used to acquire intestinal images using a colonoscope, construct a data set, and divide the data set into a training set, a validation set, and a test set in proportion; The network model training module 200 is used to construct a visual odometry network model based on the coupling of depth and attitude estimation, input the image data in the training set into the visual odometry network model, train the visual odometry network model based on the loss function of fusion self-supervision and supervision, and use the validation set to evaluate the model performance to obtain a trained visual odometry network model; The visual odometer network model includes a depth estimation subnetwork and a posture estimation subnetwork, wherein the depth estimation subnetwork adopts a U-Net type encoder-decoder architecture, and the posture estimation subnetwork adopts an encoder-regressor architecture; The depth estimation subnetwork is used to predict corresponding depth images based on the input continuous intestinal image frames; The posture estimation subnetwork is used to estimate relative posture information between consecutive intestinal image frames based on the input consecutive intestinal image frames and the corresponding depth images predicted by the depth estimation subnetwork; The testing module 300 is used to input the image data in the test set into the trained visual odometer network model to obtain the depth information of the intestinal image and the posture information of the colonoscope.
[0039] A visual odometer system based on geometric and photometric consistency in this embodiment is used to implement the aforementioned visual odometer method based on geometric and photometric consistency. Therefore, the specific implementation method in the visual odometer system based on geometric and photometric consistency can be seen in the embodiment part of the visual odometer method based on geometric and photometric consistency in the previous text. For example, the image acquisition module 100, the network model training module 200, and the testing module 300 are respectively used to implement steps S1, S2, and S3 in the above-mentioned visual odometer method based on geometric and photometric consistency. Therefore, its specific implementation method can refer to the description of the corresponding embodiments of each part. In order to avoid redundancy, it will not be repeated here. Embodiment 3
[0040] The embodiment of the present invention provides a colonoscopy robot, which includes the above-mentioned visual odometer system based on geometric and photometric consistency, and is used for colonoscopy. The above-mentioned system includes an image acquisition module 100, a network model training module 200, and a testing module 300. The specific implementation method thereof can refer to the description of the corresponding embodiments of each part in the first embodiment, and in order to avoid redundancy, it will not be repeated here. Embodiment 4
[0041] An embodiment of the present invention provides an electronic device, which includes a processor, a memory and a bus system, wherein the processor and the memory are connected through the bus system, the memory is used to store instructions, and the processor is used to execute the instructions stored in the memory to implement the above-mentioned visual odometer method based on geometric and photometric consistency. Embodiment 5
[0042] An embodiment of the present invention provides a computer storage medium, which stores a computer software product. The computer software product includes several instructions for enabling a computer device to execute the above-mentioned visual odometer method based on geometric and photometric consistency.
[0043] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0044] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0045] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide for implementing the process in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0046] Obviously, the above embodiments are merely examples for clear explanation and are not intended to limit the implementation methods. For those skilled in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the implementation methods here. The obvious changes or modifications derived from these are still within the protection scope of the invention.
Claims
1. A visual odometry method based on geometric and photometric consistency, characterized in that: include: Using a colonoscope to collect intestinal images, construct a data set, and divide the data set into a training set, a validation set, and a test set in proportion; Construct a visual odometry network model based on the coupling of depth and attitude estimation, input the image data in the training set into the visual odometry network model, train the visual odometry network model based on the loss function integrating self-supervision and supervision, use the validation set to evaluate the model performance, and obtain a trained visual odometry network model; The visual odometer network model includes a depth estimation subnetwork and a posture estimation subnetwork, wherein the depth estimation subnetwork adopts a U-Net type encoder-decoder architecture, and the posture estimation subnetwork adopts an encoder-regressor architecture; The depth estimation subnetwork is used to predict corresponding depth images based on the input continuous intestinal image frames; The posture estimation subnetwork is used to estimate relative posture information between consecutive intestinal image frames based on the input consecutive intestinal image frames and the corresponding depth images predicted by the depth estimation subnetwork; The image data in the test set is input into the trained visual odometry network model to obtain the depth information of the intestinal image and the posture information of the colonoscope.
2. The visual odometer method based on geometric and photometric consistency according to claim 1, characterized in that: The pose estimation subnetwork adopts an encoder-regressor architecture. In the encoder part of the pose estimation subnetwork, a multi-layer incremental fusion strategy is used to fuse the extracted cross-modal features, which is expressed as: In the formula, Features extracted by the encoder in U-Net; It is a feature exchange layer that ensures that cross-modal features are in the same variable space; They are the fused depth features and posture features respectively; is the activation function; is convolution; is the input RGB image; and They are the predicted depth image and posture information respectively; is the pose estimation network.
3. The visual odometer method based on geometric and photometric consistency according to claim 1, characterized in that: The method for constructing a visual odometer network model based on depth and posture estimation coupling includes: In order to cope with the lighting changes in the intestinal environment, a photometric consistency calibration mechanism is proposed to reconstruct the photometric loss function in the visual odometry network model based on the photometric loss function for estimating depth and posture. By recalibrating the lighting state of each image frame, the photometric consistency between adjacent image frames is adjusted to improve the continuity and accuracy of depth and posture estimation under lighting changes.
4. The visual odometer method based on geometric and photometric consistency according to claim 3, characterized in that: The photometric loss function based on estimated depth and posture is expressed as: In the formula, is the photometric loss function based on estimated depth and pose, is the photometric loss function, is the target image, is the source image back-projected to the target image perspective; It is a structural measurement index, indicating the similarity between two images. The value of SSIM is between 0 and 1. is a constant, ; Represents the norm.
5. The visual odometer method based on geometric and photometric consistency according to claim 4, characterized in that: The photometric consistency calibration mechanism is expressed as: In the formula, represents the photometric consistency calibration mechanism; are the luminosity of the target image and the luminosity of the source image respectively; is the intensity of the light source; are respectively the vector from the light source to the scene point in the target image scene and the vector from the light source to the scene point in the source image scene; The vector from the camera center to the light source and the vector from the camera center to the scene point in the target image scene By the same token, The vector from the camera center to the light source and the vector from the camera center to the scene point in the source image scene To make a difference is to obtain; is the surface albedo of the scene, are the surface normal vectors of the corresponding points in the target image and the source image respectively.
6. The visual odometer method based on geometric and photometric consistency according to claim 5, characterized in that: The reconstructed photometric loss function is expressed as: In the formula, is the reconstructed photometric loss function, is the photometric loss function, is the target image, is the source image; Automatic masking to block moving objects in the scene; is a mask for shielding points where there are no corresponding points in the source and target images; It is pixel-by-pixel multiplication; is the source image back-projected to the target image perspective.
7. The visual odometer method based on geometric and photometric consistency according to claim 1, characterized in that: The loss function based on fusion of self-supervision and supervision is expressed as: In the formula, is the total loss function; is the supervision loss function; is the self-supervised loss function; and They are the L1 losses of depth and pose respectively; is the reconstructed photometric loss function, is the photometric loss function, is the target image, is the source image; is the smoothing loss function; It is the regularization term of the posture estimation subnetwork, which is used to prevent the network from falling into the local optimum; Represents the parameters of the pose estimation network; and are the predicted depth image and posture information, respectively, and and are the true values of the depth image and posture information respectively; is the coefficient of each loss term, respectively .
8. A visual odometry system based on geometric and photometric consistency, characterized in that: The system is used to implement the visual odometer method based on geometric and photometric consistency according to any one of claims 1 to 7, and specifically includes: An image acquisition module, used to acquire intestinal images using a colonoscope, construct a data set, and divide the data set into a training set, a validation set, and a test set in proportion; A network model training module is used to construct a visual odometry network model based on the coupling of depth and attitude estimation, input the image data in the training set into the visual odometry network model, train the visual odometry network model based on a loss function that integrates self-supervision and supervision, and use a validation set to evaluate the model performance to obtain a trained visual odometry network model; The visual odometer network model includes a depth estimation subnetwork and a posture estimation subnetwork, wherein the depth estimation subnetwork adopts a U-Net type encoder-decoder architecture, and the posture estimation subnetwork adopts an encoder-regressor architecture; The depth estimation subnetwork is used to predict corresponding depth images based on the input continuous intestinal image frames; The posture estimation subnetwork is used to estimate relative posture information between consecutive intestinal image frames based on the input consecutive intestinal image frames and the corresponding depth images predicted by the depth estimation subnetwork; The test module is used to input the image data in the test set into the trained visual odometry network model to obtain the depth information of the intestinal image and the posture information of the colonoscope.
9. A colonoscopy robot, characterized in that: The colonoscopy robot includes the visual odometer system based on geometric and photometric consistency as described in claim 8, and is used for colonoscopy.
10. An electronic device, characterized in that: The electronic device includes a processor, a memory and a bus system, the processor and the memory are connected through the bus system, the memory is used to store instructions, and the processor is used to execute the instructions stored in the memory to implement the visual odometer method based on geometric and photometric consistency as described in any one of claims 1 to 7.
11. A computer storage medium, characterized in that: The computer storage medium stores a computer software product, and the computer software product includes several instructions for enabling a computer device to execute the visual odometer method based on geometric and photometric consistency as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Intestinal wall reconstruction method combining monocular dense SLAM and residual network
CN116452752A
Deep Virtual Stereo Odometry
US20190387209A1
Cited By
Hip joint image enhancement processing method based on deep learning
CN119863387A
A deep learning-based hip joint image enhancement processing method
CN119863387B
