AdelaiDepth
AdelaiDepth copied to clipboard
RuntimeError: stack expects a non-empty TensorList
Hi, When I configure the environment as required, I can run sh train_demo.sh with the code that has not been updated before, but running sh train.sh for a period of time will report an error:“AttributeError:‘NoneType’ object has no attribute ‘lower’”。
Download the latest code to run the training code (sh train_demo.sh/sh train.sh). The error display: "runtimeerror: stack expectations a non empty tensorlist". How to solve this problem?
@lw0210 Hi, thanks for reporting this bug!
This bug happens due to the absence of high-quality and mid-quality datasets, and we have fixed this situation in our latest code.
Thank you @guangkaixu . I have run the latest code. I can run demo, but run sh train Sh the error message displays "typeerror: 'nonetype' object is not subscribable"
The contents are as follows:
Traceback (most recent call last):
File "/home/liwei/anaconda3/envs/LeReS/lib/python3.7/site-packages/torch/utils/data/utils/worker.py", line 185, in _ worker loop
data = fetcher.fetch(index)
File "/home/liwei/anaconda3/envs/LeReS/lib/python3.7/site-packages/torch/utils/data/utils/fetch.py", line 44, in fetch
data = [self.dataset[idx] for idx in possibly batched_ index]
File "/home/liwei/anaconda3/envs/LeReS/lib/python3.7/site-packages/torch/utils/data/utils/fetch.py", line 44, in
@lw0210 This error occurs due to the incorrect rgb_path in train_annotation.json. Please prepare the training data following the step 'Training-2' and put it under Train/datasets
. If you would like to train on customized datasets, please generate the train_annotation.json first, which contains rgb_path and depth_path at least.
I have downloaded the four datasets (in the win system) again and put them in the corresponding positions as required. I still have this error "typeerror: 'nonetype' object is not subscribable" during the operation (Holopix50k is removed) @guangkaixu
@lw0210 The validation datasets should contain depth images rather than disparity images, which has been filtered automatically in our latest released code. Also, please update the annotation files of taskonomy according to download_data.sh.
Hello, I passed the command sh train sh to run the training network and get some pth files. I put one of the files into the corresponding folder and run test_ depth.py or test_ shape.py, there will be an error keyerror: depth_ model。 I passed ‘torch load()’ command prints res50.pth and the pth I have trained. It shows that res50 contains [depth_model, shift_model, focal_model], my pth contains [step, epoch, batchsize, scheduler, val_err, model_state_dict, optimizer]. How can I get the model weights like res50.pth or res101.pth. @guangkaixu
@lw0210 Hi, Sorry for the late response due to some busy work.
If you want to load the self-trained checkpoint, please follow this to modify your code: https://github.com/aim-uofa/AdelaiDepth/issues/44#issuecomment-1188822214. It will be fixed later, thank you!
Thank you! I can run the test_depth.py by loading the self-trained checkpoint and get depth map.But how can I run the test_shape.py?The 'shift_model' and 'focal_model' are still missing.How can I modify my code? @guangkaixu
The code for 'shift_model' and 'focal_model' have not been released yet. We will consider reorganizing and releasing it but it will be time-spending. Thanks for your understanding!
ok,Thanks!