Skip to content

zkyseu/FlowLane

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

简体中文

🚀FlowLane: 基于Oneflow的车道线检测的工具包

在这个项目中,我们开发了FlowLane用于车道线检测。我们致力于为Oneflow社区开发一款实用的车道线检测工具包,欢迎加入我们来完善FlowLane。如果您觉得FlowLane不错,可以给我们项目一个star。

🆕新闻

在这个部分中,我们展示FlowLane中最新的改进。

  • [2023-12-11] 🔥 发布FlowLanev1,并提供UFLD模型的复现和预训练权重,以及CULane数据集的训练。

👀介绍

FlowLane是一个基于Oneflow的车道线检测工具包。Oneflow是一种高性能的深度学习框架。FlowLane开发的初衷是希望科研人员或者工程师能够通过一个框架方便地开发各类车道线检测算法。如果您对FlowLane有任何疑问或者建议,欢迎和我联系。

🌟框架总览

模型 框架组件
    Segmentation based
    Keypoint(anchor) based
    GAN based
Backbones
Necks
Losses
Metrics
  • Accuracy
  • FP
  • FN
Datasets
Data Augmentation
  • RandomLROffsetLABEL
  • Resize
  • RandomUDoffsetLABEL
  • RandomCrop
  • CenterCrop
  • RandomRotation
  • RandomBlur
  • Normalize
  • RandomHorizontalFlip
  • Colorjitters
  • RandomErasings
  • GaussianBlur
  • RandomGrayScale
  • Alaug

🛠️安装

具体步骤

步骤1 安装 oneflow

conda create -n flowlane python=3.8 -y
conda activate flowlane
python3 -m pip install --pre oneflow -f https://oneflow-staging.oss-cn-beijing.aliyuncs.com/branch/master/cu117 #具体的cuda和oneflow版本可以参照官网

步骤2 Git clone FlowLane

git clone https://github.com/zkyseu/FlowLane

步骤3 安装必要的依赖库

cd FlowLane
pip install -r requirements.txt

📘数据集准备(CULane和Tusimple为例)

CULane

CULane数据集准备步骤

下载 CULane. 接着解压到 $CULANEROOT. 创建 data 目录.

cd $LANEDET_ROOT
mkdir -p data
ln -s $CULANEROOT data/CULane

对于CULane数据集, 完成以上步骤你应该有下列数据集结构:

$CULANEROOT/driver_xx_xxframe    # data folders x6
$CULANEROOT/laneseg_label_w16    # lane segmentation labels
$CULANEROOT/list                 # data lists

自制数据集

我们将会在后续版本发布自制数据集的教程。

💎开始快乐炼丹

1、训练的命令

开启训练

对于训练, 运行以下命令(shell脚本在script文件夹下)。其中config_path表示config的路径

# training on single-GPU
export CUDA_VISIBLE_DEVICES=0
bash scripts/train.sh config_path

2、测试

开启测试

运行以下命令开启模型的测试,model_path表示模型权重。

bash scripts/eval.sh config_path model_path

3、模型导出

开启模型导出

如果你想将模型导出为预训练的格式(只保留模型权重去除优化器以及学习率的权重),可以使用以下命令,其中 model.pth为需要被导出的模型权重

python tools/train.py -c configs/ufld/resnet50_culane.py --export output_dir/model.pth

License

PPLanedet使用MIT license。但是我们仅允许您将FlowLane用于学术用途。

致谢

引用

如果您认为我们的项目对您的研究有用,请引用我们的项目

@misc{FlowLane,
    title={FlowLane, A Toolkit for lane detection based on Oneflow},
    author={Kunyang Zhou},
    howpublished = {\url{https://github.com/zkyseu/FlowLane}},
    year={2023}
}