DEV Community

Cover image for See Clearly, Operate Confidently - Self-supervised approach to Robotic Surgery
Shagun Mistry
Shagun Mistry

Posted on

See Clearly, Operate Confidently - Self-supervised approach to Robotic Surgery

Day 7 of reading, understanding, and writing about an Arxiv paper.

Today's paper is "DARES: Depth Anything in Robotic Endoscopic Surgery with Self-supervised Vector-LoRA of the Foundation Model".
https://arxiv.org/html/2408.17433v1#S4

Robotic Surgery and Depth Estimation

Robotic-assisted surgery (RAS) has revolutionized the medical field, offering precision and minimal invasiveness.

However, a crucial aspect of RAS is accurate depth estimation for 3D reconstruction and visualization, which aids in surgical planning, instrument insertion, and overall surgical outcome.

While foundation models like Depth Anything Models (DAM) hold promise, directly applying them to surgical scenarios often falls short.

The paper proposes a novel approach called DARES (Depth Anything in Robotic Endoscopic Surgery), leveraging a self-supervised learning technique called Vector-LoRA (Vector Low-Rank Adaptation) applied to DAM V2. This approach addresses the limitations of traditional fine-tuning methods, which often lead to overfitting and catastrophic forgetting.

Challenges of Depth Estimation in RAS

  • Limited Data: Obtaining labeled depth data for training in surgical environments is a significant challenge.
  • Catastrophic Forgetting: Fine-tuning foundation models on limited surgical data can cause the model to forget previously learned knowledge.
  • Uniform Parameter Distribution: Traditional LoRA methods distribute parameters uniformly across network layers, neglecting the inherent feature hierarchy.

DARES: A Novel Approach

DARES tackles these challenges through a combination of techniques:

  1. Vector-LoRA: Integrates more parameters in earlier layers of the DAM V2 model, gradually decreasing the number of parameters in later layers. This allows for more efficient learning, particularly in the initial stages where general features are learned.
  2. Multi-scale SSIM Reprojection Loss: Improves depth perception by better tailoring the foundation model to the specific requirements of the surgical environment. This loss function enhances depth estimation by considering both luminance and structural similarity between images at multiple scales.

Example Implementation

Let's try to implement a simple code snippet that demonstrates the core concepts of DARES.

Note that this is a simplified implementation.

import torch
import torch.nn as nn

# Define Vector-LoRA layer
class VectorLoRA(nn.Module):
    def __init__(self, in_features, out_features, rank):
        super(VectorLoRA, self).__init__()
        self.A = nn.Parameter(torch.randn(in_features, rank))
        self.B = nn.Parameter(torch.randn(rank, out_features))

    def forward(self, x):
        return torch.matmul(x, self.A) @ self.B

# Example usage
in_features = 512
out_features = 1024
rank = 256
vector_lora = VectorLoRA(in_features, out_features, rank)
input_tensor = torch.randn(1, in_features)
output_tensor = vector_lora(input_tensor)
Enter fullscreen mode Exit fullscreen mode

Results and Evaluation

The paper evaluates DARES on the SCARED dataset, showing superior performance compared to other SOTA methods. The results demonstrate significant improvements in depth estimation accuracy, especially when compared to using DAM V2 directly or fine-tuning it without the Vector-LoRA adaptation.


Vector-LoRA enables more efficient learning by adapting the rank of low-rank matrices across layers, while the multi-scale SSIM reprojection loss improves depth perception.

This approach holds great potential for advancing the capabilities of RAS by enabling more accurate 3D reconstruction and visualization, which can lead to improved surgical planning and outcomes.

Top comments (0)