EmbodiedSAM: Online Segment Any 3D Thing in Real Time

## Abstract

Abstract Embodied tasks require the agent to fully understand 3D scenes simultaneously with its exploration, so an online , real-time , fine-grained and highly-generalized 3D perception model is desperately needed.
Since high-quality 3D data is limited, directly training such a model in 3D is almost infeasible.
Meanwhile, vision foundation models (VFM) has revolutionized the field of 2D computer vision with superior performance, which makes the use of VFM to assist embodied 3D perception a promising direction.
However, most existing VFM-assisted 3D perception methods are either offline or too slow that cannot be applied in practical embodied tasks.
In this paper, we aim to leverage Segment Anything Model (SAM) for real-time 3D instance segmentation in an online setting. This is a challenging problem since future frames are not available in the input streaming RGB-D video, and an instance may be observed in several frames so object matching between frames is required.
To address these challenges, we first propose a geometric-aware query lifting module to represent the 2D masks generated by SAM by 3D-aware queries, which is then iteratively refined by a dual-level query decoder. In this way, the 2D masks are transferred to fine-grained shapes on 3D point clouds. Benefit from the query representation for 3D masks, we can compute the similarity matrix between the 3D masks from different views by efficient matrix operation, which enables real-time inference.
Experiments on ScanNet, ScanNet200, SceneNN and 3RScan show our method achieves leading performance even compared with offline methods. Our method also demonstrates great generalization ability in several zero-shot dataset transferring experiments and show great potential in open-vocabulary and data-efficient setting.
Code and demo are available at HERE , with only one RTX 3090 GPU required for training and evaluation.

## 1 Introduction

Embodied tasks, like robotic manipulation and navigation [; ; ; ], require the agent to understand the 3D scene, reason about human instructions and make decisions with self-action. Among the pipeline, embodied visual perception is the foundation for various downstream tasks. In embodied scenarios, we hope the 3D perception model to be: (1) *online*. The input data is a streaming RGB-D video rather than a pre-collected one and visual perception should be performed synchronously with data collection; (2) *real-time*. High inference speed is needed; (3) *fine-grained*. It should recognize almost any object appeared in the scene; (4) *highly-generalized*. One model can be applied to different kinds of scenes and be compatible with different sensor parameters like camera intrinsics.
As high-quality 3D data is limited, training such a model in pure 3D is almost infeasible.

Inspired by the great achievements of large language models (LLMs) [; ; ], a series of vision foundation models (VFMs) such as SAM [] and SEEM [], have emerged.
VFMs are revolutionizing the field of 2D computer vision by their fine-grained, accurate and generalizable segmentation on image pixels. However, less studies have been conducted on developing VFMs for the 3D domain.
Since there is much less high-quality annotated 3D data compared with 2D counterparts, it holds great promise to explore the adaptation or extension of existing 2D VFMs for embodied 3D perception.
Recently, there are some works [; ; ] that adopt SAM to automatically generate masks on multi-view images of a 3D scene and merge the masks in 3D with projection and iterative merging. While these approaches achieve fine-grained 3D instance segmentation with high generalization ability, they still face some serious problems that hinder their application: (1) they apply SAM on individual images and directly project the 2D masks to 3D point clouds with camera parameters. So the predictions are not geometric-aware, which may produce inconsistent results across different views; (2) they merge per-frame mask predictions in 3D with hand-crafted strategy. E.g., computing geometric similarity between all pairs of masks and merge them according to a threshold, which is inaccurate and very slow; (3) most of them are offline methods based on pre-collected RGB-D frames with 3D reconstruction.

In this paper, we propose a VFM-assisted 3D instance segmentation framework namely EmbodiedSAM (ESAM), which exploits the power of SAM to online segment anything in 3D scenes with high accuracy, fast speed and strong generalization ability.
As shown in Figure 1, different from previous 3D SAM methods [; ; ] that project 2D masks to 3D and merge them with hand-crafted strategies, ESAM lifts 2D masks to 3D queries and predicts temporal and geometric-consistent 3D masks with iterative query refinement. Benefit from the 3D query representation, ESAM is also able to fastly merge 3D masks in different frames with simple matrix operations.
Specifically, we extract point-wise features from the point clouds projected from depth image. Then we regard the 2D masks generated by SAM as superpoints, which is used to guide mask-wise aggregation by our proposed geometric-aware pooling module, generating 3D queries with one-to-one correspondence to SAM masks. We further present a dual-level query decoder to iteratively refine the 3D queries, which makes the queries efficiently attend with superpoint-wise features and generate fine-grained point-wise masks. Since each 3D instance mask is associated with a query, we can compute similarity between newly predicted 3D masks and previous ones by efficient matrix multiplication in parallel and accurately merge them. To enhance the discriminative ability of query features, we design three representative auxiliary tasks for estimation of geometric, contrastive and semantic similarities.
We conduct extensive experiments on ScanNet, ScanNet200, SceneNN and 3RScan datasets. Compared with previous VFM-assisted 3D instance segmentation methods, we improve the accuracy and speed by a large margin while still remain strong generalization ability. Moreover, ESAM can be easily extended to open-vocabulary segmentation. It also shows great potential in data-efficient setting when trained with limited data.

Figure: Figure 1: Different from previous 3D SAM methods [; ; ] that project 2D masks to 3D and merge them with hand-crafted strategies, ESAM lifts 2D masks to 3D queries and iteratively refine them to predict accurate 3D masks. With 3D queries, ESAM is also able to fastly merge 3D masks in different frames with simple matrix operations. Take SAM3D [] for comparison, our ESAM surpasses its performance by 15.7% AP with a more than $20\times$ faster speed.
Refer to caption: x1.png

## 2 Related Work

VFM-assisted 3D Scene Segmentation:
In 2D realm, vision foundation models (VFM) [; ; ] have exploded in growth. Benefit from the large amount of annotated visual data, the 2D VFM shows great accuracy and very strong generalization ability, which makes them work well in zero-shot scenarios.
Since there is much less high-quality annotated data in the field of 3D vision than the 2D counterpart, using 2D VFM to assist 3D scene perception becomes a promising direction [; ; ; ].
UnScene3D [] considers 2D self-supervised features from DINO [] to generate initial pseudo masks, which is then iteratively refined with self-training.
SAM3D [] adopts SAM [] to generate 2D instance masks, which are then projected to 3D space by depth and camera parameters and merged according to the geometry.
SAMPro3D [] maps 3D points in scenes to multi-view 2D images as 3D prompts, which are used to align the 2D masks generated by SAM and cluster the 3D points into instance masks.
SAI3D [] generates 3D primitives on the reconstructed 3D mesh. Then it adopts semantic-SAM to acquire 2D masks with semantic scores, which are connected with the 3D primitives and merged by a graph-based region growing strategy.
Our approach also utilizes SAM to assist 3D instance segmentation. Differently, we makes the process of 2D-to-3D projection and 3D mask merging learnable and online. In this way, our ESAM is able to predict more accurate 3D masks and be applied in practical real-time online tasks.

Online 3D Scene Perception:
In persuit of embodied AI, real world applications like robotic navigation [; ] and manipulation [] have received increasing attention. Online 3D scene perception, which precisely understands the surrounding 3D scenes from streaming RGB-D videos, becomes the visual basis of these robotic tasks.
Early online 3D perception methods process 2D images separately and project the predictions to 3D point clouds, which is followed by a fusion step to merge the predictions from different frames [; ].
However, the predictions on 2D image is not geometric and temporal-aware, which makes the fusion step difficult and inaccurate.
Fusion-aware 3D-Conv [] and SVCNN [] construct data structures to maintain the information of previous frames and conduct point-based 3D aggregation to fuse the 3D features for semantic segmentation. INS-CONV [] extends sparse convolution [; ] to incremental CNN to efficiently extract global 3D features for semantic and instance segmentation.
In order to simplify the design of online 3D perception model and leverage the power of the advanced offline 3D architectures, MemAda [] proposes a new paradigm for online 3D scene perception, which empowers offline model with online perception ability by multimodal memory-based adapters.
Different from the previous works, our ESAM lifts SAM-generated 2D masks to accurate 3D mask and corresponding queries, which enables us to efficiently merge the per-frame predictions with high accuracy.

## 3 Approach

Given a sequence of RGB-D images $\mathcal{X}_{t}=\{x_{1},x_{2},...,x_{t}\}$ with known poses, our goal is to segment any instance in the corresponding 3D scene. Formally, $x_{t}=(I_{t},P_{t})$ where $I_{t}$ is the color image and $P_{t}$ is the point clouds acquired by projecting the depth image to 3D space with pose parameters. Our method is required to predict instance masks for the observed 3D scene $S_{t}=\bigcup_{i=1}^{t}{P_{i}}$.
Furthermore, we want to solve this problem online; that is, at any time instant $t$ future frames $x_{i},\ i>t$ are not known, and temporally consistent 3D instance masks of $S_{t}$ should be predicted at each time instant.

Overview. The overview of our approach is shown in Figure 2. We solve the problem of online 3D instance segmentation in an incremental manner to achieve real-time processing. At time instant $t$, we only predict the instance masks $M_{t}^{cur}$ of current frame $P_{t}$. Then we merge $M_{t}^{cur}$ to the previous instance masks $M_{t-1}^{pre}$ of $S_{t-1}$ and get the updated instance masks $M_{t}^{pre}$ of $S_{t}$.

Figure: Figure 2: Overview of *ESAM*. At a new time instant $t$, we first adopt SAM to generate 2D instance masks $M_{t}^{2d}$. We propose a geometric-aware query lifting module to lift $M_{t}^{2d}$ to 3D queries $Q_{t}$ while preserving fine-grained shape information. $Q_{t}$ are refined by a dual-level decoder, which enables efficient cross-attention and generates fine-grained point-wise masks $M_{t}^{cur}$ from $Q_{t}$. Then $M_{t}^{cur}$ is merged into previous masks $M_{t-1}^{pre}$ by a fast query merging strategy.
Refer to caption: x2.png

### 3.1 Query Lifting and Refinement

Consider the model is receiving the $t$-th RGB-D frame $x_{t}=(I_{t},P_{t})$, we first adopt SAM automatic mask generation to acquire 2D instance masks $M_{t}^{2d}$ from $I_{t}$. In this subsection, we ignore the subscript $t$ for clearer statement.

Geometric-aware Query Lifting. As SAM does not leverage the information from previous frames, nor does it exploit 3D information from the depth image, directly project $M^{2d}$ to $P$ results in inaccurate and temporal-inconsistent 3D masks.
Instead, we aim to lift each 2D mask to a 3D query feature, which enables us to further refine the queries for 3D instance mask generation.
Since the 2D binary mask is less informative, here we propose to extract point cloud features from the scene and then regard the 2D masks as indexs to cluster point clouds into superpoints, where queries can be simply selected from the superpoint features.
Assuming the point clouds $P\in\mathbb{R}^{N\times 3}$ and there are $M$ masks in $M^{2d}$, we first map $M^{2d}$ to $P$ according to the color-depth correspondence to get superpoint index $S\in\mathbb{Z}^{N}$, where each element in $S$ falls in $[0,M)$.
Then we feed $P$ to a 3D sparse U-Net [] with memory-based adapter [] to extract temporal-aware 3D features $F_{P}\in\mathbb{R}^{N\times C}$.
With $F_{P}$ and $S$, we can pool the point-wise features to superpoint features $F_{S}\in\mathbb{R}^{M\times C}$.

However, naive operation such as max or average pooling may degrade the representation ability of $F_{S}$. To better preserve the point features inside each superpoint, we take the geometric shape of each superpoint into account. For a superpoint $P^{i}\subseteq P,\ i\in[0,M)$, we compute the normalized relative positions $p^{r}_{j}$ of all points $p_{j}\in P^{i}$ with respect to the superpoint’s center $c_{i}$.
In this way, the set $\mathcal{P}_{i}=\{p^{r}_{j}=\frac{p_{j}-c_{i}}{{\rm max}(p_{j})-{\rm min}(p_{j
})}\mid p_{j}\in P^{i}\}$ represents the normalized shape of this superpoint with diameter of 1 and center of origin. Then we compute the local and global features for each point:

$$ $\boldsymbol{z}^{global}={\rm Agg}(\boldsymbol{z}^{local})\in\mathbb{R}^{C},\ \boldsymbol{z}^{local}={\rm MLP}(\mathcal{P}_{i})\in\mathbb{R}^{|\mathcal{P}_{ i}|\times C}$ (1) $$

where ${\rm MLP}$ performs on each individual point and ${\rm Agg}$ is the aggregation function implemented with channel-wise max-pooling. The local and global features represent the relevance between points and shape, so we concat both features and feed them to another MLP to predict point-wise weight:

$$ $w_{j}={\rm Sigmoid}({\rm MLP}(\boldsymbol{z}_{j}))\in\mathbb{R}^{(0,1)},\ \boldsymbol{z}_{j}=[\boldsymbol{z}^{local}_{j},\boldsymbol{z}^{global}]$ (2) $$

Finally, we aggregate point features $F_{P}^{i}$ into the $i$-th superpoint with weighted average pooling:

$$ $F_{S}^{i}=\mathcal{G}(F_{P}^{i})+\boldsymbol{z}^{global},\ \mathcal{G}(F_{P}^{ i})={\rm mean}(F_{P}^{i}*[w_{1},...,w_{|\mathcal{P}_{i}|}])$ (3) $$

Note we enhance the pooled superpoint feature with $\boldsymbol{z}^{global}$ to fully combine the shape-level geometric feature and scene-level 3D U-Net feature.
The computation for each superpoint can be parallelized with point-wise MLP and Scatter function [], so this geometric-aware pooling is actually efficient.

Dual-level Query Decoder. After pooling, the $M$ 2D instance masks $M^{2d}$ are lifted to 3D superpoint features $F_{S}$. Then we initialize a series of 3D instance queries $Q_{0}$ from $F_{S}$, which are iteratively refined by several transformer-based query decoder layers and leveraged to predict 3D masks.
During training, we randomly sample a proportion between 0.5 and 1 of $F_{S}$ to construct $Q_{0}$ for data augmentation. While at inference time we simply set $Q_{0}=F_{S}$.

Each qeury decoder employs masked cross-attention between queries and the scene representations to aggregate instance information for each query:

$$ $\hat{Q}_{l}={\rm Softmax}(\frac{\boldsymbol{Q}\cdot\boldsymbol{K}^{T}}{\sqrt{C }}+A_{l})\cdot\boldsymbol{V},\ A_{l}(i,j)=\begin{cases}0&{\rm if}\ M_{l}^{cur} (i,j)\ ={\rm True}\\ -\infty&{\rm otherwise}\end{cases},\ l=0,1,2$ (4) $$

where $\cdot$ indicates matrix multiplication, $\boldsymbol{Q}$ is the linear projection of $Q_{l}$, $\boldsymbol{K}$ and $\boldsymbol{V}$ are the linear projection of the scene representations $F$. $F$ can be point-wise features $F_{P}$ or superpoint-wise features $F_{S}$. $A_{l}$ is the attention mask derived from the predicted 3D instance masks $M_{l}^{cur}$ in the $l$-th decoder layer.
$(i,j)$ indicates $i$-th query attending to $j$-th point or superpoint.
Then we feed $\hat{Q}_{l}$ to self-attention layer and feed forward network to get $Q_{l+1}$, followed by a mask generation module to predict the instance mask for each query:

$$ $M_{l}^{cur}={\rm Sigmoid}(\phi(Q_{l})\cdot F^{T})>\varphi,\ l=0,1,2,3$ (5) $$

where $\phi$ is a linear layer. $M_{l}^{cur}$ is a point mask if $F=F_{P}$, otherwise it is a superpoint mask.

A common practice [; ; ] for qeury decoder is to adopt the same level of scene representations for cross-attention and mask generation. However, since SAM has already outputs high-level semantic-aware masks, we observe $M\ll N$.
If we adopt the point-wise scene representations $F_{P}$ for query decoder, the cross-attention operation will be memory-consuming due to the large amount of points. While if we use superpoint features $F_{S}$, the predicted 3D instance masks will only be the combination of superpoints and thus cannot be refined to finer granularity.
To get the best of both worlds, our query decoder is designed to be dual-level. For cross-attention in Eq (4), we set $F=F_{S}$ to achieve efficient interaction. While for mask prediction in Eq (5), we set $F=F_{P}$ for fine-grained mask generation.
To support masked attention, we pool point mask to superpoint mask before Eq (4):

$$ $M_{l}^{cur}\leftarrow\mathcal{G}(M_{l}^{cur})>\varphi$ (6) $$

where $\mathcal{G}$ is the geometric-aware pooling in Eq (3). We can reuse the pre-computed weights in Eq (2) to reduce computation.
In this way, after $3\times$ query decoders, we acquire accurate point masks $M_{3}^{cur}$ as well as the corresponding queries $Q_{3}$, which is denoted as $M_{t}^{cur}$ and $Q_{t}$ in the following subsections. We perform mask-NMS on $M_{t}^{cur}$ to filter out redundant masks as well as the corresponding queries.

### 3.2 Efficient Online Query Merging

Once lifting 2D masks $M_{t}^{2d}$ to accurate 3D masks $M_{t}^{cur}$, we then merge $M_{t}^{cur}$ to the previous instance masks $M_{t-1}^{pre}$ to acquire $M_{t}^{pre}$. Note when $t=1$ we have $M_{1}^{pre}=M_{1}^{cur}$ as an initialization.
However, the mainstream solution for merging instance masks in previous works [; ; ; ; ] is to traverse over all masks in $M_{t}^{cur}$ and compare each mask in $M_{t}^{cur}$ with all previous masks in $M_{t-1}^{pre}$.
This process is very slow, because in order to accurately decide wheter a new mask shoule be merged into a previous mask, the geometric similarity such as mask-IoU or CD-distance is computed on the point clouds of the two masks. The computation of similarity involves all the points in each mask, which has high computation complexity.
What is worse, above operations are hard to be computed in parallel, since the number of points in each mask is different and we need to pick out point clouds of each instance according to the mask one by one. To this end, we propose to represent each mask in fixed-size vectors and compute the similarity with efficient matrix operation.

Benefit from our architecture, for each mask in $M_{t}^{cur}$ and $M_{t-1}^{pre}$ we have the corresponding query feature. The query feature itself is a fixed-size vector representation, but simply computing similarity between them is less informative, which gets very low performance. Therefore, we set up several representative auxiliary tasks based on the query features to learn vector representations under different metrics, which are used to compute *geometric*, *contrastive* and *semantic* similarities.

Figure: Figure 3: Details of our efficient query merging strategy. We propose three kinds of representative auxiliary tasks, which generates geometric, contrastive and semantic representations in the form of vectors. Then the similarity matrix can be efficiently computed by matrix multiplication. We further prune the similarity matrix and adopt bipartite matching to merge the instances.
Refer to caption: x3.png

First, for geometric similarity, we observe the model is able to learn the whole geometry with only partial observation. However, due to the restriction of segmentation that predictions can only be made on existing points, the model cannot express its knowledge about the whole geometry. Therefore, we make the model able to express its full knowledge by introducing an auxiliary task of bounding box prediction.
We adopt a MLP to predict the bounding box regression based on the center of each query (i.e. the center $c_{i}$ of the corresponding superpoint) to get box $B\in\mathbb{R}^{6}$. Then the geometric similarity between two masks can be computed by the IoU between the two boxes.
We ignore box orientations since the IoU matrix between two sets of axis-aligned bounding boxes can be computed by simple matrix operation.

Second, for contrastive similarity, we aim to learn an instance-specific representation where features from the same instance should be pulled together and otherwise pushed away.
This representation can be learned by contrastive training between two adjacent frames: we use MLP to map the query features $Q_{t}$ to contrastive feature $f_{t}$. Then for an instance $i$ appears in the $t$-th and $(t+1)$-th frames, we choose the two features of this instance $(f_{t}^{i},f_{t+1}^{i})$ as the position pair, and sample features from other instances $(f_{t}^{i},f_{t+1}^{k})$ as the negative pair. The detailed loss function is shown in the next subsection.

Finally, for semantic similarity, we simply adopt a MLP to predict per-category probability distribution $S\in\mathbb{R}^{K}$, where $K$ is the number of pre-defined categories. There are also other choices for this task. For example, if we adopt semantic-SAM [] instead of SAM, we can directly utilize the semantic predictions for the 2D masks to serve as $S$ for the corresponding queries.

In this way, the similarity matrix $\mathcal{C}$ between $M_{t-1}^{pre}$ and $M_{t}^{cur}$ can be efficiently computed with their corresponding geometric, contrastive and semantic representations:

$$ $\mathcal{C}={\rm IoU}(B_{t-1}^{pre},B_{t}^{cur})+\frac{f_{t-1}^{pre}}{||f_{t-1 }^{pre}||_{2}}\cdot(\frac{f_{t}^{cur}}{||f_{t}^{cur}||_{2}})^{T}+\frac{S_{t-1} ^{pre}}{||S_{t-1}^{pre}||_{2}}\cdot(\frac{S_{t}^{cur}}{||S_{t}^{cur}||_{2}})^{T}$ (7) $$

where ${\rm IoU}(\cdot,\cdot)$ means the IoU matrix between two set of axis-aligned bounding boxes. We prune $\mathcal{C}$ by setting elements smaller than threshold $\epsilon$ to $-\infty$. Then bipartite matching with cost $-\mathcal{C}$ is performed on $M_{t-1}^{pre}$ and $M_{t}^{cur}$, which assigns each mask in $M_{t}^{cur}$ to one of the masks in $M_{t-1}^{pre}$. If a new mask fails to match with any previous mask, we register a new instance for this mask. Otherwise we merge the two masks as well as their $B$, $f$ and $S$.
Mask merging can be simply implemented by taking union. While for other representations, we weighted average them by: $B_{t}^{pre}[i]=\frac{n}{n+1}B_{t-1}^{pre}[i]+\frac{1}{n+1}B_{t}^{cur}[j]$ and so on. We assume the $j$-th new mask is merged to the $i$-th previous mask. $n$ is the count of merging, which indicates the number of masks that have been merged to $M_{t-1}^{pre}[i]$.

### 3.3 Loss Function

We have semantic and instance labels on each RGB-D frame.
In each RGB-D video, the instance labels of different frames are consistent.
Given the annotations, we compute per-frame losses based the predictions from each query.
Since the queries $Q_{t}$ are lifted from 2D SAM masks in a one-to-one way, we ignore the complicated label assignment step and directly utilize the annotations on 2D mask to supervise the predictions from the corresponding query.
We assume that a 2D SAM mask can belong only to one instance, and thus we can acquire the ground-truth semantic label and 2D instance mask for each query. We utilize the pixel correspondence with depth image to map 2D instance mask to 3D point clouds, and compute ground-truth axis-aligned bounding box based on the 3D instance mask.
With above annotations, we compute binary classification loss $\mathcal{L}_{cls}^{t}$ with cross-entropy to discriminate foreground and background instances. The predicted 3D mask is supervised by a binary cross-entropy $\mathcal{L}_{bce}^{t}$ and a Dice loss $\mathcal{L}_{dice}^{t}$. The losses for bounding boxes and semantic predictions are defined as IoU-loss $\mathcal{L}_{iou}^{t}$ and binary cross-entropy $\mathcal{L}_{sem}^{t}$ respectively.

Apart from the above per-frame losses, we also formulate a contrastive loss between adjacent frames:

$$ ${\mathcal{L}_{cont}}^{t\to{t+1}}=-\frac{1}{Z}{\sum_{i=1}^{Z}\log\frac{e^{\left (\left<{f}^{i}_{t},{f}_{t+1}^{i}\right>/\tau\right)}}{\sum_{j\neq i}e^{\left( \left<{f}_{t}^{i},{f}_{t+1}^{j}\right>/\tau\right)}+e^{\left(\left<{f}_{t}^{i} ,{f}_{t+1}^{i}\right>/\tau\right)}}}$ (8) $$

where $\left<\cdot,\cdot\right>$ is cosine similarity. So finally the total loss is formulated as:

$$ $\mathcal{L}=\frac{1}{T}\sum_{t=1}^{T}(\alpha\mathcal{L}_{cls}^{t}+\mathcal{L}_ {bce}^{t}+\mathcal{L}_{dice}^{t}+\beta\mathcal{L}_{iou}^{t}+\mathcal{L}_{sem}^ {t}+{\mathcal{L}_{cont}}^{t\to{t+1}}+{\mathcal{L}_{cont}}^{{t}\to{t-1}})$ (9) $$

where ${\mathcal{L}_{cont}}^{{T}\to{T+1}}$ and ${\mathcal{L}_{cont}}^{{1}\to 0}$ is set to 0.

## 4 Experiment

In this section, we first describe our datasets and implementation details. Then we compare our method with state-of-the-art VFM-assisted 3D instance segmentation methods online 3D segmentation methods to validate its effectiveness. We also apply ESAM in open-vocabulary and data-efficient setting to demonstrate its application potential.
Finally we conduct ablation studies to provide a comprehensive analysis on our design.

### 4.1 Benchmark and Implementation Details

We evaluate our method on four datasets: ScanNet [], ScanNet200 [], SceneNN [] and 3RScan []. ScanNet contains 1513 scanned scenes, out of which we use 1201 sequences for training and the rest 312 for testing. ScanNet200 provides more fine-grained annotations on the scenes of ScanNet, which contains more than 200 categories.
SceneNN contains 50 high-quality scanned scenes with instance and semantic labels. Following [], we select 12 clean sequences for testing.
3RScan is a more challenging indoor dataset where the RGB-D sequences are acquired by fast-moving cameras. We choose its test split for testing, which contains 46 scenes.
Each dataset provide both posed RGB-D sequences and reconstructed point clouds with labels.

Benchmarks: We compare different methods on four benchmarks. First, we compare with VFM-assisted 3D instance segmentation methods in Table 1. We train different methods on ScanNet200 training set (if needed) and evaluate them on ScanNet200 validation set in a class-agnostic manner. For offline methods, the input of each scene is a reconstructed point cloud and a RGB-D video, where predictions are made on the reconstructed point clouds. For online methods, the input is a streaming RGB-D video, and we map the final predicted results on $S_{t}$ to the reconstructed point clouds with nearest neighbor interpolation for comparison.

**Table 1: Class-agnostic 3D instance segmentation results of different methods on ScanNet200 dataset. Following [], we compare with conventional clustering methods and VFM-assisted 3D scene perception methods. The unit of Speed is $ms$ per frame, where the speed of VFM and other parts are reported separately.**
| Method | Type | VFM | AP | AP50 | AP25 | Speed |
| --- | --- | --- | --- | --- | --- | --- |
| HDBSCAN [] | Offline | – | 1.6 | 5.5 | 32.1 | – |
| Nunes et al. [] | Offline | – | 2.3 | 7.3 | 30.5 | – |
| Felzenszwalb et al. [] | Offline | – | 5.0 | 12.7 | 38.9 | – |
| UnScene3D [] | Offline | DINO [] | 15.9 | 32.2 | 58.5 | – |
| SAMPro3D [] | Offline | SAM [] | 18.0 | 32.8 | 56.1 | – |
| SAI3D [] | Offline | SemanticSAM [] | 30.8 | 50.5 | 70.6 | – |
| SAM3D [] | Online | SAM | 20.2 | 35.7 | 55.5 | 1369+1518 |
| ESAM | Online | SAM | 37.9 | 58.8 | 75.0 | 1369+80 |
| ESAM-E | Online | FastSAM [] | 35.9 | 56.3 | 74.0 | 20+80 |

**Table 2: Dataset transfer results of different methods from ScanNet200 to SceneNN and 3RScan. We directly evaluate the models in Table 1 on other datasets to show their generalization ability.**
| Method | Type | ScanNet200$\rightarrow$SceneNN | ScanNet200$\rightarrow$3RScan |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| AP | AP50 | AP25 | AP | AP50 | AP25 |  |  |
| SAMPro3D | Offline | 12.6 | 25.8 | 53.2 | 3.9 | 8.0 | 21.0 |
| SAI3D | Offline | 18.6 | 34.7 | 65.7 | 5.4 | 11.8 | 27.4 |
| SAM3D | Online | 15.1 | 30.0 | 51.8 | 6.2 | 13.0 | 33.9 |
| ESAM | Online | 26.6 | 46.2 | 63.1 | 10.3 | 23.6 | 50.7 |
| ESAM-E | Online | 23.4 | 43.0 | 60.0 | 10.2 | 22.4 | 48.5 |

**Table 3: 3D instance segmentation results of different methods on ScanNet and SceneNN datasets.**
| Method | Type | ScanNet | SceneNN | FPS |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
| AP | AP50 | AP25 | AP | AP50 | AP25 |  |  |  |
| TD3D [] | Offline | 46.2 | 71.1 | 81.3 | – | – | – | – |
| Oneformer3D [] | Offline | 59.3 | 78.8 | 86.7 | – | – | – | – |
| INS-Conv [] | Online | – | 57.4 | – | – | – | – | – |
| TD3D-MA [] | Online | 39.0 | 60.5 | 71.3 | 26.0 | 42.8 | 59.2 | 3.5 |
| ESAM-E | Online | 38.4 | 57.7 | 72.9 | 27.3 | 42.1 | 56.4 | 10.0 |
| ESAM-E+FF [] | Online | 40.8 | 58.9 | 75.7 | 30.2 | 48.6 | 63.6 | 9.8 |

Since zero-shot methods like SAM3D do not require training. To fairly compare them with learnable methods, we further evaluate the models in Table 1 on SceneNN and 3RScan without finetuning. This benchmark, shown in Table 2, validates the generalization ability of different methods.

We also compare with online 3D instance segmentation methods in Table 3. Following previous works [; ], we train different methods on ScanNet training set and evaluate them on ScanNet validate set and SceneNN.

Finally, we evaluate the open-vocabulary 3D instance segmentation ability on the 198 categories of ScanNet200 in Table 4. Since ESAM outputs class-agnostic 3D masks, there are two methods to extend it to open-vocabulary 3D segmentation. The first is to feed the class-agnostic 3D masks to open-vocabulary mask classification model like OpenMask3D [], which is adopted in the code of SAI3D []. The second is to adopt open-vocabulary 2D segmentation model to acquire the category labels for each 2D mask. Since there is one-to-one correspondence between 3D mask and 2D mask in ESAM, we can acquire the category labels for each 3D mask accordingly. Here we follow SAI3D to adopt the first method and compare with it.

**Table 4: Open-vocabulary 3D instance segmentation results on ScanNet200 dataset.**
| Method | AP | AP50 | AP25 |
| --- | --- | --- | --- |
| SAI3D | 9.6 | 14.7 | 19.0 |
| ESAM | 13.7 | 19.2 | 23.9 |

Implementation details: Following [], we train ESAM in two stages. First we train a single-view perception model on ScanNet(200)-25k, which is a subset of ScanNet(200) with individual RGB-D frames, without memory-based adapters and losses for the three auxiliary tasks. Next we finetune the single-view perception model on RGB-D sequences with the adapters and full losses. To reduce memory footprint, we randomly sample 8 adjacent RGB-D frames for each scene at every iteration.
In terms of hyperparameters, we set $\varphi=0.5$, $\epsilon=1.75$, $\tau=0.02$, $\alpha=0.5$ and $\beta=0.5$.

Figure: Figure 4: Visualization results of different 3D instance segmentation methods on ScanNet200 dataset. As highlighted in red boxes, SAM3D predicts noisy masks while SAI3D tends to over segment an instance into multiple parts.
Refer to caption: x4.png

### 4.2 Comparison with State-of-the-art

We compare our method with the top-performance VFM-assisted 3D instance segmentation methods and online 3D instance segmentation methods as described above. We provide three versions of ESAM, namely ESAM, ESAM-E and ESAM-E+FF. ESAM adopts SAM as the VFM while ESAM-E adopts FastSAM [] to achieve real-time inference. ESAM-E+FF not only adopts the 2D masks from FastSAM, but also fuses image features extracted by FastSAM backbone to point clouds following []. We also include some visualization results in for qualitative evaluation.

According to Table 1, on class-agnostic 3D instance segmentation task (i.e. the 3D "segment anything task"), our ESAM establishes new state-of-the-art compared with previous methods, even including the offline ones. Note that it is much more challenging for online methods to perceive the 3D scenes compared to offline alternatives, since offline methods directly process the complete reconstructed 3D scenes while online methods deal with partial and noisy frames.
Despite the high accuracy, ESAM is also much faster than previous methods. It takes only 80ms to process a frame due to the efficient architecture design and fast merging strategy, while methods like SAM3D that adopts hand-crafted merging strategy requires more than 1s per frame.
When replacing SAM with the faster alternative FastSAM, ESAM-E can achieve real-time online 3D instance segmentation with about 10 FPS, while the accuracy is still much higher than previous methods.

In terms of generalization ability, ESAM also demonstrates great performance. As shown in Table 2, when directly transferred to other datasets, ESAM still achieves leading accuracy compared with zero-shot methods. We note SAI3D even performs worse than SAM3D on 3RScan dataset, this is because it highly relies clean reconstructed 3D meshes with accurately aligned RGB frames. While in 3RScan, the camera is moving fast and thus the RGB images and camera poses are blurry.

We visualize the predictions of the above methods on ScanNet200, as shown in Figure 4. ESAM can predict accurate and fine-grained 3D instance segmentation masks, while being able to process streaming RGB-D video in real time.
We also provide an online visualization to further demonstrate the practicability of ESAM in Figure 5. More details can be viewed in our video demo.

As shown in Table 3 and Table 4, ESAM also achieves state-of-the-art performance compared with previous online 3D instance segmentation methods and open-vocabulary 3D instance segmentation methods.

### 4.3 Analysis of ESAM

**Table 5: Performance of ESAM when trained with partial training set.**
| Proportion | AP | AP50 | AP25 |
| --- | --- | --- | --- |
| 100% | 37.9 | 58.8 | 75.0 |
| 50% | 37.0 | 58.4 | 75.4 |
| 20% | 34.4 | 55.8 | 74.2 |

Data-efficient learning. We reduce the training samples by using only 20% or 50% training set and report the class-agnostic performance of ESAM on ScanNet200 in Table 5. It is shown that the performance degradation of ESAM is not significant even with limited training data.
This is because 2D VFM has already provided a good initialization, thus the learning part of ESAM is easy to converge.

Decomposition of inference time. We decompose the inference time of ESAM excluding VFM in Table 6. The temporal-aware backbone consists of a sparse convolutional U-Net and several memory-based adapters. The merging process consists of similarity computation, bipartite matching and mask / representation updating. Due to the efficient design, the decoder and merging operation of ESAM only take a small proportion of inference time.

Ablation study. We first conduct ablation studies on ESAM to validate the effectiveness of the proposed methods. For architecture design, we conduct experiments on ScanNet200-25k and report class-agnostic AP and average inference latency (ms) of each frame excluding SAM in Table 4.3. It can be seen that geometric-aware pooling boosts the performance up to 1.4% while brings negligible computational overhead. Note that the prediction error on single views will accumulate on the whole scenes, so a high AP on ScanNet200-25k contributes a lot to the final performance. We can also observe that the dual-level design in ESAM achieves comparable accuracy compared with the time-consuming $F=F_{P}$ strategy, while only slightly increases the latency compared with the fully-superpoint $F=F_{S}$ strategy.
For the merging strategies, we compare different design on ScanNet200 with AP reported, as shown in Table 4.3. It is shown that each auxiliary task is important for the quality of mask merging. We notice that the geometric similarity has the most significant influence on the final performance. This is because most mask pairs can be excluded based on distance.

**Table 6: Decomposition of the inference time (ms) of ESAM excluding VFM.**
| Backbone | Decoder | Merging | Total |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 3D-Unet | Adapters | Similarity | Matching | Updating |  |  |
| 41.0 | 28.0 | 5.0 | 0.7 | 0.3 | 5.0 | 80 |

Figure: Figure 5: Online visualization of ESAM on ScanNet200 dataset. Refer to the video demo in our project page for more details.
Refer to caption: x5.png

Visualization of auxiliary tasks. We also visualize the predictions of our auxiliary tasks for comprehensive understanding of ESAM.
From Figure 6 (a), it can be observed that the model is able to predict the whole geometry of objects with only partial observation.
The t-SNE visualization in Figure 6 (b) validates that the model successfully learns discriminative query representation for object matching.
Finally the semantic segmentation results in Figure 6 (c) shows that our ESAM can learn satisfactory semantic representation and is extendable to 3D semantic segmentation task.

Figure: Table 7: Effects of the architecture design.

Figure: Table 8: Effects of the merging strategies.

Figure: Figure 6: Visualization of the auxiliary tasks for our merging strategy. (a) 3D box prediction for geometric similarity. We visualize the bounding boxes of an object at different time instant. (b) t-SNE visualization of the instance-specific representation for contrastive similarity. Different colors indicate different instances and different points indicate the instance feature at different frames. (c) Query-wise semantic segmentation for semantic similarity.
Refer to caption: x6.png

## 5 Concluding Remark

In this work, we presented ESAM, an efficient framework that leverages vision foundation models for online, real-time, fine-grained, generalized and open-vocabulary 3D instance segmentation. We propose to lift the 2D masks generated by VFM to 3D queries with geometric-aware pooling, which is followed by a dual-path query decoder to refine the queries and generate accurate 3D instance masks. Then with the query-mask correspondence, we design three auxiliary tasks to represent each 3D mask in three discriminative vectors, which enables fast mask merging with matrix operations. Extensive experimental results on four datasets demonstrates that ESAM achieves leading performance, online and real-time inference and strong generalization ability. ESAM also shows great potential in open-vocabulary and data-efficient setting. We believe ESAM brings a new paradigm on how to effectively leverage 2D VFM for embodied perception.

Potential Limitations. Despite of the satisfactory performance, there are still some limitations of ESAM.
First, whether ESAM is real-time depends on the adopted VFM. Currently we adopt SAM and FastSAM, among which only FastSAM can achieve real-time inference. However, we believe there will be more efficient 2D VFM with better performance and more functions in the near future, and ESAM can be further improved along with the improvement of 2D VFM.
Second, the 3D U-Net and memory-based adapters for feature extraction are relatively heavy, which count for most of the inference time for 3D part of ESAM. The speed of ESAM may be boosted to a higher level if we can make the backbone more efficient, which we leave for future work.

## Peer Reviews

confidence: 2
contribution: 3
initial_rating: 6
presentation: 2
questions: Lack of discussion with respect to :
Gaussian Grouping: Segment and Edit Anything in 3D Scenes
LangSplat: 3D Language Gaussian Splatting
Segment Any 3D Gaussians
soundness: 3
strengths: Unlike approaches that apply SAM on individual images and project 2D masks onto 3D point clouds, this paper introduces a geometry-aware module that lifts 2D masks to 3D queries. This enables the prediction of temporally and geometrically consistent 3D masks using iterative query refinement.

This work eliminates the need for handcrafted merging strategies by instead identifying similarities between newly predicted and previously generated 3D masks, resulting in improved performance.

Achieving real-time inference, and outperforming not only online methods but also offline methods.
summary: This paper leverages SAM for 3D instance segmentation, incorporating a geometry-aware query lifting module that transforms 2D masks into fine-grained 3D shapes on point clouds. Using 3D queries, it efficiently merges 3D masks across frames through simple matrix operations. This design enables online, real-time 3D instance segmentation.
weaknesses: The abstract and introduction quickly dive into the implementation without providing sufficient motivation to explain why this approach is taken. For instance, it lacks clarity on how 3D-aware is achieved, the role of queries, the need for iterative refinement, and the insight of the dual-level query decoder. Although the comparison with prior work is clear, the explanation of the proposed method lacks an overview, leaving out insights behind the approach.

---

confidence: 4
contribution: 2
initial_rating: 6
presentation: 3
questions: See weakness above.
soundness: 3
strengths: 1. The writing is clear and easy to follow.
2. The method is technically sound.
3. The performance results are strong.
summary: This paper introduces a real-time, online 3D instance segmentation method for embodied tasks, leveraging the Segment Anything Model (SAM) to address the lack of high-quality 3D data for direct training. Unlike existing methods, which are often too slow for practical use, this approach translates SAM’s 2D masks into fine-grained 3D shapes via a geometric-aware query lifting module and a dual-level query decoder. This enables efficient object matching across frames, achieving state-of-the-art results on benchmarks like ScanNet and demonstrating strong generalization in zero-shot and data-efficient scenarios.
weaknesses: 1. The camera's intrinsic and extrinsic parameters are crucial for this task. In embodied environments, it is very important to obtain accurate and stable intrinsic and extrinsic parameters. How can you acquire them in embodied environments? Whether the unstable and incorrect  intrinsic and extrinsic parameters affect the final results? Additionally, in lines 139-140, the point clouds are generated by projecting the depth image into 3D space using pose parameters. So, how are two point clouds aligned and merged? In real-world scenarios, point cloud alignment is also a significant issue.

2. There is a lack of visualization for the point-wise weights predicted in Geometric-aware Pooling. Providing this visualization would clarify how the model weights features across different geometric regions.

3. Regarding the class-agnostic 3D instance segmentation results compared in Table 1, the fairness of the comparison could be questioned. Since Open3DIS does not use semantic and instance labels for supervision, it may not be entirely fair to compare it with fully-supervised methods. I think a comparison with fully-supervised online 3D instance segmentation methods, as done in Table 3, would be more appropriate.

---

confidence: 4
contribution: 3
initial_rating: 6
presentation: 3
questions: See the weakness part.
soundness: 3
strengths: 1. Using InsQuery instead of traditional handcrafted strategies achieves faster and geometrically consistent multi-frame mask merging, ultimately enabling real-time inference speed.
2. The paper is well-structured and clearly written.
3. The supplementary video demo effectively highlights the online, real-time, fine-grained, and highly generalized capabilities of EmbodiedSAM.
summary: This paper proposes a geometry-aware query lifting module that represents 2D masks generated by SAM as 3D-aware queries. These queries are then iteratively refined using a similarity matrix between 3D masks from various viewpoints through a dual-level query decoder. EMBODIEDSAM partially addresses the offline and slow-processing issues present in most existing VFM-assisted 3D perception methods, making it more suitable for real-world embodied tasks.
weaknesses: 1. How is recognition achieved for any 3D object category? Why are the results in Table 1 for class-agnostic 3D instance segmentation？
2. In Figure 4, it would be helpful to match the colors of predicted and ground truth instances for easier comparison.
3. Provide additional comparisons with more recent offline methods, such as OpenMask3D[1] and OpenIns3D[2].

Reference:

[1] Takmaz, Ayça, et al. "Openmask3d: Open-vocabulary 3d instance segmentation." arXiv preprint arXiv:2306.13631 (2023).

[2] Huang, Zhening, et al. "Openins3d: Snap and lookup for 3d open-vocabulary instance segmentation." arXiv preprint arXiv:2309.00616 (2023).

---

confidence: 2
contribution: 3
initial_rating: 8
presentation: 3
questions: 1. According to Table 5 and 6, the performance gains mainly come from the merging strategies. An ablation of the geometric-aware query lifting and dual-level query decoder would better evaluate the necessity of the proposed framework.
2. According to Table 6, the computation of the similarity matrix in Eq.(7) plays a vital role, and it would be beneficial if can provide an ablation study on the weights of the different terms in Eq.(7). Besides, is directly adding them better than multiplying them?
soundness: 3
strengths: 1. Motivation: The paper proposes a novel framework for online, efficient 3D instance segmentation from RGB-D sequences, which is of high potential for embodied tasks.
2. Contribution: The proposed framework is efficient in mask generation and query merging, and the use of the IOU and semantic are reasonable and effective.
3. Performance: The performance greatly surpasses the baselines.
summary: This paper proposes a method for online 3D instance segmentation. Given a sequence of posed RGB-D images, they first use SAM to acquire 2D masks, and unproject them to 3D superpoints using the depth maps. Then they propose a novel framework to aggregate geometric features of superpoints, followed by a dual-level query decoder to predict 3D masks. They additionally propose to leverage bounding boxes IOU and semantics to assist the similarity computation, and use feature contrasting to further improve the performance.
weaknesses: I'm not very familiar with the task of this paper and did not find obvious weaknesses in this paper. Please see the questions below.

---

confidence: 4
contribution: 3
initial_rating: 6
presentation: 3
questions: 1. Typo: L280: position pair-> positive pair
2. All results included in the paper are class-agnostic. I am curious if the proposed method has advantages over all object categories equally or it works better on certain categories.
soundness: 3
strengths: 1. The paper proposes a novel way to lift 2D segmentation masks to 3D that is geometry aware. It also proposes an algorithm to better, efficiently merge 3D masks from different timestamps.
2. The method can achieve better results on four datasets, most notably in a real-time way (can achieve 10 fps with FastSAM as backbone). This is very important for its application in real-world scenarios. 
3. The paper is well-organized and easy to follow.
summary: The paper proposes a 3D instance segmentation method that is online, real-time, fine-trained and generalizable. Specifically it lifts the 2D segmentation masks generated by SAM to 3D using depth and uses the instance indices to group points into superpoints. It proposes a dula-level query decoder to use both points and superpoints for efficiently generating fine-grained masks. As an online method, it proposes a efficient way to merge masks at current timestamp to previous masks, which considers geometric similarity, contrastive similarity and semantic similarity. Because each superpoint has a feature vector, the similarities can be compuated as matrix operation for quick inference. Experiments were conducted on four baseline datasets and the proposed method outperforms both previous online methods and offline methods, and it also shows generalizability on zero-shot cases.
weaknesses: 1. All qualitative results are on ScanNet200. Wondering if the proposed method also has clear visual improvements on other datasets used in the paper.
2. Since the method is targeted to be used in real-world embodied tasks and is supposed to generalize to unseen scenes, it would be more convincing if results on some real-world captures are included.
3. For generating superpoint features in equation (3), why the $z^{global}$ is added instead of concatenated to the pooled point features? Also why using the original point features instead of $z^{local}$

---

confidence: 5
contribution: 3
initial_rating: 8
presentation: 4
questions: See the "weakness" part.
soundness: 3
strengths: 1. This paper is well-written and easy to follow.
2. The experiment part of this paper is sufficient.
3. This paper provides a nice summary of existing works.
summary: The paper presents EmbodiedSAM, a framework designed for online 3D instance segmentation, leveraging the Segment Anything Model (SAM). This method integrates SAM with a novel merging strategy that fuses geometric, contrastive, and semantic information to deliver high-efficiency segmentation of 3D objects in dynamic environments. By enabling real-time segmentation, EmbodiedSAM is positioned to enhance 3D perception tasks where immediate processing is critical. The framework is evaluated on several datasets, demonstrating its potential to perform effectively in real-world applications where timely response is essential.
weaknesses: This paper is very interesting, I think it has reached the standard for acceptance at the conference, I only have a few simple questions.

1. The Geo-aware Pooling module is a common technology. So, I think it should not be one of the main contributions of this paper, the whole pipeline is the most important design.
2. As an online segmentation network, the author should report the time cost of each module, such as super point building, query refinement, and merging.
3. The results presented in Table 6 should include more detailed explanations regarding the performance impact of removing each of the three auxiliary tasks (geometric, contrastive, and semantic similarities) in the merging strategy. This clarification is necessary to understand the individual contribution of each auxiliary task.
4. The ablation study is conducted across different datasets, making it difficult to directly compare the results. It would be more effective to perform the entire ablation study on a single dataset to ensure clearer and more consistent analysis.

Meta-review: This paper receives unanimous positive ratings of 8,8,6,8,8. The AC follows the recommendations of the reviewers to accept the paper. The reviewers think that the proposed method of using a geometry-aware module that lifts 2D mask to 3D queries is effective, the performance of the proposed method is strong and the proposed method can work in real-time inference. The proposed method can even outperform offline methods. The weaknesses mentioned by the reviewers are mostly clarifications, which are well-addressed by the authors in the discussion and rebuttal phases.

Decision: Accept (Oral)