Closed J-xinyu closed 3 years ago
你可以不下图片,只下标注,然后只运行train.py里233行的train()以前的部分来获取TuSimple格式.
或者你可以通过自己的脚本来读取TuSimple的标注文件,从而把你的标注文件转换为TuSimple格式.
Suppose your dataset has an image and corresponding label file /path/to/images/lane0001.jpg /path/to/annotations/lane0001.json (txt or other formats are also ok, you need to load them by yourself)
After loading .../lane00001.json to become a python object, like a dictionary { 1thLane: [(0., 1.), (2., 3.), (4., 5.)], 2thLane: [(6., 7.), (8., 9.), (10., 11.)], 3thLane: [(12., 13.), (14., 15.), (16., 17.)] }
Then you need to modify the TUSIMPLE._extract_data(self) in db.tusimple.py. The ultimate objective is to feed the self._old_annotations by:
'path': /path/to/images/lane0001.jpg, 'org_path': lane0001.jpg, 'org_lanes': [[0., 2., 4.], [6., 8., 10.], [12., 14., 16.]], 'lanes': [[(0., 1.), (2., 3.), (4., 5.)], [(6., 7.), (8., 9.), (10., 11.)], [(12., 13.), (14., 15.), (16., 17.)]], 'aug': False, 'y_samples':[[1., 3., 5.], [7., 9., 11.], [13., 15., 17.]]
Other codes in this function (mainly the pipeline) might be held with minor modifications.
See if there are any other problems I can help you with.
老哥请问一下怎么把自己的数据集转成tusimple那种格式的呀,,那个数据集太大了我没下,所以我不知道他json的内容,我之前用lanenet的时候是把数据集按照img,gt_binary_image,gt_instance_image,train.txt,val.txt。不知道这里应该怎么存放求助求助
想请问一下您制作成功了吗?
Suppose your dataset has an image and corresponding label file /path/to/images/lane0001.jpg /path/to/annotations/lane0001.json (txt or other formats are also ok, you need to load them by yourself)
After loading .../lane00001.json to become a python object, like a dictionary { 1thLane: [(0., 1.), (2., 3.), (4., 5.)], 2thLane: [(6., 7.), (8., 9.), (10., 11.)], 3thLane: [(12., 13.), (14., 15.), (16., 17.)] }
Then you need to modify the TUSIMPLE._extract_data(self) in db.tusimple.py. The ultimate objective is to feed the self._old_annotations by:
'path': /path/to/images/lane0001.jpg, 'org_path': lane0001.jpg, 'org_lanes': [[0., 2., 4.], [6., 8., 10.], [12., 14., 16.]], 'lanes': [[(0., 1.), (2., 3.), (4., 5.)], [(6., 7.), (8., 9.), (10., 11.)], [(12., 13.), (14., 15.), (16., 17.)]], 'aug': False, 'y_samples':[[1., 3., 5.], [7., 9., 11.], [13., 15., 17.]]
Other codes in this function (mainly the pipeline) might be held with minor modifications.
See if there are any other problems I can help you with.
I followed your method, but the following error occurred,What do I need to do next?Looking forward to your reply!
老哥请问一下怎么把自己的数据集转成tusimple那种格式的呀,,那个数据集太大了我没下,所以我不知道他json的内容,我之前用lanenet的时候是把数据集按照img,gt_binary_image,gt_instance_image,train.txt,val.txt。不知道这里应该怎么存放求助求助