# 3DLaneDetection
**Repository Path**: abonaventure/AD_LaneDetection
## Basic Information
- **Project Name**: 3DLaneDetection
- **Description**: No description available
- **Primary Language**: Unknown
- **License**: MIT
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2025-07-11
- **Last Updated**: 2025-09-03
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# PolarLane 车道线检测模型
## 📌 论文
**PolarLane: Robust BEV Lane Detection based on Polar Coordinates**
*Expert Systems With Applications (Under Review)*
## ⚠️ 当前版本说明
> **注意**:当前版本存在以下已知问题:
>
> - **坐标系问题**:极坐标到直角坐标的转换未正确定义,导致输出被强制拟合到直角坐标系(当前F1-Score 62.2%)
> - **可视化没完全成功**:保存结果的方法存在问题,生成的3D点实际上跟训练的有区别,现在正在修bug
## 🎥 效果演示
**演示视频**:[点击观看](https://youtu.be/efOCy69ju1E)
## 📦 模型权重
| 版本 | 性能 | 下载链接 |
|------|------|----------|
| v1.0 | 62.2% F1 | [Google Drive](https://drive.google.com/drive/folders/1DLcqV6Uw8CNGQOR7knFubt0l0pyx0HMF?usp=drive_link) |
## 🚀 快速开始
### 1. 环境配置 (Ubuntu20.04 + CUDA-11.1)
```bash
# 创建conda环境
conda create -n polarlane python=3.8 -y
conda activate polarlane
# 安装PyTorch
conda install pytorch==1.8.0 torchvision==0.9.0 torchaudio==0.8.0 cudatoolkit=11.1 -c pytorch -c conda-forge
# 安装MMCV
git clone https://github.com/open-mmlab/mmcv.git && cd mmcv
git checkout v1.5.0
FORCE_CUDA=1 MMCV_WITH_OPS=1 pip install -e .
# 安装MMDetection3D
pip install mmdet==2.24.0
git clone https://github.com/open-mmlab/mmdetection3d.git && cd mmdetection3d
git checkout v1.0.0rc3
pip install -v -e .
# 安装其他依赖
pip install -r requirements.txt
```
### 2. 数据集准备
```text
PolarLane/
├── data/
│ ├── openlane/
│ │ ├── images/ # 原始图像
│ │ └── lane3d_1000/ # 标注数据
└── ...
```
数据集下载:[OpenLane官方GitHub](https://github.com/OpenDriveLab/OpenLane/blob/main/data/README.md)
### 3. 训练与推理
```bash
# 训练 (单GPU)
CUDA_VISIBLE_DEVICES=0 python -m torch.distributed.launch \
--nproc_per_node 1 main.py \
--config config/OpenLane/polarlane_r50.py
# 推理
CUDA_VISIBLE_DEVICES=0 python -m torch.distributed.launch \
--nproc_per_node 1 main.py \
--config config/OpenLane/polarlane_r50.py \
--cfg-options evaluate=true eval_ckpt=path/to/checkpoint.pth
```
### 4. 可视化工具
1. 下载[推理结果](https://drive.google.com/drive/folders/1FUfVBi74dX2p2VXv7sQLYb09bsk38O6h?usp=drive_link)
2. 按以下结构存放:
```text
PolarLane/data/openlane/results3d/validation/
├── segment-17065833287841703_2980_000_3000_000_with_camera_labels/
│ └── ...
└── ...
```
3. 运行可视化:
```bash
python visualizer/run_visualization.py
```