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

测试MMDet+SAM存在问题 #42

Closed
Bentonmaster opened this issue Apr 17, 2023 · 9 comments
Closed

测试MMDet+SAM存在问题 #42

Bentonmaster opened this issue Apr 17, 2023 · 9 comments
Labels

Comments

@Bentonmaster
Copy link

Bentonmaster commented Apr 17, 2023

After installing the dependence, in accordance with the routine test code, displays an error
安装完依赖后,按照例程代码进行测试,显示报错

Traceback (most recent call last):
  File "detector_sam_demo.py", line 30, in <module>
    import mmdet
  File "/home/gcbm/workspace/mmdetection-master/mmdet/__init__.py", line 24, in <module>
    assert (mmcv_version >= digit_version(mmcv_minimum_version)
AssertionError: MMCV==2.0.0 is used but incompatible. Please install mmcv>=1.3.17, <=1.8.0.

I changed the version to 1.7.1 with error reporting
我将版本更换成1.7.1后报错显示

Traceback (most recent call last):
  File "detector_sam_demo.py", line 509, in <module>
    main()
  File "detector_sam_demo.py", line 418, in main
    raise RuntimeError('detection model is not installed,\
RuntimeError: detection model is not installed,                 please install it follow README
@mm-assistant
Copy link

mm-assistant bot commented Apr 17, 2023

We recommend using English or English & Chinese for issues so that we could have broader discussion.

@xin-li-67
Copy link
Collaborator

Hi, can you check what version of MMDet you are using?? It should be mmdet 3.0.

@Bentonmaster
Copy link
Author

嗨,你能检查一下你正在使用的是什么版本的MMDet吗?它应该是 mmdet 3.0。

Thanks, I was able to get the MMDet up and running, but it came up during code check:
感谢,我将mmdet更新后能够进入运行阶段,但是在代码检测时出现:

Traceback (most recent call last):
  File "detector_sam_demo.py", line 509, in <module>
    main()
  File "detector_sam_demo.py", line 436, in main
    det_model = build_detecter(args)
  File "detector_sam_demo.py", line 166, in build_detecter
    config.model.roi_head.mask_head = None
  File "/home/gcbm/workspace/anaconda3/envs/segment/lib/python3.8/site-packages/mmengine/config/config.py", line 53, in __getattr__
    raise AttributeError(f"'{self.__class__.__name__}' object has no "
AttributeError: 'ConfigDict' object has no attribute 'roi_head'

This is a new problem, I didn't find a solution,my environment mmcv=2.0.0,mmdet=3.0.0,mmengine=0.7.2
这是一个新的问题,我没有找到解决方案,我的环境mmcv=2.0.0,mmdet=3.0.0,mmengine=0.7.2

@xin-li-67
Copy link
Collaborator

嗨,你能检查一下你正在使用的是什么版本的MMDet吗?它应该是 mmdet 3.0。

Thanks, I was able to get the MMDet up and running, but it came up during code check: 感谢,我将mmdet更新后能够进入运行阶段,但是在代码检测时出现:

Traceback (most recent call last):
  File "detector_sam_demo.py", line 509, in <module>
    main()
  File "detector_sam_demo.py", line 436, in main
    det_model = build_detecter(args)
  File "detector_sam_demo.py", line 166, in build_detecter
    config.model.roi_head.mask_head = None
  File "/home/gcbm/workspace/anaconda3/envs/segment/lib/python3.8/site-packages/mmengine/config/config.py", line 53, in __getattr__
    raise AttributeError(f"'{self.__class__.__name__}' object has no "
AttributeError: 'ConfigDict' object has no attribute 'roi_head'

This is a new problem, I didn't find a solution,my environment mmcv=2.0.0,mmdet=3.0.0,mmengine=0.7.2 这是一个新的问题,我没有找到解决方案,我的环境mmcv=2.0.0,mmdet=3.0.0,mmengine=0.7.2

can you share your test command??

@Bentonmaster
Copy link
Author

Bentonmaster commented Apr 17, 2023

@xin-li-67

The test code I use is the Dino test code provided in the example
我用的测试代码就是示例中提供的dino的测试代码

python detector_sam_demo.py ../images/cat_remote.jpg \
    ../mmdetection/configs/dino/dino-5scale_swin-l_8xb2-12e_coco.py \
    dino-5scale_swin-l_8xb2-12e_coco_20230228_072924-a654145f.pth  \
    --sam-device cpu

@xin-li-67
Copy link
Collaborator

@xin-li-67

The test code I use is the Dino test code provided in the example 我用的测试代码就是示例中提供的dino的测试代码

python detector_sam_demo.py ../images/cat_remote.jpg \
    ../mmdetection/configs/dino/dino-5scale_swin-l_8xb2-12e_coco.py \
    dino-5scale_swin-l_8xb2-12e_coco_20230228_072924-a654145f.pth  \
    --sam-device cpu

Seems this is an existing issue. We will look into this. Thanks.

@hhaAndroid
Copy link
Collaborator

@xin-li-67 Hi. Did you fix it?

@xin-li-67
Copy link
Collaborator

@xin-li-67

The test code I use is the Dino test code provided in the example 我用的测试代码就是示例中提供的dino的测试代码

python detector_sam_demo.py ../images/cat_remote.jpg \
    ../mmdetection/configs/dino/dino-5scale_swin-l_8xb2-12e_coco.py \
    dino-5scale_swin-l_8xb2-12e_coco_20230228_072924-a654145f.pth  \
    --sam-device cpu

I did a quick fix on this, would you like to try like this #50?

@hhaAndroid
Copy link
Collaborator

#50

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

No branches or pull requests

3 participants