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

在bash scripts/reproduce_train/eloftr_outdoor.sh eloftr_outdoor出现的错误 #56

Open
xsd-yh opened this issue Dec 11, 2024 · 9 comments

Comments

@xsd-yh
Copy link

xsd-yh commented Dec 11, 2024

Traceback (most recent call last):
File "./train.py", line 154, in
main()
File "./train.py", line 150, in main
trainer.fit(model, datamodule=data_module)
File "/home/xsd/anaconda3/envs/eloftr_training/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 458, in fit
self._run(model)
File "/home/xsd/anaconda3/envs/eloftr_training/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 756, in _run
self.dispatch()
File "/home/xsd/anaconda3/envs/eloftr_training/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 797, in dispatch
self.accelerator.start_training(self)
File "/home/xsd/anaconda3/envs/eloftr_training/lib/python3.8/site-packages/pytorch_lightning/accelerators/accelerator.py", line 96, in start_training
self.training_type_plugin.start_training(trainer)
File "/home/xsd/anaconda3/envs/eloftr_training/lib/python3.8/site-packages/pytorch_lightning/plugins/training_type/training_type_plugin.py", line 144, in start_training
self._results = trainer.run_stage()
File "/home/xsd/anaconda3/envs/eloftr_training/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 807, in run_stage
return self.run_train()
File "/home/xsd/anaconda3/envs/eloftr_training/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 842, in run_train
self.run_sanity_check(self.lightning_module)
File "/home/xsd/anaconda3/envs/eloftr_training/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 1107, in run_sanity_check
self.run_evaluation()
File "/home/xsd/anaconda3/envs/eloftr_training/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 949, in run_evaluation
for batch_idx, batch in enumerate(dataloader):
File "/home/xsd/anaconda3/envs/eloftr_training/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 681, in next
data = self._next_data()
File "/home/xsd/anaconda3/envs/eloftr_training/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1376, in _next_data
return self._process_data(data)
File "/home/xsd/anaconda3/envs/eloftr_training/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1402, in _process_data
data.reraise()
File "/home/xsd/anaconda3/envs/eloftr_training/lib/python3.8/site-packages/torch/_utils.py", line 461, in reraise
raise exception
OSError: Caught OSError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "/home/xsd/anaconda3/envs/eloftr_training/lib/python3.8/site-packages/torch/utils/data/_utils/worker.py", line 302, in _worker_loop
data = fetcher.fetch(index)
File "/home/xsd/anaconda3/envs/eloftr_training/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 49, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/xsd/anaconda3/envs/eloftr_training/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 49, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/xsd/anaconda3/envs/eloftr_training/lib/python3.8/site-packages/torch/utils/data/dataset.py", line 235, in getitem
return self.datasets[dataset_idx][sample_idx]
File "/home/xsd/EfficientLoFTR/src/datasets/megadepth.py", line 88, in getitem
depth0 = read_megadepth_depth(
File "/home/xsd/EfficientLoFTR/src/utils/dataset.py", line 133, in read_megadepth_depth
depth = np.array(h5py.File(path, 'r')['depth'])
File "/home/xsd/anaconda3/envs/eloftr_training/lib/python3.8/site-packages/h5py/_hl/files.py", line 424, in init
fid = make_fid(name, mode, userblock_size,
File "/home/xsd/anaconda3/envs/eloftr_training/lib/python3.8/site-packages/h5py/_hl/files.py", line 190, in make_fid
fid = h5f.open(name, flags, fapl=fapl)
File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
File "h5py/h5f.pyx", line 96, in h5py.h5f.open
OSError: Unable to open file (unable to open file: name = 'data/megadepth/test/phoenix/S6/zl548/MegaDepth_v1/0022/dense0/depths/427154679_de14c315f4_o.h5', errno = 2, error message = 'No such file or directory', flags = 0, o_flags = 0)

@xsd-yh
Copy link
Author

xsd-yh commented Dec 11, 2024

你好,请问您我在readme最后一步的过程中出现以下错误:Unable to open file (unable to open file: name = 'data/megadepth/test/phoenix/S6/zl548/MegaDepth_v1/0022/dense0/depths/427154679_de14c315f4_o.h5', errno = 2, error message = 'No such file or directory', flags = 0, o_flags = 0),而我的data/megadepth/test/里并没有phoenix及其下属文件夹,这个该怎么解决呢,您的包里面以及链接里面的内容我已下载好,是哪一步出现问题了呢,麻烦您解答一下,谢谢。

@wyf2020
Copy link
Contributor

wyf2020 commented Dec 11, 2024

请参考LoFTR的训练文档链接数据集,我猜测是缺少了这一步
ln -sv /path/to/megadepth/phoenix /path/to/megadepth_d2net/Undistorted_SfM /path/to/LoFTR/data/megadepth/test

@xsd-yh
Copy link
Author

xsd-yh commented Dec 11, 2024 via email

@xsd-yh
Copy link
Author

xsd-yh commented Dec 11, 2024

ln -sv /path/to/megadepth/phoenix /path/to/megadepth_d2net/Undistorted_SfM /path/to/LoFTR/data/megadepth/test你好,在你上述所说的创建链接中我已经尝试过还是不行,具体我的操作如下:
(eloftr_training) xsd@yh:/EfficientLoFTR$ ln -sv /home/xsd/megadepth/phoenix /home/xsd/megadepth-1500-testset/Undistorted_SfM /home/xsd/EfficientLoFTR/data/megadepth/test
'/home/xsd/EfficientLoFTR/data/megadepth/test/phoenix' -> '/home/xsd/megadepth/phoenix'
'/home/xsd/EfficientLoFTR/data/megadepth/test/Undistorted_SfM' -> '/home/xsd/megadepth-1500-testset/Undistorted_SfM'
(eloftr_training) xsd@yh:
/EfficientLoFTR$ ln -s /home/xsd/megadepth_indices/* /home/xsd/EfficientLoFTR/data/megadepth/index
运行readme最后一步依然报错:
File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
File "h5py/h5f.pyx", line 96, in h5py.h5f.open
OSError: Unable to open file (unable to open file: name = 'data/megadepth/test/phoenix/S6/zl548/MegaDepth_v1/0022/dense0/depths/427154679_de14c315f4_o.h5', errno = 2, error message = 'No such file or directory', flags = 0, o_flags = 0)

请问一下megadepth/phoenix /以及megadepth_d2net/都是从L您在LoFTR的训练文档里面所提到的未失真的以及深度的数据集总共有200个G中下载下来的,因为在EfficientLoFTR里我将您发给我megadepth_d2net替换成megadepth-1500-testset这样做后依然无效那么该做法是否正确?以及megadepth/phoenix这个文件目录是否也在您在LoFTR的训练文档里面所提到的未失真的以及深度的数据集中?如果不是那我应该怎么操作找到您给我回复中ln -sv /path/to/megadepth/phoenix /path/to/megadepth_d2net/Undistorted_SfM /path/to/LoFTR/data/megadepth/test 中的megadepth/phoenix以及megadepth_d2net

@xsd-yh
Copy link
Author

xsd-yh commented Dec 11, 2024 via email

@xsd-yh
Copy link
Author

xsd-yh commented Dec 11, 2024 via email

@xsd-yh
Copy link
Author

xsd-yh commented Dec 11, 2024 via email

@wyf2020
Copy link
Contributor

wyf2020 commented Dec 11, 2024

你好,MegaDepth需要在cornell的链接下载667GB的版本,然后用d2net的代码处理成loftr的格式,以前d2net作者提供了处理后数据link,但是后来因为megadepth证书的问题也删除了,LoFTR和d2net的issue里有很多的issue讨论了如何处理数据,可以参考

@xsd-yh
Copy link
Author

xsd-yh commented Dec 11, 2024 via email

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