noahzn / Lite-Mono

[CVPR2023] Lite-Mono: A Lightweight CNN and Transformer Architecture for Self-Supervised Monocular Depth Estimation
MIT License
540 stars 61 forks source link

evaluation error [ValueError: too many values to unpack (expected 2)] #14

Closed Jacksonfei closed 1 year ago

Jacksonfei commented 1 year ago

dear author:

when i run your eval command in a conda env:

$ python evaluate_depth.py --load_weights_folder xxx/lite-mono/weights/input_size_1024_320/lite-mono_1024x320 --data_path xxx/kitti_depth_data --model lite-mono

the outputs from the terminal:

Traceback (most recent call last):
  File "evaluate_depth.py", line 223, in <module>
    evaluate(options.parse())
  File "evaluate_depth.py", line 131, in evaluate
    output, _ = depth_decoder(encoder(input_color))
ValueError: too many values to unpack (expected 2)

how can i slove this problem? thanks a lot!

noahzn commented 1 year ago

Hi @Jacksonfei , it should work now. Could you try again?

Jacksonfei commented 1 year ago

Thanks for your fast response, it works now! In addition, when I run the test_simple.py, the data in the generated .npy file is the absolute depth of each pixel on the raw image, and the unit is meter, right? Some data in npy file like that :[[[[1.7596681 1.7489609 1.7277021 ... 1.8009529 1.8252897 1.8375546] .....

noahzn commented 1 year ago

The numbers are not absolute depth values. Please see this issue.

Jacksonfei commented 1 year ago

i see, thanks a lot!

Jacksonfei commented 1 year ago

BTW, can you give some suggestions to easily obtain the absolute depth of each pixel based on Lite-mono?

noahzn commented 1 year ago

If you are training on your own dataset you can use some depth sensors to check the absolute depth of some pixels and then get an estimated scale factor. For the KITTI dataset you can try similar things but using the ground truth of depth.

Jacksonfei commented 1 year ago

Thanks for your advice, i will try it soon~

noahzn commented 1 year ago

You are welcome. Please close this issue if it is solved.