lppllppl920 / EndoscopyDepthEstimation-Pytorch

Official Repo for the paper "Dense Depth Estimation in Monocular Endoscopy with Self-supervised Learning Methods" (TMI)
GNU General Public License v3.0
127 stars 28 forks source link

KeyError: 'example_training_data_root/bag_1/_start_004259_end_004629_stride_25_segment_13' #5

Closed cyh4520 closed 4 years ago

cyh4520 commented 4 years ago

i used your new training script to train the model. however i still got this problem.

Exception: KeyError:Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/torch/utils/data/_utils/worker.py", line 99, in _worker_loop
    samples = collate_fn([dataset[i] for i in batch_indices])
  File "/usr/local/lib/python3.5/dist-packages/torch/utils/data/_utils/worker.py", line 99, in <listcomp>
    samples = collate_fn([dataset[i] for i in batch_indices])
  File "/share/chyh/workspace/EndoscopyDepthEstimation-Pytorch/dataset.py", line 363, in __getitem__
    start_h, end_h, start_w, end_w = self.crop_positions_per_seq[folder]
KeyError: 'example_training_data_root/bag_1/_start_004259_end_004629_stride_25_segment_13'
lppllppl920 commented 4 years ago

Please disable --load_intermediate_data option because this will try to search for the already existing intermediate data file which is in the repository. Let the dataset generate the .pkl file itself and it should work.