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

eval.sh crush because of missing files #5

Closed
BarRozenman opened this issue Apr 25, 2023 · 3 comments
Closed

eval.sh crush because of missing files #5

BarRozenman opened this issue Apr 25, 2023 · 3 comments

Comments

@BarRozenman
Copy link

Hello, I'm trying to run eval.sh with the pretrained models of "stage1" provided in this repo on the Kitti dataset that was downloaded and extracted as described in the readme.md file.

I downloaded the pretrained models and saved them to a new folder named "ckpt" inside the PlaneDepth repo folder

the eval.sh file I run

CUDA_VISIBLE_DEVICES=0 python evaluate_depth_HR.py \
--eval_stereo \
--load_weights_folder ./ckpt \
--models_to_load encoder depth \
--use_denseaspp \
--plane_residual \
--use_mixture_loss \
--batch_size 1 \
--width 1280 \
--height 384 \

console output is:

>> /usr/bin/zsh /home/.../projects/PlaneDepth/eval.sh                                                                                                                                      [main]
-> Loading weights from ./ckpt
use 49 xy planes, 14 xz planes and 0 yz planes.
use DenseAspp Block
use mixture Lap loss
use plane residual
-> Computing predictions with size 1280x384
0.6184294
Traceback (most recent call last):
  File "/home/.../projects/PlaneDepth/evaluate_depth_HR.py", line 287, in <module>
    evaluate(options.parse())
  File "/home/.../projects/PlaneDepth/evaluate_depth_HR.py", line 216, in evaluate
    gt_depths = np.load(gt_path, fix_imports=True, encoding='latin1', allow_pickle=True)["data"]
  File "/home/.../miniconda3/envs/planedepth/lib/python3.9/site-packages/numpy/lib/npyio.py", line 417, in load
    fid = stack.enter_context(open(os_fspath(file), "rb"))
FileNotFoundError: [Errno 2] No such file or directory: '/home/.../projects/PlaneDepth/./splits/eigen_raw/gt_depths.npz'

I saw that there is a creation of this file on "PlaneDepth/splits/eigen_improved/prepare_groundtruth.py" but its only for the "eigen_improves" and it seems to contain hard-coded path that is not relevant on line 23, GT_path = os.path.join("/public/home/wangry3/datasets/kitti_depth/train/", line[0][11:], "proj_depth/groundtruth/image_02", line[1]+".png")

and the dataset structure seems to be different to the dataset structure provided by this repo and "kitti_archives_to_download.txt"

can someone please explain what am I missing? thank you 🙏
my repository tree:

PlaneDepth # cloned from repo
├── ckpt
      ├── depth.pth # from the repo PlaneDepth pre-trained section
       |── encoder.pth # from the repo PlaneDepth pre-trained section
├── kitti # downloaded and extracted as described PlaneDepth repo
      ├── 2011_09_26
      │   ├── 2011_09_26_drive_0001_sync
      │   ├── 2011_09_26_drive_0002_sync
      │   ├── 2011_09_26_drive_0005_sync
...
@Dwawayu
Copy link
Member

Dwawayu commented Apr 25, 2023

Hi! You can use the script from Monodepth2 to get the file gt_depths.npz of eigen_raw split.

@BarRozenman
Copy link
Author

BarRozenman commented Apr 25, 2023

Thank you it worked, but I had to change the folder name from "eigen_raw" to "eigen" (and the back to the original name in order to run the eval.sh) to make the "export_gt_depth.py" work, it seems like a critical step that was overlooked in when performing evaluation

@Dwawayu
Copy link
Member

Dwawayu commented Apr 25, 2023

Yes. I renamed the eigen folder to eigen_raw in my codebase to distinguish it from eigen_improved, so it should be changed back before running the original Monodepth2 script.

Thanks for your suggestion, I will modify the evaluation steps to make it clearer.

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