playground icon indicating copy to clipboard operation
playground copied to clipboard

MMTracking Open Detection :An error was reported while running the test sample

Open Bentonmaster opened this issue 2 years ago • 2 comments

Traceback (most recent call last):
  File "tracking_demo.py", line 31, in <module>
    from mmdet.models.trackers import ByteTracker
  File "/home/gcbm/workspace/track/playground/mmdetection/mmdet/models/__init__.py", line 10, in <module>
    from .reid import *  # noqa: F401,F403
  File "/home/gcbm/workspace/track/playground/mmdetection/mmdet/models/reid/__init__.py", line 2, in <module>
    from .base_reid import BaseReID
  File "/home/gcbm/workspace/track/playground/mmdetection/mmdet/models/reid/base_reid.py", line 17, in <module>
    class BaseReID(ImageClassifier):
NameError: name 'ImageClassifier' is not defined

我查阅代码发现是缺少了mmcls的包导致没有正常导入,我手动添加了mmcls-0.25.0,之后产生了新的报错 When I looked up the code and found that there was a missing package for mmcls that was not being imported properly, I manually added mmcls-0.25.0 and then generated a new error

Traceback (most recent call last):
  File "tracking_demo.py", line 31, in <module>
    from mmdet.models.trackers import ByteTracker
  File "/home/gcbm/workspace/track/playground/mmdetection/mmdet/models/__init__.py", line 3, in <module>
    from .data_preprocessors import *  # noqa: F401,F403
  File "/home/gcbm/workspace/track/playground/mmdetection/mmdet/models/data_preprocessors/__init__.py", line 6, in <module>
    from .reid_data_preprocessor import ReIDDataPreprocessor
  File "/home/gcbm/workspace/track/playground/mmdetection/mmdet/models/data_preprocessors/reid_data_preprocessor.py", line 13, in <module>
    import mmcls
  File "/home/gcbm/workspace/anaconda3/envs/mmtracking-sam/lib/python3.8/site-packages/mmcls/__init__.py", line 55, in <module>
    assert (mmcv_version >= digit_version(mmcv_minimum_version)
AssertionError: MMCV==2.0.0 is used but incompatible. Please install mmcv>=1.4.2, <=1.9.0.

我尝试使用低版本的mmcv,但是其他的包不能够正常运行。我想知道这是mmcls和mmcv2.0存在冲突吗?我没有找到相应的解决方案 I tried using a lower version of MMCV, but the other packages didn't work. I want to know is there a conflict between mmcls and mmcv2.0? I didn't find a solution

Bentonmaster avatar May 30 '23 10:05 Bentonmaster

我也遇到了相同的问题

roingbu avatar Jun 09 '23 09:06 roingbu

first, uninstall the mmcls you have installed; second , run mim install "mmcls>=1.0.0rc0" , don't forget "

HekevinHe avatar Jun 20 '23 02:06 HekevinHe