LiheYoung / Depth-Anything

[CVPR 2024] Depth Anything: Unleashing the Power of Large-Scale Unlabeled Data. Foundation Model for Monocular Depth Estimation
https://depth-anything.github.io
Apache License 2.0
6.84k stars 525 forks source link

problems about Metric depth estimation-prepare the training and test datasets. #163

Open Arbiter123123123 opened 5 months ago

Arbiter123123123 commented 5 months ago

Hi, I based on this document. I still have some confussion "Please follow ZoeDepth to prepare the training and test datasets." I want to know where to place the dataset I unzip the datasets on the ./metric_depth/workspace/dataset/kitti_dataset/
but still reporting an error,where to place the kitti datasets?

Traceback (most recent call last):
  File "/root/autodl-tmp/Depth-Anything-main/metric_depth/evaluate.py", line 159, in <module>
    eval_model(args.model, pretrained_resource=args.pretrained_resource,
  File "/root/autodl-tmp/Depth-Anything-main/metric_depth/evaluate.py", line 131, in eval_model
    metrics = main(config)
  File "/root/autodl-tmp/Depth-Anything-main/metric_depth/evaluate.py", line 115, in main
    metrics = evaluate(model, test_loader, config)
  File "/root/miniconda3/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
    return func(*args, **kwargs)
  File "/root/autodl-tmp/Depth-Anything-main/metric_depth/evaluate.py", line 71, in evaluate
    for i, sample in tqdm(enumerate(test_loader), total=len(test_loader)):
  File "/root/miniconda3/lib/python3.10/site-packages/tqdm/std.py", line 1195, in __iter__
    for obj in iterable:
  File "/root/miniconda3/lib/python3.10/site-packages/torch/utils/data/dataloader.py", line 630, in __next__
    data = self._next_data()
  File "/root/miniconda3/lib/python3.10/site-packages/torch/utils/data/dataloader.py", line 1345, in _next_data
    return self._process_data(data)
  File "/root/miniconda3/lib/python3.10/site-packages/torch/utils/data/dataloader.py", line 1371, in _process_data
    data.reraise()
  File "/root/miniconda3/lib/python3.10/site-packages/torch/_utils.py", line 694, in reraise
    raise exception
FileNotFoundError: Caught FileNotFoundError in DataLoader worker process 0.
Original Traceback (most recent call last):
  File "/root/miniconda3/lib/python3.10/site-packages/torch/utils/data/_utils/worker.py", line 308, in _worker_loop
    data = fetcher.fetch(index)
  File "/root/miniconda3/lib/python3.10/site-packages/torch/utils/data/_utils/fetch.py", line 51, in fetch
    data = [self.dataset[idx] for idx in possibly_batched_index]
  File "/root/miniconda3/lib/python3.10/site-packages/torch/utils/data/_utils/fetch.py", line 51, in <listcomp>
    data = [self.dataset[idx] for idx in possibly_batched_index]
  File "/root/autodl-tmp/Depth-Anything-main/metric_depth/zoedepth/data/data_mono.py", line 380, in __getitem__
    image = np.asarray(self.reader.open(image_path),
  File "/root/autodl-tmp/Depth-Anything-main/metric_depth/zoedepth/data/data_mono.py", line 267, in open
    return Image.open(fpath)
  File "/root/miniconda3/lib/python3.10/site-packages/PIL/Image.py", line 3247, in open
    fp = builtins.open(filename, "rb")
FileNotFoundError: [Errno 2] No such file or directory: './data/Kitti/raw_data/2011_09_26/2011_09_26_drive_0002_sync/image_02/data/0000000069.png'
kyk37 commented 5 months ago

The error partially tells you, I believe. "./data/Kitti/raw_data/2011_09_26/2011_09_26_drive_0002_sync/image_02/data/0000000069.png"

Make sure you have a file called data/Kitti/x/x/x/x... The exact placement.. should be in the "metric_depth" folder if I remember correctly. Might be wrong