Closed gneworld closed 3 years ago
please reference the document: https://github.com/huawei-noah/vega/blob/master/docs/en/algorithms/auto_lane.md
the file format:
# dataset.py
def create_train_subset(num=None):
return [{'image_path':'/the/path/to/train/image1.jpg',
'annot_path':'/the/path/to/train/image1.lines.json'},
{'image_path':'/the/path/to/train/image2.jpg',
'annot_path':'/the/path/to/train/image2.lines.json'},...]
def create_test_subset(num=None):
return [{'image_path':'/the/path/to/test/image1.jpg',
'annot_path':'/the/path/to/test/image1.lines.json'},
{'image_path':'/the/path/to/test/image2.jpg',
'annot_path':'/the/path/to/test/image2.lines.json'},...]
def create_valid_subset(num=None):
return [{'image_path':'/the/path/to/val/image1.jpg',
'annot_path':'/the/path/to/val/image1.lines.json'},
{'image_path':'/the/path/to/val/image2.jpg',
'annot_path':'/the/path/to/val/image2.lines.json'},...]
In the next version, this file is no longer needed. The next version will be released soon.
@zhangjiajin there is only one images folder in test folder for curvelanes dataset, so how should I supply create_test_subset?
@sptj
There is nothing about how many images/jsons/txt...etc. folder in test or train folder, just generate absoluate path to your image and annotations. Please read the auto_lane.md carefully.
@sptj there is no annotations files in test folder, so I only need generate absoluate path for images without annotations like this?
def create_test_subset(num=None): stage = 'test' list = [] path = os.path.join(os.path.dirname(os.path.realpath(file)), 'Curvelanes/' + stage + '/images/') for file in os.listdir(path): key = dict() key['image_path'] = os.path.join(path, file) list.append(key)
# print(list)
return list
@Lzc06
@gneworld We have released a new version that does not require dataset.py. Please try again.
hello, I met this error when I try to train the auto-lane model with culane dataset. There is no dataset.py in culane dataset, so where can I get dataset.py file, many thanks!!! Traceback (most recent call last): File "", line 1, in
File "/home/haha/.local/lib/python3.7/site-packages/vega/core/trainer/trainer.py", line 152, in train_process
self.build(model=self.model, hps=self.hps, load_ckpt_flag=self.load_ckpt_flag)
File "/home/haha/.local/lib/python3.7/site-packages/vega/core/trainer/trainer.py", line 189, in build
mode='train', loader=train_loader)
File "/home/haha/.local/lib/python3.7/site-packages/vega/core/trainer/trainer.py", line 360, in _init_dataloader
dataset = dataset_cls(mode=mode)
File "/home/haha/.local/lib/python3.7/site-packages/vega/datasets/pytorch/auto_lane_datasets.py", line 97, in init
train=load_module(self.args.dataset_file).create_train_subset(),
File "/home/haha/.local/lib/python3.7/site-packages/vega/datasets/pytorch/common/auto_lane_utils.py", line 214, in load_module
spec.loader.exec_module(mod)
File "", line 724, in exec_module
File "", line 859, in get_code
File "", line 916, in get_data
FileNotFoundError: [Errno 2] No such file or directory: '/cache/dataset/CULane/dataset.py'
2020-09-08 15:47:20.949 INFO {'code': 'r34_48_1-1111-1-22112111111111111111+012-122', 'method': 'random'}