【解决---车道线检测 UFLD 算法 No such file or directory /txt/out0_normal.txt‘】

项目场景:

在使用UFLD车道线检测算法针对CULane数据集进行训练的过程中遇到了no out0_normal.txt文件的bug!!!


问题描述

FileNotFoundError: [Errno 2] No such file or directory: '/line_detection/UFLD-v2/log_culane/20231218_191137_lr_5e-02_b_32/txt/out0_normal.txt'

loading cached data
cached data loaded
556
100%|███| 556/556 [16:39<00:00,  1.80s/it, col_top1=0.018, col_top2=0.049, col_top3=0.078, ext_col=0.909, ext_row=0.865, loss=7.990, top1=0.024, top2=0.071, top3=0.118]
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 420/420 [04:28<00:00,  1.57it/s]
sh: 1: ./evaluation/culane/evaluate: not found
sh: 1: ./evaluation/culane/evaluate: not found
sh: 1: ./evaluation/culane/evaluate: not found
sh: 1: ./evaluation/culane/evaluate: not found
sh: 1: ./evaluation/culane/evaluate: not found
sh: 1: ./evaluation/culane/evaluate: not found
sh: 1: ./evaluation/culane/evaluate: not found
sh: 1: ./evaluation/culane/evaluate: not found
sh: 1: ./evaluation/culane/evaluate: not found
Traceback (most recent call last):
  File "train.py", line 120, in <module>
    res = eval_lane(net, cfg, ep = epoch, logger = logger)
  File "/line_detection/UFLD-v2/evaluation/eval_wrapper.py", line 899, in eval_lane
    res = call_culane_eval(cfg.data_root, 'culane_eval_tmp', cfg.test_work_dir)
  File "/line_detection/UFLD-v2/evaluation/eval_wrapper.py", line 1022, in call_culane_eval
    res_all['res_normal'] = read_helper(out0)
  File "/line_detection/UFLD-v2/evaluation/eval_wrapper.py", line 960, in read_helper
    lines = open(path, 'r').readlines()[1:]
FileNotFoundError: [Errno 2] No such file or directory: '/line_detection/UFLD-v2/log_culane/20231218_191137_lr_5e-02_b_32/txt/out0_normal.txt'

原因分析:

没有仔细阅读install readme!!!


解决方案:

Install CULane evaluation tools (Only required for testing).

If you just want to train a model or make a demo, this tool is not necessary and you can skip this step. If you want to get the evaluation results on CULane, you should install this tool.

This tools requires OpenCV C++. Please follow here to install OpenCV C++. When you build OpenCV, remove the paths of anaconda from PATH or it will be failed.

First you need to install OpenCV C++.

After installation, make a soft link of OpenCV include path.

ln -s /usr/local/include/opencv4/opencv2 /usr/local/include/opencv2
We provide three kinds of complie pipelines to build the evaluation tool of CULane.

Option 1:

cd evaluation/culane
make
Option 2:

cd evaluation/culane
mkdir build && cd build
cmake ..
make
mv culane_evaluator ../evaluate

okok问题解决!!!

  • 12
    点赞
  • 13
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值