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

Training depth image #6

Open
FXY0117 opened this issue Mar 26, 2022 · 4 comments
Open

Training depth image #6

FXY0117 opened this issue Mar 26, 2022 · 4 comments

Comments

@FXY0117
Copy link

FXY0117 commented Mar 26, 2022

Excuse me, how can I get the training depth image? It seems doesn't work when I training with my own dataset.

@nie-lang
Copy link
Owner

We adopt a pre-trained model [1] to predict the depth. You can use the same model to predict the depth of your own dataset. Be careful that the depth images we load are saved as grayscale images ranging from 0 to 255.

Or, you can set depth_num = 1 (line59 at https://github.com/nie-lang/Multi-Grid-Deep-Homography/blob/main/Codes/loss_functions.py) to train a model without depth awareness.

[1] K. Xian, J. Zhang, O. Wang, L. Mai, Z. Lin, and Z. Cao, “Structure-guided ranking loss for single image depth prediction,” in The IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), June 2020.

@FXY0117
Copy link
Author

FXY0117 commented Mar 27, 2022

Thank You! But When I training without depth assistance in my own dataset, another question occurs:

Traceback (most recent call last):
File "/home/zbb/anaconda3/envs/tensor/lib/python3.6/site-packages/tensorflow/python/ops/script_ops.py", line 207, in call
ret = func(*args)
File "/home/zbb/anaconda3/envs/tensor/lib/python3.6/site-packages/tensorflow/python/data/ops/dataset_ops.py", line 449, in generator_py_func
values = next(generator_state.get_iterator(iterator_id))
File "/home/zbb/Multi-Grid-Deep-Homography-main/Codes/utils.py", line 50, in data_clip_generator
data_clip.append(np_load_frame(data_info_list[2]['frame'][frame_id], self.height, self.width))
IndexError: list index out of range

Is there something wrong with my own dataset?

@nie-lang
Copy link
Owner

Please create the depth folder although you do not use it. For example, copy the 'input1' folder and rename it as "depth2".

@FXY0117
Copy link
Author

FXY0117 commented Mar 27, 2022

OK, It works. Thank you !

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