Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MMCV==2.0.1 #135

Closed
tobibaum opened this issue Jul 24, 2023 · 4 comments
Closed

MMCV==2.0.1 #135

tobibaum opened this issue Jul 24, 2023 · 4 comments
Assignees

Comments

@tobibaum
Copy link

Hello.

I am trying to install and test xrmocap. Unfortunately this code seems to be dependent on mmcv<1.8, whereas the default installation of mmdet, mmhuman3d, .... all have the new mmcv>=2.0 format.
this pertains to errors like:

from mmcv.runner import get_dist_info
ModuleNotFoundError: No module named 'mmcv.runner'
from mmcv.runner.hooks import Hook
ModuleNotFoundError: No module named 'mmcv.runner'
from mmcv.utils import Registry
ImportError: cannot import name 'Registry' from 'mmcv.utils' (/home/tobi/apps/anaconda3/envs/xrmocap2/lib/python3.8/site-packages/mmcv/utils/__init__.py)

Is there a branch or version of xrmocap that runs with the latest conventions of mmengine?

Thanks!!
Tobi

@github-actions
Copy link

Hi @tobibaum, welcome to commit your first issue!
你好 @tobibaum,非常欢迎首次提交你的问题!

@tobibaum
Copy link
Author

when trying to install everything using the requirements.txt/runtime.txt pip instructions, there emerge circular dependencies:

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
xrmocap 0.8.0 requires numpy==1.23.5, but you have numpy 1.22.4 which is incompatible.
xrmocap 0.8.0 requires scipy==1.10.0, but you have scipy 1.7.3 which is incompatible.

and when I install scipy==1.10.0:

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
mmtrack 0.14.0 requires scipy<=1.7.3, but you have scipy 1.10.0 which is incompatible.
xrmocap 0.8.0 requires numpy==1.23.5, but you have numpy 1.22.4 which is incompatible.

@tobibaum
Copy link
Author

lastly, trying to install mmdet manually does not help get rid of the "install mmdet" warning:

$ pip install mmdet==2.27.0
Requirement already satisfied: mmdet==2.27.0 in /home/tobi/apps/anaconda3/envs/xrmocap2/lib/python3.8/site-packages (2.27.0)
Requirement already satisfied: matplotlib in /home/tobi/apps/anaconda3/envs/xrmocap2/lib/python3.8/site-packages (from mmdet==2.27.0) (3.7.2)
Requirement already satisfied: numpy in /home/tobi/apps/anaconda3/envs/xrmocap2/lib/python3.8/site-packages (from mmdet==2.27.0) (1.22.4)
Requirement already satisfied: pycocotools in /home/tobi/apps/anaconda3/envs/xrmocap2/lib/python3.8/site-packages (from mmdet==2.27.0) (2.0.6)
Requirement already satisfied: scipy in /home/tobi/apps/anaconda3/envs/xrmocap2/lib/python3.8/site-packages (from mmdet==2.27.0) (1.10.0)
Requirement already satisfied: six in /home/tobi/apps/anaconda3/envs/xrmocap2/lib/python3.8/site-packages (from mmdet==2.27.0) (1.16.0)
Requirement already satisfied: terminaltables in /home/tobi/apps/anaconda3/envs/xrmocap2/lib/python3.8/site-packages (from mmdet==2.27.0) (3.1.10)
Requirement already satisfied: contourpy>=1.0.1 in /home/tobi/apps/anaconda3/envs/xrmocap2/lib/python3.8/site-packages (from matplotlib->mmdet==2.27.0) (1.1.0)
Requirement already satisfied: cycler>=0.10 in /home/tobi/apps/anaconda3/envs/xrmocap2/lib/python3.8/site-packages (from matplotlib->mmdet==2.27.0) (0.11.0)
Requirement already satisfied: fonttools>=4.22.0 in /home/tobi/apps/anaconda3/envs/xrmocap2/lib/python3.8/site-packages (from matplotlib->mmdet==2.27.0) (4.41.1)
Requirement already satisfied: kiwisolver>=1.0.1 in /home/tobi/apps/anaconda3/envs/xrmocap2/lib/python3.8/site-packages (from matplotlib->mmdet==2.27.0) (1.4.4)
Requirement already satisfied: packaging>=20.0 in /home/tobi/apps/anaconda3/envs/xrmocap2/lib/python3.8/site-packages (from matplotlib->mmdet==2.27.0) (23.1)
Requirement already satisfied: pillow>=6.2.0 in /home/tobi/apps/anaconda3/envs/xrmocap2/lib/python3.8/site-packages (from matplotlib->mmdet==2.27.0) (9.4.0)
Requirement already satisfied: pyparsing<3.1,>=2.3.1 in /home/tobi/apps/anaconda3/envs/xrmocap2/lib/python3.8/site-packages (from matplotlib->mmdet==2.27.0) (3.0.9)
Requirement already satisfied: python-dateutil>=2.7 in /home/tobi/apps/anaconda3/envs/xrmocap2/lib/python3.8/site-packages (from matplotlib->mmdet==2.27.0) (2.8.2)
Requirement already satisfied: importlib-resources>=3.2.0 in /home/tobi/apps/anaconda3/envs/xrmocap2/lib/python3.8/site-packages (from matplotlib->mmdet==2.27.0) (6.0.0)
Requirement already satisfied: zipp>=3.1.0 in /home/tobi/apps/anaconda3/envs/xrmocap2/lib/python3.8/site-packages (from importlib-resources>=3.2.0->matplotlib->mmdet==2.27.0) (3.16.2)
(xrmocap2) tobi@tobi-desktop:10:04~/combatiq/third_party/xrmocap ((v0.8.0) $%)$ python tools/mview_mperson_topdown_estimator.py       --estimator_config 'configs/mvpose_tracking/mview_mperson_topdown_estimator.py'       --image_and_camera_param 'xrmocap_data/Shelf_50/image_and_camera_param.txt'       --start_frame 300       --end_frame 350       --output_dir 'output/estimation'       --enable_log_file
/home/tobi/apps/anaconda3/envs/xrmocap2/lib/python3.8/site-packages/torchvision/io/image.py:13: UserWarning: Failed to load image Python extension: /home/tobi/apps/anaconda3/envs/xrmocap2/lib/python3.8/site-packages/torchvision/image.so: undefined symbol: _ZN2at4_ops19empty_memory_format4callEN3c108ArrayRefIlEENS2_8optionalINS2_10ScalarTypeEEENS5_INS2_6LayoutEEENS5_INS2_6DeviceEEENS5_IbEENS5_INS2_12MemoryFormatEEE
  warn(f"Failed to load image Python extension: {e}")
2023-07-24 10:04:24,786 - __main__ - ERROR -   File "tools/mview_mperson_topdown_estimator.py", line 17, in <module>
    from xrmocap.core.estimation.builder import build_estimator

  File "/home/tobi/combatiq/third_party/xrmocap/xrmocap/core/estimation/__init__.py", line 7, in <module>
    from .mview_mperson_topdown_estimator import (

  File "/home/tobi/combatiq/third_party/xrmocap/xrmocap/core/estimation/mview_mperson_topdown_estimator.py", line 11, in <module>
    from xrmocap.human_perception.builder import (

  File "/home/tobi/combatiq/third_party/xrmocap/xrmocap/human_perception/__init__.py", line 2, in <module>
    from xrmocap.human_perception.bbox_detection.mmdet_detector import (

  File "/home/tobi/combatiq/third_party/xrmocap/xrmocap/human_perception/bbox_detection/__init__.py", line 1, in <module>
    from .mmdet_detector import MMdetDetector, process_mmdet_results

  File "/home/tobi/combatiq/third_party/xrmocap/xrmocap/human_perception/bbox_detection/mmdet_detector.py", line 19, in <module>
    for line in traceback.format_stack():

Traceback (most recent call last):
  File "/home/tobi/combatiq/third_party/xrmocap/xrmocap/human_perception/bbox_detection/mmdet_detector.py", line 12, in <module>
    from mmdet.apis import inference_detector, init_detector
  File "/home/tobi/apps/anaconda3/envs/xrmocap2/lib/python3.8/site-packages/mmdet/apis/__init__.py", line 2, in <module>
    from .inference import (async_inference_detector, inference_detector,
  File "/home/tobi/apps/anaconda3/envs/xrmocap2/lib/python3.8/site-packages/mmdet/apis/inference.py", line 8, in <module>
    from mmcv.ops import RoIPool
  File "/home/tobi/apps/anaconda3/envs/xrmocap2/lib/python3.8/site-packages/mmcv/ops/__init__.py", line 2, in <module>
    from .active_rotated_filter import active_rotated_filter
  File "/home/tobi/apps/anaconda3/envs/xrmocap2/lib/python3.8/site-packages/mmcv/ops/active_rotated_filter.py", line 10, in <module>
    ext_module = ext_loader.load_ext(
  File "/home/tobi/apps/anaconda3/envs/xrmocap2/lib/python3.8/site-packages/mmcv/utils/ext_loader.py", line 13, in load_ext
    ext = importlib.import_module('mmcv.' + name)
  File "/home/tobi/apps/anaconda3/envs/xrmocap2/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
ImportError: /home/tobi/apps/anaconda3/envs/xrmocap2/lib/python3.8/site-packages/mmcv/_ext.cpython-38-x86_64-linux-gnu.so: undefined symbol: _ZN2at4_ops4view4callERKNS_6TensorEN3c108ArrayRefIlEE


Traceback (most recent call last):
  File "/home/tobi/apps/anaconda3/envs/xrmocap2/lib/python3.8/site-packages/mmcv/utils/registry.py", line 69, in build_from_cfg
    return obj_cls(**args)
  File "/home/tobi/combatiq/third_party/xrmocap/xrmocap/human_perception/bbox_detection/mmdet_detector.py", line 49, in __init__
    raise ModuleNotFoundError('Please install mmdet to run detection.')
ModuleNotFoundError: Please install mmdet to run detection.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/tobi/apps/anaconda3/envs/xrmocap2/lib/python3.8/site-packages/mmcv/utils/registry.py", line 69, in build_from_cfg
    return obj_cls(**args)
  File "/home/tobi/combatiq/third_party/xrmocap/xrmocap/core/estimation/mview_mperson_topdown_estimator.py", line 105, in __init__
    self.bbox_detector = build_detector(bbox_detector)
  File "/home/tobi/combatiq/third_party/xrmocap/xrmocap/human_perception/builder.py", line 32, in build_detector
    return DETECTORS.build(cfg)
  File "/home/tobi/apps/anaconda3/envs/xrmocap2/lib/python3.8/site-packages/mmcv/utils/registry.py", line 237, in build
    return self.build_func(*args, **kwargs, registry=self)
  File "/home/tobi/apps/anaconda3/envs/xrmocap2/lib/python3.8/site-packages/mmcv/utils/registry.py", line 72, in build_from_cfg
    raise type(e)(f'{obj_cls.__name__}: {e}')
ModuleNotFoundError: MMdetDetector: Please install mmdet to run detection.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "tools/mview_mperson_topdown_estimator.py", line 178, in <module>
    main(args)
  File "tools/mview_mperson_topdown_estimator.py", line 35, in main
    smpl_estimator = build_estimator(estimator_config)
  File "/home/tobi/combatiq/third_party/xrmocap/xrmocap/core/estimation/builder.py", line 32, in build_estimator
    return ESTIMATORS.build(cfg)
  File "/home/tobi/apps/anaconda3/envs/xrmocap2/lib/python3.8/site-packages/mmcv/utils/registry.py", line 237, in build
    return self.build_func(*args, **kwargs, registry=self)
  File "/home/tobi/apps/anaconda3/envs/xrmocap2/lib/python3.8/site-packages/mmcv/utils/registry.py", line 72, in build_from_cfg
    raise type(e)(f'{obj_cls.__name__}: {e}')
ModuleNotFoundError: MultiViewMultiPersonTopDownEstimator: MMdetDetector: Please install mmdet to run detection.

@tobibaum
Copy link
Author

I got it to run using the versions specified in the install.md
the gotcha was that I had to compile pytorch3d and torch from scratch with my respective cuda version (11.8)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants