# Domain Adaptation based Object Detection for Autonomous Driving in Foggy and Rainy Weather

안개 및 비 오는 날씨에서의 자율주행을 위한 도메인 적응 기반 객체 탐지

Jinlong Li, Runsheng Xu, Xinyu Liu, Jin Ma, Baolu Li, Qin Zou 외 2명 · arXiv · 2023년 7월 18일

- **연구 문제** 맑은 날씨에서 학습한 객체 탐지 모델은 안개와 비가 있는 자율주행 장면에서 도메인 격차 때문에 성능이 떨어집니다.
- **연구 방법** Faster R-CNN에 이미지 수준과 객체 수준 도메인 분류기를 AdvGRL로 연결하고, 보조 도메인 기반 triplet 정규화와 DMP를 더해 라벨 없는 안개·비 데이터에 적응시킵니다.
- **주요 결과** Clear에서 Foggy 적응의 DA+는 mAP 43.4%, Clear에서 Rainy 적응의 DA+는 mAP 46.0%를 기록했습니다. 절제 실험에서는 구성 요소를 추가할 때 mAP가 단계적으로 변했습니다.

## 맑은 날씨 학습 모델의 안개·비 환경 성능 저하

자율주행 차량의 객체 탐지 모델은 보통 학습 데이터와 테스트 데이터의 특징 분포가 같다고 가정합니다. 그러나 맑은 날씨에서 학습한 Faster R-CNN, Mask R-CNN, YOLOv4 모델은 맑은 날씨에서는 정확히 탐지하지만 안개가 낀 환경에서 성능이 크게 떨어집니다. 저자들은 이 저하가 날씨 조건 사이의 특징 도메인 격차에서 비롯된다고 설명합니다.

이 논문은 라벨이 있는 맑은 날씨 이미지를 소스 도메인으로, 라벨이 없는 안개·비 이미지를 타깃 도메인으로 사용하는 비지도 도메인 적응 설정을 다룹니다. 안개와 비 이미지의 정답 주석은 비용이 크기 때문에 이 설정을 택했다고 밝힙니다. 이 연구의 범위는 Clear에서 Foggy, Clear에서 Rainy로의 적응과 교차 카메라 적응입니다.

## 이미지 수준과 객체 수준의 적응 구조

제안 방법은 Faster R-CNN 파이프라인을 따릅니다. 먼저 Dynamic Masking Process가 입력 이미지의 일부 패치를 가린 뒤 CNN 백본이 이미지 수준 특징을 추출합니다. 이어서 Region Proposal Network가 영역 제안을 만들고, ROI 풀링 후 객체 수준 특징에 탐지 헤드가 적용됩니다.

![Figure 2: The architecture of the proposed domain adaptation-based enhanced detection for intelligent vehicles in foggy and rainy weather. Here we illustrate o…](https://refivu.com/papers/9c5952c7-1aab-42dd-acbe-05191660991e/figures/figure-65f18b8c2eb85159f2eb8487027b7efa.png?thumb=512)

**Fig. 2** . The architecture of the proposed domain adaptation-based enhanced detection for intelligent vehicles in foggy and rainy weather. Here we illustrate our target domain using the example of foggy weather. It is recommended to view this figure in color.

[원문](https://arxiv.org/abs/2307.09676v4) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Jinlong Li, Runsheng Xu, Xinyu Liu, Jin Ma, Baolu Li, Qin Zou, Jiaqi Ma, Hongkai Yu · Domain Adaptation based Object Detection for Autonomous Driving in Foggy and Rainy Weather · 원문 그림 인용 · 원본 PDF 4쪽에서 그림 영역을 추출했습니다.

적응을 위해 두 개의 도메인 분류기가 추가됩니다. 이미지 수준 분류기는 두 개의 합성곱 층으로 구성되고, 객체 수준 분류기는 세 개의 완전 연결 층으로 구성됩니다. 두 분류기는 AdvGRL과 결합되어 도메인을 구별하는 판별기 손실을 만들고, 백본이 도메인 불변 특징을 학습하도록 유도합니다. 추가 학습 가능한 파라미터를 Faster R-CNN에 더하지 않는다는 점도 저자들이 강조하는 설계입니다.

## AdvGRL과 어려운 샘플의 가중

원래 Gradient Reversal Layer는 순전파에서 입력을 그대로 두고 역전파에서 gradient에 음의 스칼라를 곱합니다. 이 연산은 판별기를 혼란시켜 도메인 불변 특징을 유도합니다. 다만 원래 방식은 학습 샘플의 난이도 차이를 고려하지 않습니다.

제안하는 AdvGRL은 λ를 샘플별 λadv로 바꿉니다. λadv는 판별기 손실 Lc가 임계값 α보다 작으면 min(λ0/Lc, β)로, 그렇지 않으면 λ0로 정해집니다. 저자들은 λ0를 1로 고정했습니다. Lc가 작다는 것은 판별기가 그 샘플의 도메인을 쉽게 구별한다는 뜻이며, 이 경우 샘플은 도메인 불변 특징 학습에 더 어려운 예로 취급됩니다. β는 역전파 gradient가 과도하게 커지는 것을 막는 상한입니다.

![Figure 3: Illustration of the AdvGRL-based hard training example mining. We assign larger responses to harder training examples with lower domain classifier lo…](https://refivu.com/papers/9c5952c7-1aab-42dd-acbe-05191660991e/figures/figure-08afeddd83ce25b1a7397d3d745eeb37.png?thumb=512)

**Fig. 3** . Illustration of the AdvGRL-based hard training example mining. We assign larger responses to harder training examples with lower domain classifier loss ( Lc) values. In this paper, we set λ0 = 1 and β = 30.

[원문](https://arxiv.org/abs/2307.09676v4) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Jinlong Li, Runsheng Xu, Xinyu Liu, Jin Ma, Baolu Li, Qin Zou, Jiaqi Ma, Hongkai Yu · Domain Adaptation based Object Detection for Autonomous Driving in Foggy and Rainy Weather · 원문 그림 인용 · 원본 PDF 4쪽에서 그림 영역을 추출했습니다.

![Figure 9: Visualization of hard examples mined by AdvGRL. Two mined hard examples and one easy example are shown from left to right](https://refivu.com/papers/9c5952c7-1aab-42dd-acbe-05191660991e/figures/figure-015a2e2205bf5711404f9ea9108fa2d3.png?thumb=512)

**Fig. 9** . Visualization of hard examples mined by AdvGRL. Two mined hard examples and one easy example are shown from left to right.

[원문](https://arxiv.org/abs/2307.09676v4) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Jinlong Li, Runsheng Xu, Xinyu Liu, Jin Ma, Baolu Li, Qin Zou, Jiaqi Ma, Hongkai Yu · Domain Adaptation based Object Detection for Autonomous Driving in Foggy and Rainy Weather · 원문 그림 인용 · 원본 PDF 9쪽에서 그림 영역을 추출했습니다.

## 도메인 수준 metric 정규화와 보조 도메인

제안 방법은 소스, 타깃에 더해 데이터 증강으로 만든 보조 도메인 A를 사용합니다. 목표는 소스와 타깃 사이의 특징 거리 d(FS, FT)가 소스와 보조 도메인 사이의 거리 d(FS, FA)보다 작아지도록 만드는 것입니다. 이를 위해 소스 특징을 앵커, 타깃 특징을 양성, 보조 도메인 특징을 음성으로 두는 triplet loss를 이미지 수준(LRimg)과 객체 수준(LRobj)에 적용합니다. margin δ는 1.0으로 설정되었습니다.

전체 손실은 γ(Limg + Lobj + LRimg + LRobj) + Lcls + Lreg 형태입니다. γ는 0.1로 설정되어 탐지 손실과 도메인 적응 손실의 균형을 맞춥니다. 교차 카메라 적응처럼 객체 정렬이 없는 경우에는 LRobj 항을 제거합니다.

## Dynamic Masking Process의 입력 전처리

Dynamic Masking Process는 백본에 입력하기 전에 이미지의 패치를 무작위로 가려 데이터 수준의 과적합을 줄입니다. 각 패치는 64 픽셀로 구성되며 세 입력 이미지에 걸쳐 적용됩니다. 패치 마스크 비율은 0부터 1 사이의 균등분포에서 샘플링됩니다. 이 과정은 맥락 단서를 활용하는 방법과 Dropout의 아이디어에서 영감을 받았다고 설명됩니다.

![Figure 4: Sample visualization of Dynamic Masking Process (DMP): (a) the masked original image from Cityscapes \[21\], (b) masked synthesized foggy image, (c) ma…](https://refivu.com/papers/9c5952c7-1aab-42dd-acbe-05191660991e/figures/figure-51e176aa2fd8ae9bc313f855e6bc6e4f.png?thumb=512)

**Fig. 4** . Sample visualization of Dynamic Masking Process (DMP): (a) the masked original image from Cityscapes \[21\], (b) masked synthesized foggy image, (c) masked synthesized rainy image.

[원문](https://arxiv.org/abs/2307.09676v4) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Jinlong Li, Runsheng Xu, Xinyu Liu, Jin Ma, Baolu Li, Qin Zou, Jiaqi Ma, Hongkai Yu · Domain Adaptation based Object Detection for Autonomous Driving in Foggy and Rainy Weather · 원문 그림 인용 · 원본 PDF 4쪽에서 그림 영역을 추출했습니다.

## 데이터셋과 학습 설정

실험은 Cityscapes를 소스로 사용합니다. Foggy Cityscapes는 깊이 맵과 물리 모델로 세 단계의 안개를 합성한 데이터셋이며, Rainy Cityscapes는 RainMix로 빗줄기 맵을 변환해 Cityscapes 이미지에 합성한 저자들의 데이터셋입니다. 두 데이터셋의 학습 이미지는 학습 설정에서 가장 높은 강도로 타깃에 사용되며, 검증은 각 강도에서 수행됩니다.

![Figure 5: Illustration of synthesizing Rainy Cityscapes from the Cityscapes data: (a) the original image from Cityscapes \[21\], (b) rain map generated by RainMi…](https://refivu.com/papers/9c5952c7-1aab-42dd-acbe-05191660991e/figures/figure-05bb011ed6918c434b965986d096bc45.png?thumb=512)

**Fig. 5** . Illustration of synthesizing Rainy Cityscapes from the Cityscapes data: (a) the original image from Cityscapes \[21\], (b) rain map generated by RainMix \[67\], (c) synthesized rainy image.

[원문](https://arxiv.org/abs/2307.09676v4) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Jinlong Li, Runsheng Xu, Xinyu Liu, Jin Ma, Baolu Li, Qin Zou, Jiaqi Ma, Hongkai Yu · Domain Adaptation based Object Detection for Autonomous Driving in Foggy and Rainy Weather · 원문 그림 인용 · 원본 PDF 6쪽에서 그림 영역을 추출했습니다.

백본은 ResNet-50이며 SGD로 학습합니다. 초기 학습률 0.01로 50,000회 반복한 뒤 0.001로 낮추어 20,000회 더 학습합니다. 평가 지표는 IoU 임계값 0.5의 범주별 AP와 이들의 mAP입니다. 이 설정은 Clear에서 Foggy, Clear에서 Rainy 실험의 기본 조건을 설명하며, 교차 카메라 실험과 별도 파라미터 실험의 조건은 각 실험에서 따로 확인해야 합니다.

## Foggy와 Rainy Cityscapes의 주요 비교 결과

Clear에서 Foggy 적응에서 DA+는 mAP 43.4%를 기록했습니다. 이는 표의 비교 방법 중 SCAN의 42.1%보다 1.3%p 높은 값입니다. 주요 기준은 같은 Foggy Cityscapes 검증 세트와 mAP 지표입니다. Clear에서 Rainy 적응에서 DA+는 mAP 46.0%를 기록했으며, 비교 대상은 DA-Faster와 MS-DAYOLO입니다.

한 범주의 점수만으로 방법의 우열을 판단하면 안 됩니다. 원문은 범주별로 방법마다 우세한 항목이 다르다고 보고하며, 저자들은 DA+가 전체 mAP에서 최고 성능을 보였다는 점을 강조합니다. 이 결과는 해당 데이터셋과 지표에서의 비교이며 다른 데이터와 과제로 일반화하지 않습니다.

## 구성 요소별 절제 결과

절제 실험은 Cityscapes에서 Foggy Cityscapes와 Rainy Cityscapes로의 적응에서 Source only, DMP, 이미지·객체 GRL 기준선, AdvGRL, 도메인 정규화, DMP를 단계적으로 추가한 구성을 비교합니다. Source only는 Foggy 23.41, Rainy 34.35 mAP이고, img+obj w/ GRL 기준선은 38.43과 41.02입니다. img+obj+Reg w/ AdvGRL은 Foggy 42.34를 기록하고, DMP를 더한 구성은 Foggy 43.42를 기록합니다.

![Figure 7: Visualization of the qualitative detection on Foggy/Rainy Cityscapes (validation sets). First column (Source only): original Faster R-CNN w/ DA, Seco…](https://refivu.com/papers/9c5952c7-1aab-42dd-acbe-05191660991e/figures/figure-c2846272ce341760a865e43f57e5ae02.png?thumb=512)

**Fig. 7** . Visualization of the qualitative detection on Foggy/Rainy Cityscapes (validation sets). First column (Source only): original Faster R-CNN w/ DA, Second column (Baseline): Faster R-CNN with image-level and object- level adaptations w/ GRL, Third column: Proposed DA Method. Top: foggy weather, Bottom: rainy weather.

[원문](https://arxiv.org/abs/2307.09676v4) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Jinlong Li, Runsheng Xu, Xinyu Liu, Jin Ma, Baolu Li, Qin Zou, Jiaqi Ma, Hongkai Yu · Domain Adaptation based Object Detection for Autonomous Driving in Foggy and Rainy Weather · 원문 그림 인용 · 원본 PDF 8쪽에서 그림 영역을 추출했습니다.

이 표는 각 구성이 추가되었을 때의 mAP 변화를 보여 줍니다. 그러나 이는 같은 비교 조건에서의 관찰이며, 모든 구성 요소가 모든 조건에서 개선을 낳는다는 결론으로 확대할 수 없습니다.

## 대체 보조 도메인과 교차 카메라 적응의 범위

보조 도메인을 일반 데이터 증강으로 만들면 Foggy 적응 mAP는 38.7로 보고됩니다. CycleGAN으로 생성한 이미지를 사용하면 mAP는 32.8입니다. 저자들은 이 결과가 흔한 domain randomization 기법이 도메인 격차를 효과적으로 줄이지 못한다는 점을 보여준다고 해석합니다. 이는 두 대체 설정의 결과이며 모든 증강 기법에 대한 증명은 아닙니다.

교차 카메라 실험은 Cityscapes에서 KITTI로의 적응이며 KITTI 학습 세트 7,481장을 타깃으로 사용합니다. 정렬되지 않은 데이터를 다루기 위해 LRobj 항을 제거합니다. 평가는 Car 범주의 AP에 한정되며, 이 결과를 다른 카메라 설정이나 다른 범주로 넓힐 수 없습니다.

## 논문 정보

- **저자**: Jinlong Li, Runsheng Xu, Xinyu Liu, Jin Ma, Baolu Li, Qin Zou, Jiaqi Ma, Hongkai Yu
- **학회·저널**: arXiv · 프리프린트
- **최초 공개일**: 2023년 7월 18일
- **등록일**: 2026년 11월 6일
- **수정일**: 2024년 8월 20일
- **버전**: v4
- **arXiv**: 2307.09676
- **분류**: cs.CV
- **원문 이용 조건**: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)
- **제공 범위**: 논문 정보, 해설, 허용된 원문 그림

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

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

## 초록

Typically, object detection methods for autonomous driving that rely on supervised learning make the assumption of a consistent feature distribution between the training and testing data, this such assumption may fail in different weather conditions. Due to the domain gap, a detection model trained under clear weather may not perform well in foggy and rainy conditions. Overcoming detection bottlenecks in foggy and rainy weather is a real challenge for autonomous vehicles deployed in the wild. To bridge the domain gap and improve the performance of object detection in foggy and rainy weather, this paper presents a novel framework for domain-adaptive object detection. The adaptations at both the image-level and object-level are intended to minimize the differences in image style and object appearance between domains. Furthermore, in order to improve the model's performance on challenging examples, we introduce a novel adversarial gradient reversal layer that conducts adversarial mining on difficult instances in addition to domain adaptation. Additionally, we suggest generating an auxiliary domain through data augmentation to enforce a new domain-level metric regularization. Experimental findings on public benchmark exhibit a substantial enhancement in object detection specifically for foggy and rainy driving scenarios.

## 원문 인용

Jinlong Li, Runsheng Xu, Xinyu Liu, Jin Ma, Baolu Li, Qin Zou, Jiaqi Ma, Hongkai Yu (2023). Domain Adaptation based Object Detection for Autonomous Driving in Foggy and Rainy Weather. arXiv:2307.09676v4. https://arxiv.org/abs/2307.09676v4

**BibTeX**

```
@misc{li2023domain,
  title = {{Domain Adaptation based Object Detection for Autonomous Driving in Foggy and Rainy Weather}},
  author = {Jinlong Li and Runsheng Xu and Xinyu Liu and Jin Ma and Baolu Li and Qin Zou and Jiaqi Ma and Hongkai Yu},
  year = {2023},
  eprint = {2307.09676},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2307.09676v4}
}
```

## 이 논문의 용어

- [Stochastic Gradient Descent](https://refivu.com/terms/a49650824022-stochastic-gradient-descent)
- [faster R-CNN](https://refivu.com/terms/6a6dc13482bb-faster-r-cnn)
- [Cityscapes](https://refivu.com/terms/1067bb006500-cityscapes)
- [KITTI](https://refivu.com/terms/300e3e1e2f51-kitti)
- [Oracle](https://refivu.com/terms/3ff0e5f5c4ee-oracle)
- [Triplet loss](https://refivu.com/terms/6b3cf5362b16-triplet-loss)
- [mean average precision](https://refivu.com/terms/7908941f08d6-mean-average-precision)
- [baseline](https://refivu.com/terms/cce3c805017f-baseline)
- [gradient reversal layer](https://refivu.com/terms/45f21aed504e-gradient-reversal-layer)
- [Source Only](https://refivu.com/terms/7e66f96c1478-source-only)
- [Foggy Cityscapes](https://refivu.com/terms/c908f031feae-foggy-cityscapes)

## 다른 논문 해설

- [dualFace:Two-Stage Drawing Guidance for Freehand Portrait Sketching](https://refivu.com/papers/2f67cf9b-91ab-4988-9f8f-dd39603a2790-dualface-two-stage-drawing-guidance-for-freehand-portrait.md)
- [VILA: Improving Structured Content Extraction from Scientific PDFs Using Visual Layout Groups](https://refivu.com/papers/c64357e4-d385-4277-bacb-9f3cd2ed5af1-vila-improving-structured-content-extraction-from-scientific.md)
- [Is K-fold cross validation the best model selection method for Machine Learning?](https://refivu.com/papers/53831d25-c6d2-4cd6-9e3d-da38ead2e2a9-is-k-fold-cross-validation-the-best-model.md)
- [Self-supervised Dynamic CT Perfusion Image Denoising with Deep Neural Networks](https://refivu.com/papers/e15e65ce-32bc-42d4-8cff-9b3727bbe0cf-self-supervised-dynamic-ct-perfusion-image-denoising-with.md)
- [Deep IMU Bias Inference for Robust Visual-Inertial Odometry with Factor Graphs](https://refivu.com/papers/7e9e3ea5-3db6-473c-9d99-7fbb39b4d501-deep-imu-bias-inference-for-robust-visual-inertial.md)
- [TiROD: Tiny Robotics Dataset and Benchmark for Continual Object Detection](https://refivu.com/papers/ba3ea100-4e7e-4568-aab9-c8aa20c4afae-tirod-tiny-robotics-dataset-and-benchmark-for-continual.md)
- [Deep Reinforcement Learning for Multi-Agent Interaction](https://refivu.com/papers/1607f58d-9653-4722-97aa-81ea8226dc5a-deep-reinforcement-learning-for-multi-agent-interaction.md)
- [Modeling structure-building in the brain with CCG parsing and large language models](https://refivu.com/papers/a8f6a508-e3b6-42fa-9333-2feaf3654a5e-modeling-structure-building-in-the-brain-with-ccg.md)
- [DDBot: Differentiable Physics-based Digging Robot for Unknown Granular Materials](https://refivu.com/papers/5d64bcc7-a04e-499b-95e1-92a53c424bb8-ddbot-differentiable-physics-based-digging-robot-for-unknown.md)
- [(Machine) Learning amplitudes for faster event generation](https://refivu.com/papers/519921c8-b4bc-48a1-860e-9c2ebced8577-machine-learning-amplitudes-for-faster-event-generation.md)
- [HumanLight: Incentivizing Ridesharing via Human-centric Deep Reinforcement Learning in Traffic Signal Control](https://refivu.com/papers/e2d488b7-f8ef-4b13-bcd8-ed7fdeab5df5-humanlight-incentivizing-ridesharing-via-human-centric-deep.md)
- [A Pragmatist Robot: Learning to Plan Tasks by Experiencing the Real World](https://refivu.com/papers/a58b6f25-7856-446f-8f4b-9c7d851b1a67-a-pragmatist-robot-learning-to-plan-tasks-by.md)

---

AI 해설에는 오류가 있을 수 있습니다. [Refivu](https://refivu.com/papers/9c5952c7-1aab-42dd-acbe-05191660991e-domain-adaptation-based-object-detection-for-autonomous)
