본문으로 바로가기

Open-World Panoptic Segmentation

category AI 2025. 2. 17. 19:00

Link: https://arxiv.org/abs/2412.12740 

 

Open-World Panoptic Segmentation

Perception is a key building block of autonomously acting vision systems such as autonomous vehicles. It is crucial that these systems are able to understand their surroundings in order to operate safely and robustly. Additionally, autonomous systems deplo

arxiv.org

 

자율주행 및 실제 환경의 복잡성

  • 자율주행 차량/로봇 등 실제 시스템은 다양한 환경에서 센서 데이터를 해석해야 함
  • 기존 세분화 (segmentation) 기법은 학습 시 등장한 클래스에 한정되는 폐쇄형(closed-world) 가정 기반

폐쇄형 가정의 한계

  • 현실에서는 학습 데이터에 포함되지 않은 새로운 객체나 상황이 빈번히 등장함
    • 예: 도로 상황에서 학습에 없는 이상(anomaly) 객체 또는 새로운 의미적 범주 발생
  • 기존 방법은 이러한 미지 객체에 대해 과도한 자신감을 보이며 잘못된 예측 가능

문제 정의: Open-World Segmentation

  • 학습 시에는 알려지지 않은(unknown) 객체 및 범주를 테스트 시점에 탐지하고 분할하는 문제
  • 기존의 단순 anomaly segmentation(알려진 객체와 미지 영역의 이진 분할)을 넘어 다음 세분화로 구분됨:
    • Anomaly Segmentation: 알려진 클래스와 미지 영역을 이진 분할
    • Open-World Semantic Segmentation: 미지 영역을 여러 의미적 범주로 일관성 있게 분리
    • Open-Set Panoptic Segmentation: 미지 객체들을 개별 인스턴스 단위로 분할(클래스 구분 없이)

Problem Statement

기존의 폐쇄형(closed-world) 세분화 기법은 학습 시에 등장하지 않은 새로운 객체나 범주를 제대로 처리하지 못한다는 한계가 있습니다.

이에 논문에서는 자율주행 등 실제 환경에서 발생하는 “모르는(unknown)” 객체와 범주까지 인식할 수 있는 open-world panoptic segmentation 문제를 다루고자 합니다.

이 문제는 단순히 알려진 객체와 모르는 객체를 구분하는 anomaly segmentation을 넘어, 모르는 객체들을 개별적으로 인스턴스 단위로 분할하고, 새로운 의미적 범주로 통합하는 것을 목표로 합니다.

Anomaly Segmentation:

  • Known class와 unknown class를 구별하는데 주요한 목적
  • unknown class region에 대해서 segmentation

Open-world Semantic segmentation:

  • Unknown Class에 대해서 segmentation 하는 것을 넘어서 같은 class에 해당하는 unknown끼리는 같은 class로 묶어주는 task
  • instance segmentation을 수행하진 않는다.

Open-set Panoptic Segmentation

  • Unknown Class에 대해서 instance segmentation을 수행한다고 이해하면 된다.
  • semantic segmentation은 수행하지 않기 때문에 unknown object들 간에 어떤 것들이 같은 class로 묶이는지 알 수 없다.

Open-world Panoptic Segmentation

  • 기존 Open-world semantic segmentation에서 수행하는 unknown class간의 class 구별
  • 기존 Open-set Panoptic segmentation에서 수행하는 unknown instnace간의 구별
  • 위 두가지의 특성을 모두 가진 challenging task.

Method

Overall Architecture

  • Encoder:
    • ResNet34: light weight for assuming real
      • ResNet Block → NonBottleneck-1D Block
      • 3x3 Conv → 3x1 and 1x3 Conv
      • Means of pyramid pooling module for contexture information
  • Decoders: Sementic, contrastive, instance
    • Three SwiftNet module with NonBottleneck-1D Blocks
  • Clustering Module:
    • HDBScan
  • Post-processing Module

Semantic Decoder

Goal: Build a unique class descriptor for each known class

  • Standard weighted cross-entropy loss for closed-world semantic segmentation:
    • $\mathcal{L}{\text{sem}} = -\frac{1}{|\Omega|} \sum{p \in \Omega} \omega_k t_p^{\top} \log \left( \sigma (f_p) \right)$
      • $\omega_k$: class-wise weight computed via the inverse frequency of each class in the dataset
      • $t_p \in \mathbb{R}^{H \times W \times K}$: one-hot encoded GT annotation at pixel location $p$
      • $\sigma (\cdot)$: SoftMAX function
      • $f_p$: pre-softmax feature predicted at pixel $p$
  • Feature loss function at pre-logit level
    • Purpose: prediction at each pixel belonging to that class must be equal to the descriptor
    • Build class descriptors, during training via accumulating pre-logit feature of all the True Positive for each class
    • $\mathcal{L}{\text{feat}} = \frac{1}{|\Omega|} \sum{k=1}^{K} \sum_{p \in \Omega_k} \frac{\left\| \boldsymbol{\ell}_p - \boldsymbol{\mu}_k^{e-1} \right\|^2}{\left( \boldsymbol{\sigma}_k^{e-1} \right)^2}$
      • $\boldsymbol{\mu}_k \in \mathbb{R}^D$: Mean (class descriptor) for class $k$
        • $\boldsymbol{\mu}_k = \frac{1}{|\hat{\Omega}k|} \sum{p \in \hat{\Omega}_k} \boldsymbol{\ell}_p$
      • $\boldsymbol{\sigma}_k^2 \in \mathbb{R}^D$: Variance for class $k$
        • $\boldsymbol{\sigma}_k^2 \in \mathbb{R}^D = \frac{1}{|\hat{\Omega}k|} \sum{p \in \hat{\Omega}_k} (\boldsymbol{\ell}_p - \boldsymbol{\mu}_k) \odot (\boldsymbol{\ell}_p - \boldsymbol{\mu}_k)$
      • $\boldsymbol{\ell}_p$: Pre-logit representation of pixel $p$
      • $\hat{\Omega}_k$: Set of correctly segmented pixels for class $k$
      • $\odot$: Hadamard (element-wise) product.
      • $e$: Epoch number
      • $| \Omega|$ : Total number of pixel

Contrastive Decoder

Operating at the pre-logit level and tackles anomaly segmentation by contrastive loss and objectosphere

  • mean pre-logit $\bar{\ell}_k \in \mathbb{R}^D$ for each class k:
    • $\bar{\boldsymbol{\ell}}k = \frac{1}{|\Omega_k|} \sum{p \in \Omega_k} \boldsymbol{\ell}_p$
  • Contrastive Loss:
    • Have $\bar{\boldsymbol{\ell}}_k$ approximate the corresponding vector in the feature bank($\bar{\boldsymbol{\mu}}_k^{e-1}$)
    • The outcome of the contrastive loss is to scatter the class-specific pre-logits on the unit hypersphere.
    • $\mathcal{L}{\text{cont}} = - \sum{k=1}^{K} \log \frac{\exp \left( \bar{\boldsymbol{\ell}}_k^\top \bar{\boldsymbol{\mu}}_k^{e-1} / \tau \right)} {\sum{i=1}^{K} \exp \left( \bar{\boldsymbol{\ell}}_k^\top \bar{\boldsymbol{\mu}}_i^{e-1} / \tau \right)}$
  • Objectosphere loss:
    • $\mathcal{L}_{\text{obj}} =\max \left( 1 - \|\boldsymbol{\ell}p\|^2, 0 \right) \quad \text{if } p \in \Omega_k, \quad\mathcal{L}{\text{obj}} = \|\boldsymbol{\ell}_p\|^2 \quad \text{otherwise}.$
    • make the norm of the pre-logit of known classes larger than 1 and the norm of the pre-logit of unknown classes equal to 0.

Instance Decoder

  • Class agnostic instance segmentation
  • Predict a 2D offset for each pixel
  • Cluster pixels if they belong to the same object instance point to the same area in the image
  • Lovász Hinge Loss:
    • $\mathcal{L}{\text{off}} = \frac{1}{|C|} \sum{j=1}^{|C|} \text{Lovász}(\mathbf{F}{C_j}, \mathbf{G}{C_j})$
      • $\mathbf{F}_{C_j}$: soft-mask of instance $C_j$ obtained by the offset predictions
      • $\mathbf{G}_{C_j}$: ground-truth binary mask of instance $C_j$
      • $f_{C_j} = \exp \left( - \frac{\|\boldsymbol{e}_p - \boldsymbol{c}_j\|^2}{2 \eta^2} \right)$
    • Encourages the network to predict, for all pixels associated with a specific instance, an offset vector that points toward their corresponding centroid.
    • Simultaneously, it penalizes offset vectors that point towards a different centroid than their own.
    • In this way, the offsets of different instances form clusters in the 2D space.
  • Divergence loss and Curl loss for strengthen offset prediction
    • Divergence loss:
      • $\mathcal{L}{\text{div}} = \frac{1}{|\Omega|} \sum{p \in \Omega} \rho \left( (\text{div} \, \mathbf{O})_p - (-2) \right)$
      • $\mathcal{L}{\text{div}}^{\text{aux}} = \frac{1}{|\Omega|} \sum{(h,w) \in \Omega} \rho \left( \frac{\partial o_h (h, w)}{\partial h} - \frac{\partial o_w (h, w)}{\partial w} \right)$
        • $\text{div} \, \mathbf{O} := \frac{\partial o_h (h, w)}{\partial h} + \frac{\partial o_w (h, w)}{\partial w}$=(-1) + (-1) = -2
        • $$ \mathbf{O}(h, w) = \begin{bmatrix} o_h(h, w) \\ o_w(h, w) \end{bmatrix} = \begin{bmatrix} -h + c_h \\ -w + c_w \end{bmatrix} $$
    • Curl Loss:
      • $\mathcal{L}{\text{curl}} = \frac{1}{|\Omega|} \sum{p \in \Omega} \rho \left( (\text{curl} \, \mathbf{O})_p \right)$
      • $\mathcal{L}{\text{curl}}^{\text{aux}} = \frac{1}{|\Omega|} \sum{(h,w) \in \Omega} \rho \left( \frac{\partial o_h (h, w)}{\partial w} - \frac{\partial o_w (h, w)}{\partial h} \right)$
        • $\text{curl} \, \mathbf{O} := \frac{\partial o_h (h, w)}{\partial w} - \frac{\partial o_w (h, w)}{\partial h}$
        • Lovász Hinge Loss는 soft-mask와 GT 간의 gradient를 최소화하는 loss이며, gradient 필드는 회전 정보를 포함하지 않기 때문에, 이를 보장하기 위해 curl loss를 추가하여 회전 성분을 0으로 제한한다

Post-process Module

Anomaly Segmentation:

  • Already have mean $\mu_k \in \mathbb{R}^D$ and variance $\sigma^2_k \in \mathbb{R}^D$ at class $k$
  • Possible to construct multi-variate noraml distribution $\mathcal{N}_k (\boldsymbol{\mu}_k, \boldsymbol{\Sigma}_k)$ where $\boldsymbol{\Sigma}_k = \text{diag}(\boldsymbol{\sigma}^2)$
  • $s_k (\ell_p) = \exp \left( -\frac{1}{2} (\ell_p - \boldsymbol{\mu}_k)^\top \boldsymbol{\Sigma}_k^{-1} (\ell_p - \boldsymbol{\mu}_k) \right)$
  • $s(p) = \max_k s_k (\ell_p)$
  • 학습 단계에서 $\ell_p$가 unit-sphere에 있도록 학습했음으로 known class에 해당하는 pixel의 $s(p)$는 1에 가까울 것이다.
  • 그럼으로 $1 \sigma$ boundary를 $s(p)$로 부터 구한 후 boundary 밖에 있는 것을 unknown mask로 표현
  • 이는 contrastive header에서 구한 값에 대해서도 동일하게 적용
  • $s^{\text{sem}}_{\text{unk},p}=1$ and $s^{\text{con}}_{\text{unk},p}=1$일때만 Unknown으로 판단

Open-World Semantic Segmentation

  • If an anomalous area of the same category of $p$ appears in a future image, we want to be able to put them together.
  • The first time an anomalous pixel appears, we save the descriptor $\ell_p \in \mathbb{R}^D$ together with all others
    • Which leads to having an additional known class K ← K+1.
  • Allow the $K_{unk}$ pre-logit descriptors of the “new known” classes to evolve.

Open-World Panoptic Segmentation

  • Offset Prediction: 픽셀들이 가리키는 방향을 보고 비슷한 방향이면 같은 그룹으로 묶기
  • HDBScan Clustering: 같은 방향을 가리키는 픽셀들을 하나의 객체로 분류하기
  • Semantic Filtering: 객체 분류 결과가 "자동차"라고 했는데, "사람" 픽셀이 섞여 있으면 수정하기
  • Final Output: instance보다 semantic 정보를 더 신뢰하여 정확도 높이기

PANIC Dataset

  • Dataset Statistics
    • 800 images, 58 unknown classes
    • 19개의 city scapes evaluation class를 known class로
    • Validation: training dataset에 등장은 하지만 unknown인 class
    • Test: training dataset에 등장하지 않은 unknown class
  • Data collection and labeling
    • German, bonn에서 차량 탑재 카메라로 획득 후 최소한 하나의 anomalous object가 존재하도록 filtering
    • segments.ai online tool을 통해 manually labeling
  • Benchmark metric
    • Anomaly Segmentation
      • Pixel-level Metrics
        • AUPR\(Area under the precision-recall curve\)
          • 픽셀 수준에서 이상(unknown)과 정상(known) 데이터를 얼마나 잘 구분하는지 측정
          • 소수 클래스(이상 데이터)에 더 집중
          • 이상이 이미지에서 작은 영역만 차지하는 경우에도 성능을 평가하기 좋음
        • FPR95(False Positive rate at 95% True Positive rate)
          • 95%의 진짜 양성(true positive) 비율을 달성하려면, 얼마나 많은 오탐(false positive)이 발생하는지를 측정
          • 이상을 많이 찾아내기 위해 얼마나 많은 정상 픽셀을 잘못 이상으로 예측하는지 정도
      • Component-Level Metrics
        • sIoU (Segment-wise Intersection over Union)
        • PPV (Positive Predicted Value, Precision)
        • Component-wise F1-Score
    • Open-world Semantic Segmentation
      • Based on confusion matrix which have dimension $\tilde{K} \times K$
        • row $\tilde{K}$ : newly discovered classes
        • column $K$: GT classes
      • Homogeneity
        • $\text{Hom}_i = \frac{\max(\text{row}_i)}{\sum \text{row}_i}, \quad \forall i \in \{1, \dots, \tilde{K} \}$
      • Completeness
        • $\text{Com}_k = \frac{\max(\text{column}_k)}{\sum \text{column}_k}, \quad \forall k \in \{1, \dots, K \}$
    • Open-Set Panoptic Segmentation
      • Known Class:
        • panoptic segmentation
      • Unknown class:
        • Unknown class에 대해서 semantic segmentation 수행
    • Open-world panoptic segmentation
      • Known Class:
        • 일반적인 Panoptic Segmentation 평가
      • Unknown class:
        • 여러 개의 unknown categories로 구분

Evaluation

Datasets:

  • Anomaly segmentation
    1. SegmentMeIfYouCan, BDDAnomaly, PANIC

  • Open-world semantic segmentation
    • BDDAnomaly, COCO, SUIM, PANIC


MisoYuri's Deck
블로그 이미지 MisoYuri 님의 블로그
VISITOR 오늘 / 전체