A lightweight endoscopic depth estimation method and system utilizing prior geometric model
By constructing and fine-tuning a teacher model, and combining ternary knowledge distillation and semantic distribution alignment, the problem of high computational overhead in endoscopic depth estimation is solved, achieving lightweight and efficient depth estimation and improving estimation accuracy and detail recovery capabilities.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHANDONG UNIV
- Filing Date
- 2026-02-06
- Publication Date
- 2026-05-26
AI Technical Summary
Existing geometric models have high computational costs and large parameter scales in endoscopic depth estimation, making them difficult to apply in surgery.
By constructing and fine-tuning the geometric foundation model of the teacher model, combining ternary knowledge distillation (spatial domain, spectral domain, and gradient domain) to transfer geometric prior knowledge to the student model, and introducing a semantic distribution alignment mechanism, a total loss function is constructed for self-supervised training, thereby reducing model parameters and computational cost.
It achieves improved performance of endoscopic depth estimation while reducing computational load and parameter size, accurately and efficiently capturing subtle depth changes and restoring details, and alleviating the problem of pseudo-texture artifacts.
Smart Images

Figure CN122089802A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of monocular depth estimation technology, and more specifically to a lightweight endoscopic depth estimation method and system that utilizes prior geometric model. Background Technology
[0002] Minimally invasive surgery (MIS) using endoscopic techniques offers significant advantages over traditional open surgery, including reduced blood loss, shorter postoperative recovery time, and lower complication rates. To alleviate cognitive burden during surgery, researchers have developed augmented reality (AR) navigation systems, whose performance heavily relies on high-fidelity 3D anatomical reconstruction. Monocular depth estimation techniques can serve as a key component in mainstream reconstruction procedures. Continued advancements in learning-based endoscopic depth estimation techniques highlight the effectiveness of self-supervised methods that eliminate the reliance on expensive hardware sensors for acquiring training depth labels.
[0003] Geometric foundational models (GEMs) have rapidly emerged, driven by large-scale data training, demonstrating powerful performance and cross-scenario generalization capabilities. Existing GEMs train expert models on labeled data and utilize them to generate pseudo-labels for massive amounts of unlabeled images. These pseudo-labeled samples are used to assist the training of models with the same architecture, exposing them to a wider range of visual data distributions. Despite their excellent performance, these models are typically accompanied by significant computational overhead and a large parameter scale, posing a major obstacle to subsequent surgical applications. Therefore, how to provide a lightweight endoscopic depth estimation method and system that utilizes the prior knowledge of geometric foundational models is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0004] In view of this, the present invention provides a lightweight endoscopic depth estimation method and system that utilizes prior geometric models. By extracting multi-dimensional geometric priors from the geometric models and introducing a semantic distribution alignment mechanism, the method achieves better depth estimation performance while significantly reducing model parameters and computational load.
[0005] To achieve the above objectives, the present invention provides the following technical solution: A lightweight endoscopic depth estimation method utilizing prior geometric models includes the following steps: S1. Construct a geometric basis model as the teacher model and fine-tune it to adapt the geometric basis model to the imaging characteristics of the endoscope. S2. Construct a deep estimation network as a student model; S3. The geometric prior knowledge encoded in the teacher model is transferred to the student model through ternary knowledge distillation, which includes spatial domain distillation, spectral domain distillation and gradient domain distillation. S4. Using the semantic features extracted by the pre-trained semantic encoder, guide and align the intermediate features of the deep estimation network to suppress pseudo-texture artifacts. S5. Construct a total loss function to perform self-supervised end-to-end training on the depth estimation network. The total loss function includes photometric loss, spatial domain distillation loss, spectral domain distillation loss, gradient domain distillation loss, disparity plane segmentation loss, and semantic distribution alignment loss. S6. Perform endoscopic depth estimation based on the trained depth estimation network.
[0006] Optionally, the fine-tuning in S1 specifically involves: using a strategy based on dynamic vector low-rank adaptation to fine-tune the geometric basis model pre-trained on a large-scale natural scene dataset; employing a multi-scale depth prediction strategy during the fine-tuning process to predict depth at multiple resolutions using a single decoder.
[0007] Optionally, spatial domain distillation in S3 specifically involves calculating the spatial domain regression loss between the underlying geometric model and the depth map output by the depth estimation network. : ; In the formula, The total number of pixels in the input image. To produce a depth map output by the depth estimation network. The depth map is output from the base geometry model; disparity plane segmentation is performed, quantizing the continuous depth values predicted by the base geometry model onto K predefined, linearly spaced parallax planes to generate hard labels. ; In the formula, For the disparity plane value of a pixel, For pixels in the disparity map The actual parallax value, The depth map output by the depth estimation network is transformed into a probability distribution on K disparity planes; the cross-entropy loss between the probability distribution and the hard label is calculated as the disparity plane segmentation loss. : ; In the formula, As a hard label, It represents a probability distribution.
[0008] Optionally, the spectral domain distillation in S3 specifically involves: processing the depth maps output by the basic geometric model and the depth estimation network, respectively. and A discrete Fourier transform is performed to obtain the spectral representation. The spectrum is divided into low-frequency, mid-frequency, and high-frequency bands. The differences in spectral characteristics between the basic geometric model and the deep estimation network in the corresponding bands are calculated, and the weighted summation is used to obtain the spectral distillation loss. : ; In the formula, Represents frequency band The bandpass filter, where B ={low, medium, high}, It is a learnable spectral weight. To deeply estimate the spectral characteristics of the network in the frequency band, It is the spectral characteristics of the basic geometric model in the frequency band.
[0009] Optionally, gradient domain distillation in S3 specifically involves calculating the depth maps output by the base geometric model and the depth estimation network, respectively. and Gradient maps in the horizontal and vertical directions; calculate the difference between the gradient maps of the two models in the corresponding directions to obtain the gradient distillation loss. : ; In the formula, Indicates the direction of calculation The gradient plot on.
[0010] Optionally, spectral domain distillation and gradient domain distillation also include patch-enlarged distillation, which involves randomly cropping and locally enlarging a local region of the input image, calculating the spectral distillation loss and gradient distillation loss only within the enlarged region, and enhancing the detail constraints on information-rich regions.
[0011] Optionally, S4 specifically involves: using a pre-trained DINOv2 model as a semantic encoder to extract semantic prior features from the input endoscopic image; using a Mamba-based projector to map the semantic prior features to the intermediate feature space of the depth estimation network; normalizing the mapped semantic features and the features extracted by the depth estimation network along the channel dimension to obtain the corresponding semantic distributions; and calculating the KL divergence between the two semantic distributions as the semantic distribution alignment loss. : ; In the formula, To represent the KL divergence between inputs, For the mapped semantic features, To deeply estimate the features extracted by the network, for semantic distribution for The semantic distribution.
[0012] Optional, the total loss function in S5 Specifically: ; In the formula, For luminance loss, For spatial domain regression loss, For spectral domain distillation loss, For gradient domain distillation loss, For disparity plane segmentation loss, For semantic distribution alignment loss, , , , , This is the loss weight.
[0013] Optionally, the photometric loss is specifically as follows: ; In the formula, For structural similarity, For balance coefficient, For the target frame, This is a composite frame.
[0014] A lightweight endoscopic depth estimation system utilizing a geometrically based model prior, applying the aforementioned lightweight endoscopic depth estimation method utilizing a geometrically based model prior, includes: The basic geometric model, as a teacher model, is used to provide depth predictions with rich geometric priors, finely tuned from endoscopic data. The depth estimation network, as a student model, consists of the lightweight DepthNet and PoseNet. DepthNet is responsible for depth prediction, and PoseNet is responsible for camera pose estimation. The ternary distillation module is used to perform knowledge distillation in the spatial domain, spectral domain, and gradient domain, transferring the prior knowledge of the basic geometric model to the deep estimation network; The semantic alignment module uses the semantic features extracted by the pre-trained semantic encoder to align the distribution of the intermediate features of the deep estimation network. The training module is used for self-supervised end-to-end training of the depth estimation network.
[0015] As can be seen from the above technical solutions, compared with the prior art, this invention provides a lightweight endoscopic depth estimation method and system utilizing geometric foundation model priors, which has the following beneficial effects: This invention proposes a ternary distillation scheme, which utilizes the rich geometric prior information in the foundation model to achieve accurate and efficient lightweight endoscopic depth estimation. Spatial domain distillation effectively transmits generalized geometric cues by combining traditional regression and disparity plane segmentation techniques; spectral domain distillation uses discrete Fourier transform to convert depth priors into spectral representations, thereby extracting high-frequency cues to achieve the restoration of fine depth details; gradient domain distillation utilizes the inherent sensitivity of depth gradients to structural edges and surface curvature, enabling the model to more accurately capture subtle depth changes; a block magnification distillation strategy is developed, which enhances the information regions in the spectral and gradient domains by randomly cropping and locally magnifying local image blocks; and a semantic distribution alignment module is designed to alleviate the problem of pseudo-texture artifacts. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0017] Figure 1 This is a flowchart of the lightweight endoscopic depth estimation method of the present invention; Figure 2 This is a three-dimensional schematic diagram of the plane-separating plane in the planar scanning of the present invention; Figure 3 This is a visual schematic diagram of the spectral distillation effect of the present invention; Figure 4 This is a visual diagram of the gradient direction in the depth prediction results of this invention; Figure 5 This is a schematic diagram illustrating the enlarged distillation effect of the patch in this invention; Figure 6 This is a schematic diagram illustrating the semantic distribution alignment effect of the present invention. Detailed Implementation
[0018] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0019] This invention discloses a lightweight endoscopic depth estimation method utilizing prior geometric models, such as... Figure 1 As shown, it includes the following steps: S1. Construct a geometric basis model as the teacher model and fine-tune it to adapt the geometric basis model to the imaging characteristics of the endoscope. S2. Construct a deep estimation network as a student model; S3. The geometric prior knowledge encoded in the teacher model is transferred to the student model through ternary knowledge distillation, which includes spatial domain distillation, spectral domain distillation and gradient domain distillation. S4. Using the semantic features extracted by the pre-trained semantic encoder, guide and align the intermediate features of the deep estimation network to suppress pseudo-texture artifacts. S5. Construct a total loss function to perform self-supervised end-to-end training on the depth estimation network. The total loss function includes photometric loss, spatial domain distillation loss, spectral domain distillation loss, gradient domain distillation loss, disparity plane segmentation loss, and semantic distribution alignment loss. S6. Perform endoscopic depth estimation based on the trained depth estimation network.
[0020] Furthermore, the fine-tuning in S1 specifically involves using a dynamic vector low-rank adaptive strategy to fine-tune the geometric foundation model pre-trained on a large-scale natural scene dataset. This is achieved by integrating the low-rank matrix into the multilayer perceptron (MLP) layer while keeping the pre-trained weights frozen, thereby significantly reducing the number of trainable parameters. During the fine-tuning process, a multi-scale depth prediction strategy is employed, predicting depth at multiple resolutions through a single decoder and progressively optimizing the prediction results. These adjustments enable the geometric foundation model to better adapt to the characteristics of endoscopic imaging.
[0021] In this embodiment of the invention, the geometric foundation model for the teacher model is Depth Anything, and the depth estimation network for the student model comprises two sub-networks: DepthNet and PoseNet. DepthNet is based on an improvement on Lite-Mono, and its supervision is achieved through deformation-based view synthesis. Given the pixel-wise depth of the target frame, pixels are back-projected into 3D space using known camera intrinsics. Based on the estimated self-motion, the 3D points are then projected onto the source image coordinates. For the target frame... and source frame ,in Representing pixels, view composition can be described as follows: ; In the formula, and These are the homogeneous pixel coordinates in the source view and the target view, respectively. It is the camera's eigenvalue matrix. From t arrive sThe body's movement, It is the depth map of the target frame. t and s The rigid flow between them is given by the following formula: ; frame Synthesized through differentiable reversible deformation operations (space transformers). and The differences in appearance between them supervise the entire training process.
[0022] In this embodiment of the invention, ternary knowledge distillation maximizes the knowledge transfer from the expert model to the student model by refining geometric prior knowledge. Since mutual information terms are difficult to handle, the maximization of mutual information consistency is approximately achieved by minimizing the prediction differences among the three domains. ; In the formula, These are the learnable parameters for lightweight models. According to expert predictions, For students, Represents a set of spatial, spectral, and gradient domains. It maps the model output to the domain. The transformation function, and The difference between expert predictions and student predictions in the corresponding domain is measured by a set of domain-specific loss functions, namely the spatial domain, spectral domain, and gradient domain loss functions in this embodiment.
[0023] Furthermore, the spatial domain distillation in S3 specifically involves: firstly, penalizing the depth regression disparity between the depth estimation network and the underlying geometric model, and then calculating the spatial domain regression loss between the depth map output by the underlying geometric model and the depth estimation network. : ; In the formula, The total number of pixels in the input image. To produce a depth map output by the depth estimation network. The depth map is output from the basic geometric model; disparity plane segmentation is performed, dividing the disparity range into equidistant planes to align the model's prediction plane with the prediction plane of the basic geometric model, thereby obtaining additional structural guidance from the basic geometric model. Since the actual disparity is unknown, it is approximated by quantizing the predicted depth onto predefined disparity planes, assigning each pixel to the nearest plane, and quantizing the continuous depth values predicted by the basic geometric model onto K predefined, linearly spaced parallel disparity planes, such as... Figure 2 As shown, generate hard tags: ; In the formula, For the disparity plane value of a pixel, For pixels in the disparity map The actual parallax value, The depth map output by the depth estimation network is transformed into a probability distribution on K disparity planes; the cross-entropy loss between the probability distribution and the hard label is calculated as the disparity plane segmentation loss. : ; In the formula, As a hard label, For probability distribution, using The model can effectively guide depth estimation, keeping it within a reasonable range and avoiding large errors.
[0024] In this embodiment, the formula for calculating the representative value of each plane is as follows: ;
[0025] In the formula, and Set to 0 and 1 respectively, unlike direct partitioning in depth space, partitioning in disparity space benefits from the known boundaries imposed by the sigmoid activation function, while depth space suffers from scale ambiguity; pixels in the disparity map Actual parallax value Represented as: ; In the formula, It is the disparity plane value of the pixel. yes and The residuals between the two values are used to determine the optimal disparity plane assignment for each pixel by minimizing the geometric observation residuals. For each pixel, the continuous depth values predicted by the expert model are quantized onto the disparity plane, denoted as . To provide effective supervision for the depth estimation model, a PlanePred head is introduced, which transforms pixel-level continuous depth prediction into probability distributions on K predefined disparity planes. Then, the predicted distribution is calculated and compared with that of... Cross-entropy loss between defined hard labels.
[0026] Furthermore, the spectral domain distillation in S3 specifically involves: processing the depth maps output by the basic geometric model and the depth estimation network, respectively. and A discrete Fourier transform is performed to obtain the spectral representation. The spectrum is divided into low-frequency, mid-frequency, and high-frequency bands. The differences in spectral characteristics between the basic geometric model and the deep estimation network in the corresponding bands are calculated, and the weighted summation is used to obtain the spectral distillation loss. : ; In the formula, Represents frequency band The bandpass filter, where B ={low, medium, high}, It is a learnable spectral weight. To deeply estimate the spectral characteristics of the network in the frequency band, Based on the spectral characteristics of the basic geometric model in the frequency band, high-frequency prior information from the expert model is transferred to a lightweight estimator. By coordinating its frequency domain representation, the model can capture high-frequency features to achieve detail recovery, thereby significantly improving model performance. Figure 3 As shown, from left to right, the models are the original input, the expert model, the model without spectral domain distillation, and the model with spectral domain distillation. Compared with the model without this module, the model enhances the ability to capture high-frequency cues, thereby improving the detail recovery effect.
[0027] Furthermore, gradient domain distillation in S3 specifically involves calculating the depth maps output by the basic geometric model and the depth estimation network, respectively. and Gradient maps in the horizontal and vertical directions; calculate the difference between the gradient maps of the two models in the corresponding directions to obtain the gradient distillation loss. : ; In the formula, Indicates the direction of calculation The gradient map above utilizes the sensitivity of depth gradients to contours and curvature. By aligning the gradient domain representation of the model with the representation of the geometric basis model, the model can more accurately capture structural cues and directional depth variation patterns. Gradient domain distillation technology enables the model to capture expert-oriented depth variation patterns, thereby effectively reducing directional errors in depth prediction. Figure 4 As shown, from left to right, the images represent the input image, the expert model, the model without gradient domain distillation, and the model with gradient domain distillation. The smoother the color tone, the more consistent the direction and the clearer the structure. The higher the brightness, the stronger the edge.
[0028] Furthermore, spectral domain distillation and gradient domain distillation also include patch-enlarged distillation, which involves randomly cropping and locally enlarging a local region of the input image, and calculating the spectral distillation loss and gradient distillation loss only within the enlarged region to enhance the detail constraints on information-rich regions.
[0029] In this embodiment, let This represents a magnified region randomly sampled from an image using a sampling operator. The underlying geometric model and depth estimation network represent the region. The predictions are denoted as follows: and The final focus loss in the spectral and gradient domains is defined as: ; ; In this way, the structured perception capabilities of the geometric foundation model are precisely injected into resource-constrained networks, focusing on restoring fine-scale depth details and directional geometric variations, while reducing the risk of over-smoothing in uniform regions. For example... Figure 5 As shown, from left to right, the images are the original input image, the unpatched magnified distillation, and the patched magnified distillation. Compared to the model without this feature enabled, this module can capture more subtle details.
[0030] Furthermore, S4 specifically involves: using a pre-trained DINOv2 model as a semantic encoder to extract semantic prior features from the input endoscopic image; to overcome the limitation of shallow mappings (such as MLPs) in modeling long-range dependencies, a Mamba-based projector is used to map the semantic prior features to the intermediate feature space of the depth estimation network; the mapped semantic features and the features extracted by the depth estimation network are normalized along the channel dimension to obtain the corresponding semantic distributions; and the KL divergence between the two semantic distributions is calculated as the semantic distribution alignment loss. : ; In the formula, To represent the KL divergence between inputs, For the mapped semantic features, To deeply estimate the features extracted by the network, for semantic distribution for The semantic distribution.
[0031] In this embodiment of the invention, for a given RGB image I Its semantic prior features are The features extracted by the student encoder are Since the two representations exist in different spaces, a feature space mapping function needs to be introduced. , making To ensure that the mapping features are consistent with... The spatial distribution matches well, and the mapping process is defined as minimizing the following spatial transformation error: ; In the formula, where express T The learnable parameters; the formula for the Mamba projector is: .
[0032] like Figure 6 As shown, from left to right, the images are the original input image, without semantic distribution alignment, and with semantic distribution alignment.
[0033] Furthermore, the total loss function in S5 Specifically: ; In the formula, For luminance loss, For spatial domain regression loss, For spectral domain distillation loss, For gradient domain distillation loss, For disparity plane segmentation loss, For semantic distribution alignment loss, , , , , This is the loss weight.
[0034] Furthermore, the specific luminosity loss is as follows: ; In the formula, For structural similarity, For balance coefficient, For the target frame, This is a composite frame.
[0035] and Figure 1 Corresponding to the method described above, this invention also discloses a lightweight endoscopic depth estimation system utilizing a geometrical foundation model prior. Applying the aforementioned lightweight endoscopic depth estimation method utilizing a geometrical foundation model prior includes: The basic geometric model, as a teacher model, is used to provide depth predictions with rich geometric priors, finely tuned from endoscopic data. The depth estimation network, as a student model, consists of the lightweight DepthNet and PoseNet. DepthNet is responsible for depth prediction, and PoseNet is responsible for camera pose estimation. The ternary distillation module is used to perform knowledge distillation in the spatial domain, spectral domain, and gradient domain, transferring the prior knowledge of the basic geometric model to the deep estimation network; The semantic alignment module uses the semantic features extracted by the pre-trained semantic encoder to align the distribution of the intermediate features of the deep estimation network. The training module is used for self-supervised end-to-end training of the depth estimation network.
[0036] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the systems disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple; relevant parts can be referred to the method section.
[0037] Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. An endoscopic light-weight depth estimation method with geometric prior of basis model, characterized in that, Includes the following steps: S1. Construct a geometric basis model as the teacher model and fine-tune it to adapt the geometric basis model to the imaging characteristics of the endoscope. S2. Construct a deep estimation network as a student model; S3. The geometric prior knowledge encoded in the teacher model is transferred to the student model through ternary knowledge distillation, which includes spatial domain distillation, spectral domain distillation and gradient domain distillation. S4. Using the semantic features extracted by the pre-trained semantic encoder, guide and align the intermediate features of the deep estimation network to suppress pseudo-texture artifacts. S5. Construct a total loss function to perform self-supervised end-to-end training on the depth estimation network. The total loss function includes photometric loss, spatial domain distillation loss, spectral domain distillation loss, gradient domain distillation loss, disparity plane segmentation loss, and semantic distribution alignment loss. S6. Perform endoscopic depth estimation based on the trained depth estimation network.
2. The endoscopic light-weight depth estimation method using geometric priors of claim 1, wherein, The fine-tuning in S1 specifically involves using a dynamic vector low-rank adaptive strategy to fine-tune the geometric basis model pre-trained on a large-scale natural scene dataset. During the fine-tuning process, a multi-scale depth prediction strategy is employed, using a single decoder to predict depth at multiple resolutions.
3. The lightweight endoscopic depth estimation method based on a prior geometric model as described in claim 1, characterized in that, The space domain distillation in S3 is specifically: calculating a space domain regression loss between a basic geometric model and a depth map output by the depth estimation network : ; wherein is the total number of pixels of the input image, is the depth map output by the depth estimation network, is the depth map output by the base geometry model; Perform disparity plane segmentation, quantizing the continuous depth values predicted by the underlying geometric model onto K predefined, linearly spaced parallax planes to generate hard labels: ; In the formula, For the disparity plane value of a pixel, For pixels in the disparity map The actual parallax value, The depth map output by the depth estimation network is transformed into a probability distribution on K disparity planes, representing a representative value of the plane. The cross-entropy loss between the probability distribution and the hard label is calculated and used as the disparity plane segmentation loss. : ; In the formula, As a hard label, It represents a probability distribution.
4. The lightweight endoscopic depth estimation method based on a prior geometric model as described in claim 1, characterized in that, The spectral domain distillation in S3 specifically involves processing the depth maps output by the basic geometric model and the depth estimation network, respectively. and A discrete Fourier transform is performed to obtain the spectral representation. The spectrum is divided into low-frequency, mid-frequency, and high-frequency bands. The differences in spectral characteristics between the basic geometric model and the deep estimation network in the corresponding bands are calculated, and the weighted summation is used to obtain the spectral distillation loss. : ; In the formula, Represents frequency band The bandpass filter, where B ={low, medium, high}, It is a learnable spectral weight. To deeply estimate the spectral characteristics of the network in the frequency band, It is the spectral characteristics of the basic geometric model in the frequency band.
5. The lightweight endoscopic depth estimation method based on a prior geometric model as described in claim 1, characterized in that, The gradient domain distillation in S3 specifically involves calculating the depth maps output by the base geometric model and the depth estimation network, respectively. and Gradient maps in the horizontal and vertical directions; calculate the difference between the gradient maps of the two models in the corresponding directions to obtain the gradient distillation loss. : ; In the formula, Indicates the direction of calculation The gradient plot on.
6. The lightweight endoscopic depth estimation method based on a prior geometric model as described in claim 1, characterized in that, Spectral domain distillation and gradient domain distillation also include patch-enlarged distillation, which involves randomly cropping and locally enlarging a local region of the input image, and calculating the spectral distillation loss and gradient distillation loss only within the enlarged region to enhance the detail constraints on information-rich regions.
7. The lightweight endoscopic depth estimation method based on a prior geometric model as described in claim 1, characterized in that, S4 specifically involves: using a pre-trained DINOv2 model as a semantic encoder to extract semantic prior features from the input endoscopic image; using a Mamba-based projector to map the semantic prior features to the intermediate feature space of the depth estimation network; normalizing the mapped semantic features and the features extracted by the depth estimation network along the channel dimension to obtain the corresponding semantic distributions; and calculating the KL divergence between the two semantic distributions as the semantic distribution alignment loss. : ; In the formula, To represent the KL divergence between inputs, For the mapped semantic features, To deeply estimate the features extracted by the network, for semantic distribution for The semantic distribution.
8. The lightweight endoscopic depth estimation method based on a prior geometric model as described in claim 1, characterized in that, Total loss function in S5 Specifically: ; In the formula, For luminance loss, For spatial domain regression loss, For spectral domain distillation loss, For gradient domain distillation loss, For disparity plane segmentation loss, For semantic distribution alignment loss, , , , , This is the loss weight.
9. A lightweight endoscopic depth estimation method based on a prior geometric model as described in claim 8, characterized in that, The specific photometric loss is as follows: ; In the formula, For structural similarity, For balance coefficient, For the target frame, This is a composite frame.
10. A lightweight endoscopic depth estimation system utilizing a prior geometric model, characterized in that, The lightweight endoscopic depth estimation method based on a prior geometric model, as described in any one of claims 1-9, comprises: The basic geometric model, as a teacher model, is used to provide depth predictions with rich geometric priors, finely tuned from endoscopic data. The depth estimation network, as a student model, consists of the lightweight DepthNet and PoseNet. DepthNet is responsible for depth prediction, and PoseNet is responsible for camera pose estimation. The ternary distillation module is used to perform knowledge distillation in the spatial domain, spectral domain, and gradient domain, transferring the prior knowledge of the basic geometric model to the deep estimation network; The semantic alignment module uses the semantic features extracted by the pre-trained semantic encoder to align the distribution of the intermediate features of the deep estimation network. The training module is used for self-supervised end-to-end training of the depth estimation network.