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.79k stars 521 forks source link

Missing test files training NYUv2 with GT #99

Open kyk37 opened 6 months ago

kyk37 commented 6 months ago

(1)123

(2) 1234

I downloaded the dataset according to your training page which references zoedepth dataset prep, and copied it into the folder /data/nyu however the "sync" folder of (5.9Gb). -> This folder is missing the files referenced in nyuv2_test_files_with_gt.txt .

My steps. Download dataset, copy to folder. Run "python train_mono.py -m zoedepth -d nyu --pretrained_resource="" "

As you can see with the two images, I was able to get 25% of the way, however for whatever reason it is asking for files that do not exist in the sync folder. I have also looked into the files linked in tensorflow's repo is 32Gb and their train/val is in .h5. I also looked at the files on huggingface, and those are also .h5 without folders inside the tar files.

Also nyu_depth_v2 website on nyu is broken. Every website that references it is is unable to find it.

Do you know of a location or have access to the missing jpg files, or how to parse tensorflows/huggingfaces data to match the files needed, so that I can train/fine-tune for metric_depth?

Lilyo commented 6 months ago

Hi, @kyk37 ,

Follow this to generate NYU Depth V2 test set.

The code snippet is as follows:

$ cd ~/workspace/bts/utils
### Get official NYU Depth V2 split file
$ wget http://horatio.cs.nyu.edu/mit/silberman/nyu_depth_v2/nyu_depth_v2_labeled.mat
### Convert mat file to image files
$ python extract_official_train_test_set_from_mat.py nyu_depth_v2_labeled.mat splits.mat ../../dataset/nyu_depth_v2/official_splits/
Zhefan-Xu commented 6 months ago

Hi @Lilyo, thanks for your reference. I tried but it seems like "splits.mat" does not exist. Do you what is wrong?

Lilyo commented 6 months ago

Hi @Zhefan-Xu ,

Actually the files are placed in "bts/utils", please check this.

kyk37 commented 6 months ago

Thank you, I was able to load and train the model with this. As for loading the model the training provides a .pt "dict" file which I know can be loaded as using "model.load_state_dict()". The trained model's keys are "dict_keys(['model', 'optimizer', 'epoch'])"

Is there a reference I can use to properly load this file, and so I can infer/eval on a custom dataset? Every time I try to load the model I get "missing keys", or "incompatible keys" errors, when trying to load the dict using depth_anything-vitl14 model, or am I trying to load the wrong model? ~new to using checkpoint files for things

image