Detect Bicycle Violations
from Video

2026年4月施行の自転車「青切符」対象違反をAIで自動検知。
ながらスマホ・信号無視・傘差し運転・逆走・歩道走行 — YOLO + pose estimation + VLM verification. Open source.

青切符対象違反の検知

自転車の交通反則通告制度(青切符)の対象となる113種類の違反のうち、 映像解析で検知可能な5種類をAIで自動検出。16歳以上が対象、反則金5,000〜12,000円。

📱

ながらスマホ

自転車運転中のスマホ操作を検知。YOLO cell phone検出 + 人物-自転車ペアリング。反則金 12,000円。

🚧

信号無視

赤信号での交差点通過を検知。信号ROI色判定 + crossing zone内の移動体検出。反則金 6,000円。

☔

傘差し運転

傘を差しながらの自転車運転を検知。umbrella検出 + cyclist bboxオーバーラップ判定。反則金 6,000円。

←

逆走(右側通行)

車道右側の逆走を検知。移動方向角度 vs 期待走行方向で判定。反則金 6,000円。

🚶

歩道走行

歩道上の自転車走行を検知。ROIポリゴンで歩道エリアを定義し位置判定。反則金 6,000円。

🚬

歩きタバコ(付加機能)

路上喫煙禁止区域での歩きタバコを検知。タバコ検出モデル + VLM検証。条例違反 過料2,000円。

How it works

A four-stage pipeline processes each video frame. All thresholds and rules are externalized to a YAML config file.

01

Detection

YOLOv8 detects persons, bicycles, phones, umbrellas, and other objects in each frame.

02

Tracking

IoU-based SORT tracker assigns persistent IDs to detected objects across frames.

03

Behavior Analysis

Rule-based analyzers evaluate spatial relationships, movement patterns, and temporal persistence.

04

Output

Violations are logged as structured JSON events and overlaid on the output video.

Demo

Sample detection results from the pipeline. Select a video to view detected events.

▶
Loading...
0:000:30
Smoking
Phone
Red Light
Statistics
Detected Events 0 events

JSON Preview

Each run produces a structured JSON file with all detected violation events.

events.json auto-generated
Loading...

Violation Heatmap

Geo-referenced violations from multiple camera locations. Click a marker for details.

Walking Smoking
Bicycle Phone
Bicycle Umbrella
Wrong Way
Red Light
Sidewalk

Roadmap

Planned improvements and extensions.

Shipped

Core pipeline

YOLO detection, SORT tracking, rule-based violation analysis, JSON + video output.

Shipped

Signal violation detection

Detect bicycles running red lights using traffic signal state recognition.

Shipped

Wrong-way cycling

Detect bicycles traveling against the expected traffic direction.

Shipped

Sidewalk cycling

Detect bicycles on pedestrian sidewalks using ROI-based zone detection.

Planned

Pose-based smoking

Replace proxy-object heuristics with keypoint-based hand-to-mouth detection.

Shipped

Map integration

Geo-referenced violation heatmaps for city-scale analysis.