도로 안전과 언어·비전의 만남: Multimodal LLM을 활용한 교통사고 영상 분석
When language and vision meet road safety: leveraging multimodal large language models for video-based traffic accident analysis
TL;DR Highlight
GPT-4o 기반 MLLM 에이전트로 CCTV 영상에서 교통사고를 자동 분류하고 관련 객체까지 특정하는 SeeUnsafe 프레임워크 소개
Who Should Read
교통 안전 시스템이나 스마트시티 플랫폼에서 대량의 CCTV 영상을 자동 분석하는 파이프라인을 구축하려는 백엔드/ML 엔지니어. 멀티모달 LLM을 영상 분석 실무에 적용하고 싶은 개발자.
Core Mechanics
- 긴 영상을 여러 클립으로 분할한 뒤 심각도 기준으로 결과를 집계하는 'severity-based aggregation' 전략으로 MLLM의 긴 영상 처리 한계를 우회함
- GroundingDINO(오픈 어휘 객체 탐지)와 Segment Anything(객체 분할 모델)으로 생성한 객체 경계선을 시각적 프롬프트로 추가해 GPT-4o가 사고 관련 객체를 핀포인트로 식별하게 함
- BLEU/ROUGE 같은 기존 NLP 지표는 '보행자'와 '자전거 이용자'를 혼동해도 높은 점수를 줘서 교통 안전 평가에 부적합 → MLLM이 직접 채점하는 IMS(Information Matching Score) 신규 지표 제안
- GPT-4o 기반 SeeUnsafe는 76.31% 분류 정확도와 51.47% 시각적 그라운딩 성공률 달성, vanilla GPT-4o(71.49%) 및 GPT-4o mini(58.23%)보다 우수
- 구조화된 출력 형식(Video Class / Scene Context / Object Description / Justification)으로 후처리 없이 데이터베이스 인덱싱·검색 가능
- 야간 영상에서는 시각적 프롬프트(객체 경계선 오버레이)가 오히려 성능을 저하시키는 케이스 확인 → 입력 품질에 따라 전략 조정 필요
Evidence
- SeeUnsafe(GPT-4o) 분류 정확도 76.31% vs GPT-4o vanilla 71.49% vs GPT-4o mini vanilla 58.23% vs VideoCLIP 27.71%
- 시각적 그라운딩 성공률: GPT-4o 기준 136개 영상 중 51.47%, 유효 마스크 보유 88개 영상 기준 87.5%
- IMS 지표에서 BLEU/ROUGE의 한계 실증: 보행자↔자전거 오인식에도 ROUGE 점수 0.90 이상 유지, 위치 오류만으로 BLEU 21.3% 하락(0.89→0.70)하는 비일관성 확인
- 야간 vs 주간 전체 정확도: 야간 42.11%(VP 미사용) vs 주간 68.18%(VP 미사용), 야간에서 VP 추가 시 42.11%→36.84%로 오히려 하락
How to Apply
- 대량 CCTV 영상 처리 파이프라인에 적용 시: 영상을 3프레임씩 3개 클립으로 분할 → GPT-4o로 각 클립 분류 → 가장 심각한 클래스를 최종 라벨로 선택하는 severity aggregation 로직을 구현하면 긴 영상 처리 비용과 hallucination을 줄일 수 있음
- 사고 관련 객체 추적이 필요한 경우: GroundingDINO로 첫 프레임에서 person/car/cyclist 탐지 → SAM으로 이후 프레임 추적 → 경계선만 오버레이한 이미지를 GPT-4o에 입력하면 'Pedestrian ID: 3, Car ID: 5' 형태로 관련 객체 ID 반환
- LLM 기반 응답 품질 평가가 필요한 경우: BLEU/ROUGE 대신 IMS 프롬프트(Prompt 5 참고)를 그대로 복사해서 GPT-4o 평가 에이전트를 구성하고, temperature=0.5로 3회 반복 평균 내면 더 신뢰성 높은 평가 점수를 얻을 수 있음
Code Example
Terminology
Related Resources
Original Abstract (Expand)
The increasing availability of traffic videos functioning on a 24/7/365 time scale has the great potential of increasing the spatio-temporal coverage of traffic accidents, which will help improve traffic safety. However, analyzing footage from hundreds, if not thousands, of traffic cameras in a 24/7/365 working protocol still remains an extremely challenging task, as current vision-based approaches primarily focus on extracting raw information, such as vehicle trajectories or individual object detection, but require laborious post-processing to derive actionable insights. We propose SeeUnsafe, a new framework that integrates Multimodal Large Language Model (MLLM) agents to transform video-based traffic accident analysis from a traditional extraction-then-explanation workflow to a more interactive, conversational approach. This shist significantly enhances processing throughput by automating complex tasks like video classification and visual grounding, while improving adaptability by enabling seamless adjustments to diverse traffic scenarios and user-defined queries. Our framework employs a severity-based aggregation strategy to handle videos of various lengths and a novel multimodal prompt to generate structured responses for review and evaluation to enable fine-grained visual grounding. We introduce IMS (Information Matching Score), a new MLLM-based metric for aligning structured responses with ground truth. We conduct extensive experiments on the Toyota Woven Traffic Safety dataset, demonstrating that SeeUnsafe effectively performs accident-aware video classification and enables visual grounding by building upon off-the-shelf MLLMs. Our code will be made publicly available upon acceptance.