vinvino02 / GLPDepth

GLPDepth PyTorch Implementation: Global-Local Path Networks for Monocular Depth Estimation with Vertical CutDepth
191 stars 44 forks source link

Wrong with :python ../code/utils/extract_official_train_test_set_from_mat.py nyu_depth_v2_labeled.mat splits.mat ./nyu_depth_v2/official_splits/ #22

Open Hikeylin opened 2 years ago

Hikeylin commented 2 years ago

(glp) ning@ubuntu:~/GLPDepth/datasets$ python ../code/utils/extract_official_train_test_set_from_mat.py nyu_depth_v2_labeled.mat splits.mat ./nyu_depth_v2/official_splits/ Traceback (most recent call last): File "../code/utils/extract_official_train_test_set_from_mat.py", line 36, in import h5py File "/home/ning/miniconda3/envs/glp/lib/python3.7/site-packages/h5py/init.py", line 45, in from ._conv import register_converters as _register_converters, \ File "h5py/_conv.pyx", line 17, in init h5py._conv File "/home/ning/GLPDepth/code/utils/logging.py", line 7, in import torch File "/home/ning/miniconda3/envs/glp/lib/python3.7/site-packages/torch/init.py", line 751, in from .functional import # noqa: F403 File "/home/ning/miniconda3/envs/glp/lib/python3.7/site-packages/torch/functional.py", line 8, in import torch.nn.functional as F File "/home/ning/miniconda3/envs/glp/lib/python3.7/site-packages/torch/nn/init.py", line 1, in from .modules import # noqa: F403 File "/home/ning/miniconda3/envs/glp/lib/python3.7/site-packages/torch/nn/modules/init.py", line 2, in from .linear import Identity, Linear, Bilinear, LazyLinear File "/home/ning/miniconda3/envs/glp/lib/python3.7/site-packages/torch/nn/modules/linear.py", line 6, in from .. import functional as F File "/home/ning/miniconda3/envs/glp/lib/python3.7/site-packages/torch/nn/functional.py", line 18, in from .._jit_internal import boolean_dispatch, _overload, BroadcastingList1, BroadcastingList2, BroadcastingList3 File "/home/ning/miniconda3/envs/glp/lib/python3.7/site-packages/torch/_jit_internal.py", line 24, in import torch.distributed.rpc File "/home/ning/miniconda3/envs/glp/lib/python3.7/site-packages/torch/distributed/init.py", line 55, in from .distributed_c10d import * # noqa: F403 File "/home/ning/miniconda3/envs/glp/lib/python3.7/site-packages/torch/distributed/distributed_c10d.py", line 63, in logger = logging.getLogger(name) AttributeError: module 'logging' has no attribute 'getLogger'

vinvino02 commented 2 years ago

It seems that this error is caused by duplicate names of logging (from my code and from h5py library). You could rename utils/logging.py in our codes and try again.

premchedella commented 1 year ago

I also got this error, moved logging.py in code\utils folder to glp_depth_logging.py