cfzd / Ultra-Fast-Lane-Detection-v2

Ultra Fast Deep Lane Detection With Hybrid Anchor Driven Ordinal Classification (TPAMI 2022)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tusimple数据集相关错误询问

QIANXUNZDL123 opened this issue · comments

commented

作者您好,我训练自己的数据集(格式为:Tusimple格式)出现一下错误:我应该如何修改呢
image
数据集格式:
image

config如何:
dataset= 'Tusimple'
data_root= 'train_dataset' # Need to be modified before running
epoch= 100
batch_size= 1
optimizer= 'SGD'
learning_rate= 0.05
weight_decay= 0.0001
momentum= 0.9
scheduler= 'multi'
steps= [50,75]
gamma= 0.1
warmup= 'linear'
warmup_iters= 100
backbone= '18'
griding_num= 100
use_aux= False
sim_loss_w= 0.0
shp_loss_w= 0.0
note= ''
log_path= ''
finetune= None
resume= None
test_model= ''
test_work_dir= ''
num_lanes= 4
var_loss_power= 2.0
auto_backup= True
num_row= 56
num_col= 41
train_width= 800
train_height= 320
num_cell_row= 100
num_cell_col= 100
mean_loss_w= 0.05
fc_norm= False
soft_loss= True
cls_loss_col_w= 1.0
cls_ext_col_w= 1.0
mean_loss_col_w= 0.05
eval_mode= 'normal'
crop_ratio = 0.8

commented

@QIANXUNZDL123

if len(json_gt) != len(json_pred):
raise Exception('We do not get the predictions of all the test tasks')

因为你ground truth中的样本数和你的预测的样本数不一致导致的

PS 你训练时的loss都nan了,你可能需要降低学习率

commented

@QIANXUNZDL123

if len(json_gt) != len(json_pred):
raise Exception('We do not get the predictions of all the test tasks')

因为你ground truth中的样本数和你的预测的样本数不一致导致的
PS 你训练时的loss都nan了,你可能需要降低学习率
ground truth是test_lable.json吗??我打印json_gt是output输出得txt文件牙。。。。

@QIANXUNZDL123
我在使用 tusimple 格式訓練自定義的資料集時也遇到相同的問題,
你可以先檢查 len(json_gt) 與 len(json_pred) 數量各是多少
我的情況是json_pred只有一個
發現原因是下面這段

for i, res in enumerate(all_res):
pos = res.find('clips')
name = res[pos:].split('\"')[0]
if name not in names:
names.add(name)
all_res_no_dup.append(res)

因為 name 都是一樣的,所以造成只會生成一個預測結果
可以修改你的資料路徑
或是改res.find('your_path') 讓 name 不要重複

commented

@QIANXUNZDL123 我在使用 tusimple 格式訓練自定義的資料集時也遇到相同的問題, 你可以先檢查 len(json_gt) 與 len(json_pred) 數量各是多少 我的情況是json_pred只有一個 發現原因是下面這段

for i, res in enumerate(all_res):
pos = res.find('clips')
name = res[pos:].split('\"')[0]
if name not in names:
names.add(name)
all_res_no_dup.append(res)

因為 name 都是一樣的,所以造成只會生成一個預測結果 可以修改你的資料路徑 或是改res.find('your_path') 讓 name 不要重複

大佬 我的也是json_pred只有一个,能不能看看你怎么修改的,,0.0

commented

@QIANXUNZDL123 我在使用 tusimple 格式訓練自定義的資料集時也遇到相同的問題, 你可以先檢查 len(json_gt) 與 len(json_pred) 數量各是多少 我的情況是json_pred只有一個 發現原因是下面這段

for i, res in enumerate(all_res):
pos = res.find('clips')
name = res[pos:].split('\"')[0]
if name not in names:
names.add(name)
all_res_no_dup.append(res)

因為 name 都是一樣的,所以造成只會生成一個預測結果 可以修改你的資料路徑 或是改res.find('your_path') 讓 name 不要重複

大佬 我改了一下现在能跑了,因为我是自己制作的数据集的(不是车道线数据集),修改了names,生成得tusimple_eval_tmp.txt,lane这个都空的。。。。。都快麻了。。
image

tusimple数据集里的json文件下不下来,作者能给个地址吗