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

dataset for training #2

Closed
weberhen opened this issue Feb 25, 2021 · 3 comments
Closed

dataset for training #2

weberhen opened this issue Feb 25, 2021 · 3 comments

Comments

@weberhen
Copy link

weberhen commented Feb 25, 2021

Hi,

congrats for the great work!

I'm trying to run the training code and I'm getting the following error:

(base) root@bd14969643f5:~/codes/Illumination-Estimation/RegressionNetwork# CUDA_VISIBLE_DEVICES=2 python train.py
  + Number of params: 9.50M
0 optim: 0.001
Traceback (most recent call last):
  File "train.py", line 68, in <module>
    for i, para in enumerate(dataloader):
  File "/opt/conda/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 435, in __next__
    data = self._next_data()
  File "/opt/conda/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 475, in _next_data
    data = self._dataset_fetcher.fetch(index)  # may raise StopIteration
  File "/opt/conda/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 44, in fetch
    data = [self.dataset[idx] for idx in possibly_batched_index]
  File "/opt/conda/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 44, in <listcomp>
    data = [self.dataset[idx] for idx in possibly_batched_index]
  File "/root/codes/Illumination-Estimation/RegressionNetwork/data.py", line 68, in __getitem__
    training_pair['depth'] = torch.from_numpy(gt['depth']).float()
KeyError: 'depth'

I generated the dataset using distribution_representation.py, but I could not find anywhere the depth being added to the list.

Thanks for the help!

@fnzhan
Copy link
Owner

fnzhan commented Feb 26, 2021

I obtain the depth value by sending email to the author of 'deep parametric indoor lighting estimation'. Then the depth map can be processed similarly to obtain the ground truth for regression.

And you can also delete the depth part directly, and run the model, which is equivalent to EMLight.

@weberhen
Copy link
Author

I see, thanks!

And from the depth map, you actually only need the depth on the (128) anchor points right?

@fnzhan
Copy link
Owner

fnzhan commented Feb 27, 2021

I see, thanks!

And from the depth map, you actually only need the depth on the (128) anchor points right?

In fact, we average the depth of pixels assigned to an anchor points, but it's not a big difference.

@fnzhan fnzhan closed this as completed Feb 27, 2021
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