duanyiqun / DiffusionDepth

PyTorch Implementation of introducing diffusion approach to 3D depth perception ECCV 2024
https://arxiv.org/abs/2303.05021
Apache License 2.0
306 stars 17 forks source link

module 'distutils' has no attribute 'version' #41

Closed drozzy closed 10 months ago

drozzy commented 1 year ago

Getting an error when I'm trying to run main.py. Since there is no conda env and exact specification of dependencies I'm just trying to get it running any way I can.

 python main.py --dir_data ../data/nyudepthv2 --data_name NYU --split_json ../data_json/nyu.json \
>     --patch_height 352 --patch_width 1216 --gpus 0,1,2,3 --max_depth 80.0 --num_sample 0 --batch_size 1\
>     --test_only --pretrain ../../weights/res50_model_00030.pt --save name_to_save --save_image\
>     --model_name Diffusion_DCbase_ --backbone_module swin --backbone_name swin_large_naive_l4w722422k --head_specify DDIMDepthEstimate_Swin_ADDHAHI 
Traceback (most recent call last):
  File "main.py", line 22, in <module>
    from summary import get as get_summary
  File "/home/auser/depth-estimation/benchmark-models-2309/diffusiondepth/DiffusionDepth/src/summary/__init__.py", line 22, in <module>
    from torch.utils.tensorboard import SummaryWriter
  File "/home/auser/miniconda3/envs/diffusiondepth/lib/python3.8/site-packages/torch/utils/tensorboard/__init__.py", line 4, in <module>
    LooseVersion = distutils.version.LooseVersion
AttributeError: module 'distutils' has no attribute 'version'

Here is my conda env creation:

conda create -n diffusiondepth python=3.8 -y
conda install -y pytorch==1.10.0 torchvision torchaudio cudatoolkit -c pytorch 
pip install -r requirements.txt  

Here is my requirements.txt:

h5py
imageio
importlib-metadata
importlib-resources
ipykernel
lyft-dataset-sdk
matplotlib
matplotlib-inline
pandas
mmcv-full==1.3.13
mmdet==2.14.0
mmsegmentation==0.14.1
numba==0.48.0
numpy==1.19.5
nuscenes-devkit==1.1.9
open3d==0.13.0
opencv-python==4.7.0.68
tqdm
opt-einsum==3.3.0
packaging==23.0
Pillow
python-json-logger==2.0.7
PyYAML==6.0
typed-ast==1.5.4
uri-template==1.2.0
tensorboard==2.3
duanyiqun commented 1 year ago

Hi, thanks for the interests and try. Really appreciate it. I think it might be the version problem of tensorboard. In the requirement.txt file here https://github.com/duanyiqun/DiffusionDepth/blob/main/requirements.txt it seems upgrade to this combination might help.

tensorboard==2.11.0 tensorboard-data-server==0.6.1 tensorboard-plugin-wit==1.8.1