facebookresearch / DistDepth

Repository for "Toward Practical Monocular Indoor Depth Estimation" (CVPR 2022)
Other
216 stars 20 forks source link

FileNotFoundError: [Errno 2] No such file or directory: 'VA/replica_train.txt' #21

Open Cresynia opened 1 year ago

Cresynia commented 1 year ago

i want to make evaluation on VA when i ran bash eval.sh, it said FileNotFoundError: [Errno 2] No such file or directory: 'VA/replica_train.txt' FileNotFoundError: [Errno 2] No such file or directory: 'VA/UE4_left_all.txt'

i changed train_filenames and val_filenames in execute_func.py to VA and then FileNotFoundError: [Errno 2] No such file or directory: 'VA/VA_all.txt' where can i get VA_all.txt

where can i get that file or anything else i need to pay attention to maybe somewhere else i made errors,i'm a little confused and the first time to ran(a beginner),hope you can give some help,thanks!

choyingw commented 1 year ago

@Cresynia Thank you for raising the issue.

Here are the missing files: VA_left_all.txt https://drive.google.com/file/d/14rY4A3FQ4t9X7i6z2ol2PSK4i0UfHAPN/view?usp=share_link replica_train.txt https://drive.google.com/file/d/1xoMex0-WNJZPAZByJXd7TIVSl2GiIJwS/view?usp=share_link replica_test_sub.txt https://drive.google.com/file/d/1JfR9ZQm9LY-FHTsFnPvds3wdHgf6TlH-/view?usp=share_link

Note that we didn't officially split SimSIN and VA into train/test split in paper. In paper we train on large SimSIN, and the path file is on the project page. (SimSIN_release2.txt https://distdepth.github.io/all_large_release2.txt). The test files in the code are some easy hacks to verify the training procedure (so we set to replica_test_sub.txt)

For evaluation on VA, you van just set eval file to VA_left_all. You can also follow the .txt format and train/test on your data. Please let me know if you have further questions.

Cresynia commented 1 year ago

Thanks!I made it! And I want to visualize the predicted depth maps. When I ran : python execute.py --exe eval_save --log_dir='./tmp' --data_path VA --dataset VA --batch_size 1 --load_weights_folder ckpts-distdepth-152-SimSIN-DPTLegacy --models_to_load encoder depth --width 256 --height 256 --max_depth 10 --frame_ids 0 --num_layers 152 it said: img = img.cpu().numpy().squeeze().transpose(0,2,3,1) ValueError: axes don't match array I don't know where I made errors.

choyingw commented 1 year ago

Hi if using batch size = 1 the batch dimension will disappear, and you’ll need to unsqueeze the batch dim first. I’ll revise the code later.

On Sunday, February 26, 2023, Cresynia @.***> wrote:

Thanks!I made it! And I want to visualize the predicted depth maps. When I ran : python execute.py --exe eval_save --log_dir='./tmp' --data_path VA --dataset VA --batch_size 1 --load_weights_folder ckpts-distdepth-152-SimSIN-DPTLegacy --models_to_load encoder depth --width 256 --height 256 --max_depth 10 --frame_ids 0 --num_layers 152 it said: img = img.cpu().numpy().squeeze().transpose(0,2,3,1) ValueError: axes don't match array I don't know where I made errors.

— Reply to this email directly, view it on GitHub https://urldefense.com/v3/__https://github.com/facebookresearch/DistDepth/issues/21*issuecomment-1445621054__;Iw!!LIr3w8kk_Xxm!uM9bVBDj4mjyYJFFV_3cmExeS7SGrwxdrpkyHUN5sIi8HTEwxLT7_5ZJSs_EkJ6nIwTOmuLxiyrRrRKDRQb5XoK5$, or unsubscribe https://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/AKMLAJOOXX3323G3X3JGBWLWZQKZZANCNFSM6AAAAAAVAXEYDM__;!!LIr3w8kk_Xxm!uM9bVBDj4mjyYJFFV_3cmExeS7SGrwxdrpkyHUN5sIi8HTEwxLT7_5ZJSs_EkJ6nIwTOmuLxiyrRrRKDRaV2D5G1$ . You are receiving this because you commented.Message ID: @.***>

-- Ph.D. candidate of Computer Science Department University of Southern California

Cresynia commented 1 year ago

Oh! I'm going to learn the code and try it! Thanks for your answer sincerely!

Cresynia commented 1 year ago

What is 'approx_alignment' in the execute_func.py When I ran python execute.py --exe eval_save --log_dir='./tmp' --data_path VA --dataset VA --batch_size 4 --load_weights_folder ckpts-distdepth-152-SimSIN-DPTLegacy --models_to_load encoder depth --width 256 --height 256 --max_depth 10 --frame_ids 0 --num_layers 152 it said----AttributeError: 'Trainer' object has no attribute 'approx_alignment',and I couldn't find its initialization. Can I remove it like this?----depth = outputs[('depth', 0, 0)] (the original one-----depth = outputs[('depth', 0, 0)] * self.approx_alignment) when I do this,I can get the results,but because I'm not clear about the code and still need to learn a lot,so I want to ask if it's correct. Really thanks for your help!