cfzd / Ultra-Fast-Lane-Detection

Ultra Fast Structure-aware Deep Lane Detection (ECCV 2020)
MIT License
1.82k stars 493 forks source link

Questions about training on my own data #31

Closed garryz94 closed 4 years ago

garryz94 commented 4 years ago

Hi @cfzd , thanks for your great work, it's really impressive! When I train your model on my own data, I notice that my own data doesn't have instance-level land ids like CULane or TuSimple, and it is hard for me to label them. So I want to know what will happen when I set num_lanes to 1? In my opinion, the network will lose the ability to distinguish different lanes, but the ability to locate lane points will remain.

ylc2580 commented 4 years ago

作者的代码不是只使用了原图和二值图吗?我用这两个就能训练起来,只有2000数据,效果很差,还在分析原因。0.0

cfzd commented 4 years ago

@garryz94 Hi, setting num_lanes to 1 may not work. As you said, we need instance-level annotations so that our methods could know which lane is present and how to locate it.

But I think converting the class-agnostic annotation to class-aware one is not that hard. I have a prototype solution:

  1. obtain the class-agnostic segmentation map
  2. scan the segmentation map from bottom to top, from left to right.
  3. for each scan line from left to right, when the annotation changes from "background" to "lane", count it and record it.
  4. transform the record to instance-level annotation.

A simple example: use '-' for background and '*' for a lane. The annotation in a scan line might be like:

'--------****-------****---------***---------'

when you do the scan, you can do the above counting and record like:

'--------1111-------2222---------3333---------'

Then you get it.

cfzd commented 4 years ago

@ylc2580 Only using binary segmentation will not work. Please see the related code and this issue.

garryz94 commented 4 years ago

@garryz94 Hi, setting num_lanes to 1 may not work. As you said, we need instance-level annotations so that our methods could know which lane is present and how to locate it.

But I think converting the class-agnostic annotation to class-aware one is not that hard. I have a prototype solution:

  1. obtain the class-agnostic segmentation map
  2. scan the segmentation map from bottom to top, from left to right.
  3. for each scan line from left to right, when the annotation changes from "background" to "lane", count it and record it.
  4. transform the record to instance-level annotation.

A simple example: use '-' for background and '*' for a lane. The annotation in a scan line might be like:

'------------------------***---------'

when you do the scan, you can do the above counting and record like:

'--------1111-------2222---------3333---------'

Then you get it.

It is a great label strategy, thanks! But it seems that CULane labels four lanes including the left lane line of the current vehicle lane, the right lane line of the current vehicle lane, the left lane line of the left lane of the current vehicle and the right lane line of the right lane of the current vehicle. And CULane use 0/1 to present the existence of the lane lines in this order. Sadly I can't label lanes in this special order and I can't label the existence because I don't know which lane the vehicle is currently driving on. With your solution, I can label the lane lines from left to right, which is different from CULane. Does this label strategy work for me?

cfzd commented 4 years ago

@garryz94 In fact, the Tusimple dataset also doesn't include the spatial order as you mentioned above. So we implemented a script to get the spatial order in scripts/convert_tusimple.py. The core idea is to distinguish the order with it's fitted slope information. You can modify and use this script to achieve your goal.

gneworld commented 4 years ago

@cfzd hi, cfzd After training 50 epochs, I got following test results, ....... res_normal 0.895078 res_crowd 0.674346 res_night 0.642249 res_noline 0.401987 res_shadow 0.661217 res_arrow 0.839021 res_hlight 0.603785 res_curve 0.595709 res_cross 0.0 0.6999230162150123

so is it seemed ok? But when I test the culane model on my own lane video, it works much worse than that in your demo video, I don't know what factors lead to this inconsistent result, looking forward to your reply

ylc2580 commented 4 years ago

你好,你训练时候自己的数据怎么弄的呢?作者的方法还没试,好不好弄,,Ծ^Ծ,,

---Original--- From: "gneworld"<notifications@github.com> Date: Sat, Jul 11, 2020 23:21 PM To: "cfzd/Ultra-Fast-Lane-Detection"<Ultra-Fast-Lane-Detection@noreply.github.com>; Cc: "Mention"<mention@noreply.github.com>;"ylc2580"<403658190@qq.com>; Subject: Re: [cfzd/Ultra-Fast-Lane-Detection] Questions about training on my own data (#31)

@cfzd hi, cfzd After training 50 epochs, I got following test results, ....... res_normal 0.895078 res_crowd 0.674346 res_night 0.642249 res_noline 0.401987 res_shadow 0.661217 res_arrow 0.839021 res_hlight 0.603785 res_curve 0.595709 res_cross 0.0 0.6999230162150123

so is it seemed ok? But when I test the culane model on my own lane video, it works much worse than that in your demo video, I don't know what factors lead to this inconsistent result, looking forward to your reply

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

cfzd commented 4 years ago

@gneworld Can you please open a new issue about this problem? Also, please upload the worse visualization.

garryz94 commented 4 years ago

你好,你训练时候自己的数据怎么弄的呢?作者的方法还没试,好不好弄,,Ծ^Ծ,, ---Original--- From: "gneworld"<notifications@github.com> Date: Sat, Jul 11, 2020 23:21 PM To: "cfzd/Ultra-Fast-Lane-Detection"<Ultra-Fast-Lane-Detection@noreply.github.com>; Cc: "Mention"<mention@noreply.github.com>;"ylc2580"<403658190@qq.com>; Subject: Re: [cfzd/Ultra-Fast-Lane-Detection] Questions about training on my own data (#31) @cfzd hi, cfzd After training 50 epochs, I got following test results, ....... res_normal 0.895078 res_crowd 0.674346 res_night 0.642249 res_noline 0.401987 res_shadow 0.661217 res_arrow 0.839021 res_hlight 0.603785 res_curve 0.595709 res_cross 0.0 0.6999230162150123 so is it seemed ok? But when I test the culane model on my own lane video, it works much worse than that in your demo video, I don't know what factors lead to this inconsistent result, looking forward to your reply — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

Hi @ylc2580 , you can follow the instructions of CULane dataset.