cvg / DeepLSD

Implementation of the paper "DeepLSD: Line Segment Detection and Refinement with Deep Image Gradients"
MIT License
486 stars 62 forks source link

Training process: Questions about file paths and reading #12

Closed LiXiaoQiang123z closed 1 year ago

LiXiaoQiang123z commented 1 year ago

Sorry to bother you, stuck with the following question, please help, thank you very much. The Wireframe dataset is used. deeplsd/scripts/train.py About line 116: train_loader = dataset.get_data_loader('train') val_loader = dataset.get_data_loader('val') Is 'train' here the path to the training images of the dataset? So 'val' is the generated truth path?

error:

Traceback (most recent call last):
  File "/home/lxq/miniconda3/envs/dl-line/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/home/lxq/miniconda3/envs/dl-line/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/dataset/catkin_multi/V_or_L_or_I/line、point/DL-lines/DeepLSD/deeplsd/scripts/train.py", line 252, in <module>
    training(conf, output_dir, args)
  File "/home/dataset/catkin_multi/V_or_L_or_I/line、point/DL-lines/DeepLSD/deeplsd/scripts/train.py", line 116, in training
    train_loader = dataset.get_data_loader('train')
  File "/home/dataset/catkin_multi/V_or_L_or_I/line、point/DL-lines/DeepLSD/deeplsd/datasets/wireframe_ha.py", line 109, in get_data_loader
    return DataLoader(self.get_dataset(split), batch_size=batch_size,
  File "/home/lxq/miniconda3/envs/dl-line/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 344, in __init__
    sampler = RandomSampler(dataset, generator=generator)  # type: ignore[arg-type]
  File "/home/lxq/miniconda3/envs/dl-line/lib/python3.8/site-packages/torch/utils/data/sampler.py", line 107, in __init__
    raise ValueError("num_samples should be a positive integer "
ValueError: num_samples should be a positive integer value, but got num_samples=0
LiXiaoQiang123z commented 1 year ago

I have solved. the path setting problem.