Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems with using my own data set #51

Open
1ysine opened this issue Feb 13, 2025 · 2 comments
Open

Problems with using my own data set #51

1ysine opened this issue Feb 13, 2025 · 2 comments

Comments

@1ysine
Copy link

1ysine commented Feb 13, 2025

Hi,I converted my data set to wireframe format and encountered the following error.I have converted the json format to hdf5 format with offset, line_level, df,but an error is reported. I don't know why.

Traceback (most recent call last):
File "/root/miniconda3/envs/deeplsd/lib/python3.9/runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/root/miniconda3/envs/deeplsd/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/root/lys/DeepLSD/deeplsd/scripts/train.py", line 252, in
training(conf, output_dir, args)
File "/root/lys/DeepLSD/deeplsd/scripts/train.py", line 116, in training
train_loader = dataset.get_data_loader('train')
File "/root/lys/DeepLSD/deeplsd/datasets/wireframe_ha.py", line 99, in get_data_loader
return DataLoader(self.get_dataset(split), batch_size=batch_size,
File "/root/miniconda3/envs/deeplsd/lib/python3.9/site-packages/torch/utils/data/dataloader.py", line 376, in init
sampler = RandomSampler(dataset, generator=generator) # type: ignore[arg-type]
File "/root/miniconda3/envs/deeplsd/lib/python3.9/site-packages/torch/utils/data/sampler.py", line 164, in init
raise ValueError(
ValueError: num_samples should be a positive integer value, but got num_samples=0

@rpautrat
Copy link
Member

Did you make sure that the path to your dataset was correct and that your custom dataset was properly initialized? Because if it doesn't find any sample, it probably means that it couldn't find any training image...

@1ysine
Copy link
Author

1ysine commented Feb 13, 2025

Did you make sure that the path to your dataset was correct and that your custom dataset was properly initialized? Because if it doesn't find any sample, it probably means that it couldn't find any training image...

I got these outputs
[02/13/2025 16:29:33 INFO] Creating dataset WireframeHA
[02/13/2025 16:29:33 INFO] Found 103 in image folder.
[02/13/2025 16:29:33 INFO] Found 103 in GT folder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants