# Line as a Visual Sentence: Context-aware Line Descriptor for Visual Localization

시각적 문장으로서의 선: 시각적 위치 추정을 위한 문맥 인식 선 기술자

Sungho Yoon, Ayoung Kim · arXiv · 2021년 9월 10일

- **연구 문제** 가변 길이 선분을 고정 차원 디스크립터로 요약하는 CNN 기반 선 디스크립터의 한계를 transformer로 다룹니다.
- **연구 방법** 선분을 문장, 선분 위의 점을 단어로 보고 transformer 인코더로 디스크립터를 만들며, Line Signature Networks로 이웃 선분 정보를 공유합니다.
- **주요 결과** homography 추정의 F-score에서 기존 선 디스크립터보다 높은 값을 보고했고, 시각 위치 추정에서는 실내 점 기반 PnP가 선 기반 방법보다 우수했습니다.

## 가변 길이 선분을 고정 차원으로 요약하는 문제

선분 디스크립터는 점 특징과 함께 영상 매칭과 시각 위치 추정에서 추가 제약을 제공합니다. 최근 CNN 기반 선 디스크립터는 시점 변화와 동적 환경에 강한 성능을 보고했지만, CNN의 구조는 입력 차원이 미리 정해져 있어 길이가 서로 다른 선분을 고정 차원의 디스크립터로 요약하는 데 본질적인 어려움이 있습니다. 기존 LLD와 DLD 같은 방법은 선분을 고정된 개수의 하위 선분으로 균등하게 나누어 이 문제를 다룹니다. 이 논문은 이러한 고정 길이 요구를 피하는 방식으로 선분을 다룹니다.

## 선분을 문장으로 보는 Line-Transformers

제안 방법은 선분을 문장, 선분 위의 점을 단어로 간주합니다. 검출된 선분에서 간격 v로 점 p를 균일하게 선택하고, 각 점의 좌표와 키포인트 신뢰도 (x, y, c)를 점 토큰으로 사용합니다. 점 토큰은 SuperPoint 기반 디스크립터 맵에서 가져온 점 임베딩과 MLP로 얻은 위치 임베딩을 더해 표현되며, 선분 전체를 대표하는 \[LINE\] 토큰이 앞에 붙습니다. transformer 인코더는 다중 헤드 자기 어텐션과 MLP를 L번 쌓은 구조이며, 마스크를 사용해 선분마다 다른 점 개수를 처리합니다. 최종 \[LINE\] 토큰의 상태가 고정 차원 디스크립터 d로 쓰입니다. 선분이 최대 토큰 수를 넘으면 keyline을 여러 subline으로 나누고, adjacency matrix로 subline 거리 행렬을 keyline 거리 행렬로 변환하며 subline 거리를 평균합니다.

학습은 semi-hard negative sampling을 사용하는 triplet loss와 마진 1로 수행됩니다.

![Figure 1: (a) For both low and high-textured environments, our line descriptor performs accurate matching. (b) Attention scores for points in a line with match…](https://refivu.com/papers/11fca9e8-bf89-4a64-b44d-894d97f008aa/figures/figure-93d3bbeede6919bfa33b124d88ae0867.png?thumb=512)

**Fig. 1** : (a) For both low and high-textured environments, our line descriptor performs accurate matching. (b) Attention scores for points in a line with matched lines having similar attentional contexts.

[원문](https://arxiv.org/abs/2109.04753v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Sungho Yoon, Ayoung Kim · Line as a Visual Sentence: Context-aware Line Descriptor for Visual Localization · 원문 그림 인용 · 원본 PDF 1쪽에서 그림 영역을 추출했습니다.

![Figure 2: Line-Transformers consist of two major components: line transformers and line signature networks. The ﬁrst component uses a line tokenizer to extract…](https://refivu.com/papers/11fca9e8-bf89-4a64-b44d-894d97f008aa/figures/figure-c9bd3b56ec7c8dd2c6ceed28697374d7.png?thumb=512)

**Fig. 2** : Line-Transformers consist of two major components: line transformers and line signature networks. The ﬁrst component uses a line tokenizer to extract point tokens and embeddings from a line segment. Considering the context of the point embeddings, transformers summarize it into a line embedding, or a line descriptor. The second component enhances the line descriptor by sharing lines’ positional context with its neighborhoods.

[원문](https://arxiv.org/abs/2109.04753v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Sungho Yoon, Ayoung Kim · Line as a Visual Sentence: Context-aware Line Descriptor for Visual Localization · 원문 그림 인용 · 원본 PDF 3쪽에서 그림 영역을 추출했습니다.

## Line Signature Networks와 이웃 정보 공유

Line Signature Networks는 이웃 선분의 기하 정보를 디스크립터에 반영하는 구성요소입니다. 선분의 중점, 각도, 길이를 MLP로 임베딩하여 각 디스크립터에 더하고, 그래프 어텐션 방식의 메시지 전달을 M번 쌓아 이웃 선분들과 메시지를 공유합니다. 기존 line signature가 이웃 범위와 속성을 사람이 정의해야 했던 것과 달리, 이 구조는 어텐션으로 이웃을 암묵적으로 할당합니다.

![Figure 8: Visualizing attention scores. (a) Attention patterns in lines describe how much the points embeddings contribute to building line descriptors. The ma…](https://refivu.com/papers/11fca9e8-bf89-4a64-b44d-894d97f008aa/figures/figure-79eb5d4395c83b078c5429daddaac411.png?thumb=512)

**Fig. 8** : Visualizing attention scores. (a) Attention patterns in lines describe how much the points embeddings contribute to building line descriptors. The matched lines follow similar attention patterns. (b) Attention scores between line descriptors are initially low and widely spread, and they are gradually converged onto a small number of neighbor lines at a later layer.

[원문](https://arxiv.org/abs/2109.04753v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Sungho Yoon, Ayoung Kim · Line as a Visual Sentence: Context-aware Line Descriptor for Visual Localization · 원문 그림 인용 · 원본 PDF 8쪽에서 그림 영역을 추출했습니다.

## Homography 추정에서의 선 매칭 평가

Homography 추정 실험은 Oxford와 Paris 데이터셋을 훈련, 검증, 테스트 집합으로 나누어 수행되었습니다. 정답 선 대응은 중첩, 4px 미만의 재투영 오차, 2도 미만의 각도 차이 기준으로 정해졌습니다. 평가 지표는 homography의 AUC와 매칭 정밀도 P, 재현율 R, F-score입니다. 이 실험에서 Line-Transformers는 F-score에서 선 디스크립터 방법들보다 큰 폭으로 높다고 보고되며 그 차이는 10.1%입니다. 다만 5px 임계값의 AUC에서는 앞서지 않는다고 보고됩니다. LLD는 연속 프레임에서 학습되어 큰 시점 변화가 있는 이 데이터셋에서 낮은 성능을 보였습니다.

![Figure 5: Qualitative line segment matches for homography estimation and visual localization. The last three columns represent blurring, viewpoint, and illumin…](https://refivu.com/papers/11fca9e8-bf89-4a64-b44d-894d97f008aa/figures/figure-e61553d2740d4cde1298e7bc02d62d45.png?thumb=512)

**Fig. 5** : Qualitative line segment matches for homography estimation and visual localization. The last three columns represent blurring, viewpoint, and illumination changes. More correct matches (green) and fewer wrong matches (red) indicate better performance. Unmatched lines are colored in blue.

[원문](https://arxiv.org/abs/2109.04753v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Sungho Yoon, Ayoung Kim · Line as a Visual Sentence: Context-aware Line Descriptor for Visual Localization · 원문 그림 인용 · 원본 PDF 5쪽에서 그림 영역을 추출했습니다.

## 실내와 실외 시각 위치 추정 평가

실내 평가는 ScanNet에서 40에서 80퍼센트 겹치는 영상 쌍을 선택해 수행되었고, 실외 평가는 Oxford Radar RobotCar의 두 시퀀스를 참조와 질의 집합으로 사용했습니다. 실내 실험에서는 PnP 기반 점 방법이 모든 선 기반 방법보다 우수하다고 보고되었습니다. 제안 방법의 실외 평가에는 ScanNet으로 학습한 가중치가 그대로 적용되었습니다. 선 기반 위치 추정은 PnPL을 RANSAC 20회 반복으로 사용해 수행되었으며, 점 기반 방법은 PnP를 사용했습니다. 이 결과는 실내 ScanNet 설정과 실외 설정의 조건을 구분해서 읽어야 합니다.

![TABLE II: Visual localization](https://refivu.com/papers/11fca9e8-bf89-4a64-b44d-894d97f008aa/figures/figure-9aebf464ea42b1852b09c713be82c0af.png?thumb=512)

**원문 그림** TABLE II: Visual localization

[원문](https://arxiv.org/abs/2109.04753v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Sungho Yoon, Ayoung Kim · Line as a Visual Sentence: Context-aware Line Descriptor for Visual Localization · 원문 그림 인용 · 원본 PDF 6쪽에서 그림 영역을 추출했습니다.

## Line Signature Networks 제거와 점-선 결합

절제 실험에서 Line Signature Networks를 제거한 변형은 0.25m와 10º 기준에서 47.4%를 기록했고, 제거하지 않은 Line-Transformers는 53.0%를 기록했습니다. 이는 이웃 정보 공유 구성요소를 유지했을 때 이 기준의 정확도가 높았다는 관찰입니다. 또한 PL-Loc은 점 기반 inlier 수가 5 또는 20 미만인 경우에 선 정보를 추가해 시각 위치 추정을 보완했고, 그 분석에서 점이 선보다 우수한 경우는 61%로 보고되었습니다.

![TABLE III: Ablation of Line-Transformers.](https://refivu.com/papers/11fca9e8-bf89-4a64-b44d-894d97f008aa/figures/figure-a23f063cfed1c51e3731bc5fa2c029ce.png?thumb=512)

**원문 그림** TABLE III: Ablation of Line-Transformers.

[원문](https://arxiv.org/abs/2109.04753v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Sungho Yoon, Ayoung Kim · Line as a Visual Sentence: Context-aware Line Descriptor for Visual Localization · 원문 그림 인용 · 원본 PDF 6쪽에서 그림 영역을 추출했습니다.

## 지표의 한계와 적용 범위

저자들은 정밀도와 재현율이 중첩되지 않는 선 대응을 충분히 고려하지 못하며, 한 선이 여러 선으로 나뉘는 many-to-many 대응 문제를 완전히 다루지 못한다고 해석합니다. 이 때문에 저자들은 중첩 여부에 덜 민감한 시각 위치 추정을 더 적합한 대안으로 설명합니다. 실험은 Oxford와 Paris, ScanNet, Oxford Radar RobotCar 데이터셋에 한정되어 있으며, 실외 평가는 실내에서 학습한 가중치를 적용한 결과입니다.

## 논문 정보

- **저자**: Sungho Yoon, Ayoung Kim
- **학회·저널**: arXiv · 프리프린트
- **최초 공개일**: 2021년 9월 10일
- **등록일**: 2026년 11월 6일
- **수정일**: 2021년 9월 10일
- **버전**: v1
- **arXiv**: 2109.04753
- **DOI**: 10.1109/lra.2021.3111760
- **분류**: cs.CV · cs.RO
- **원문 이용 조건**: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)
- **제공 범위**: 논문 정보, 해설, 허용된 원문 그림

[논문 원문 ↗](https://arxiv.org/abs/2109.04753v1) · [원문 PDF ↗](https://arxiv.org/pdf/2109.04753v1)

AI 해설은 논문 원문과 별개의 설명이며 오류가 있을 수 있습니다. 원문과 그림은 각 출처의 이용 조건과 따로 표시된 권리를 따릅니다.

## 초록

Along with feature points for image matching, line features provide additional constraints to solve visual geometric problems in robotics and computer vision (CV). Although recent convolutional neural network (CNN)-based line descriptors are promising for viewpoint changes or dynamic environments, we claim that the CNN architecture has innate disadvantages to abstract variable line length into the fixed-dimensional descriptor. In this paper, we effectively introduce Line-Transformers dealing with variable lines. Inspired by natural language processing (NLP) tasks where sentences can be understood and abstracted well in neural nets, we view a line segment as a sentence that contains points (words). By attending to well-describable points on aline dynamically, our descriptor performs excellently on variable line length. We also propose line signature networks sharing the line's geometric attributes to neighborhoods. Performing as group descriptors, the networks enhance line descriptors by understanding lines' relative geometries. Finally, we present the proposed line descriptor and matching in a Point and Line Localization (PL-Loc). We show that the visual localization with feature points can be improved using our line features. We validate the proposed method for homography estimation and visual localization.

## 원문 인용

Sungho Yoon, Ayoung Kim (2021). Line as a Visual Sentence: Context-aware Line Descriptor for Visual Localization. arXiv:2109.04753v1. https://doi.org/10.1109/lra.2021.3111760

**BibTeX**

```
@article{yoon2021line,
  title = {{Line as a Visual Sentence: Context-aware Line Descriptor for Visual Localization}},
  author = {Sungho Yoon and Ayoung Kim},
  year = {2021},
  eprint = {2109.04753},
  archivePrefix = {arXiv},
  doi = {10.1109/lra.2021.3111760},
  url = {https://arxiv.org/abs/2109.04753v1}
}
```

## 이 논문의 용어

- [Triplet loss](https://refivu.com/terms/6b3cf5362b16-triplet-loss)
- [adjacency matrix](https://refivu.com/terms/a00a2b2fba98-adjacency-matrix)
- [F-score](https://refivu.com/terms/82986c915d77-f-score)
- [SuperPoint](https://refivu.com/terms/850221d238fc-superpoint)
- [homography estimation](https://refivu.com/terms/23c05499d73d-homography-estimation)
- [area under the cumulative error curve (AUC)](https://refivu.com/terms/5c0e23986c06-area-under-the-cumulative-error-curve-auc)
- [multi-head self-attention (MSA)](https://refivu.com/terms/7268b4531496-multi-head-self-attention-msa)
- [SOLD 2](https://refivu.com/terms/c054824ffca4-sold-2)
- [visual localization](https://refivu.com/terms/4072080d8a87-visual-localization)

## 다른 논문 해설

- [Deep Learning for fully automatic detection, segmentation, and Gleason Grade estimation of prostate cancer in multiparametric Magnetic Resonance Images](https://refivu.com/papers/85c3f509-d887-4269-b0d6-8ad8be0c0a75-deep-learning-for-fully-automatic-detection-segmentation-and.md)
- [Personal Fixations-Based Object Segmentation with Object Localization and Boundary Preservation](https://refivu.com/papers/7e4b0279-3a23-41b9-9c15-d6e8a60f1550-personal-fixations-based-object-segmentation-with-object.md)
- [DPODv2: Dense Correspondence-Based 6 DoF Pose Estimation](https://refivu.com/papers/b23ba045-375e-4257-ac63-e8c1ccef5930-dpodv2-dense-correspondence-based-6-dof-pose-estimation.md)
- [Classification of Handwritten Names of Cities and Handwritten Text Recognition using Various Deep Learning Models](https://refivu.com/papers/0bc72932-5b76-439b-b2dc-f458792cd92e-classification-of-handwritten-names-of-cities-and.md)
- [Occlusion-aware Unsupervised Learning of Depth from 4-D Light Fields](https://refivu.com/papers/d04bc6d2-9a4b-4791-8dcf-c137d9115190-occlusion-aware-unsupervised-learning-of-depth-from-4.md)
- [Incremental Object Detection via Meta-Learning](https://refivu.com/papers/ceb941d7-06a1-460a-9fb3-2c66abae0ea5-incremental-object-detection-via-meta-learning.md)
- [Model-based Chance-Constrained Reinforcement Learning via Separated Proportional-Integral Lagrangian](https://refivu.com/papers/c133e883-5487-4b86-893d-40fefee524a8-model-based-chance-constrained-reinforcement-learning-via.md)
- [Magneto: Combining Small and Large Language Models for Schema Matching](https://refivu.com/papers/311374b0-0d8e-4fc1-aeff-cbaa2e5c70e6-magneto-combining-small-and-large-language-models-for.md)
- [Smart placement, faster robots-a comparison of algorithms for robot base-pose optimization](https://refivu.com/papers/2480e9e8-8d93-49c2-85f5-c860cc80e50a-smart-placement-faster-robots-a-comparison-of-algorithms.md)
- [RemixIT: Continual self-training of speech enhancement models via bootstrapped remixing](https://refivu.com/papers/ece6cee0-2c9f-4929-a773-721f2744cab0-remixit-continual-self-training-of-speech-enhancement-models.md)
- [Deep Reinforcement Learning Based Placement for Integrated Access Backhauling in UAV-Assisted Wireless Networks](https://refivu.com/papers/e44358ae-37cd-4f06-bb08-1b42c988b1af-deep-reinforcement-learning-based-placement-for-integrated.md)
- [A comparison between single-stage and two-stage 3D tracking algorithms for greenhouse robotics](https://refivu.com/papers/45a49502-8312-47d2-a7dd-fa5214c14d7f-a-comparison-between-single-stage-and-two-stage.md)

---

AI 해설에는 오류가 있을 수 있습니다. [Refivu](https://refivu.com/papers/11fca9e8-bf89-4a64-b44d-894d97f008aa-line-as-a-visual-sentence-context-aware-line)
