Error in the demos with Google Colab
Some (all?) demos do not work anymore on Google Colab.
To reproduce:
Open any demo in the demo folder, like this one.
Open in Google Colab and run the file. The third output cell is the following:
AssertionError Traceback (most recent call last)
<ipython-input-3-a857150f8e0e> in <cell line: 4>()
2 from mmengine.utils.dl_utils import collect_env as collect_base_env
3
----> 4 import mmdet
5
6
/content/mmdetection/mmdet/__init__.py in <module>
15
16 assert (mmcv_version >= digit_version(mmcv_minimum_version)
---> 17 and mmcv_version < digit_version(mmcv_maximum_version)), \
18 f'MMCV=={mmcv.__version__} is used but incompatible. ' \
19 f'Please install mmcv>={mmcv_minimum_version}, <{mmcv_maximum_version}.'
AssertionError: MMCV==2.2.0 is used but incompatible. Please install mmcv>=2.0.0rc4, <2.2.0.
This error does not match the !mim install "mmcv>=2.0.0rc4" of the cell above. I tried with changing the version of mmcv to one between 2.0.0rc4 & 2.2.0, but the same error keeps occurring.
This is my problem also
for colab, you may try to run !mim install mmdet to install mmdet straight away; for terminal, you may try mim install mmdet. Seems like it'll help to reinstall the suitable mmcv (2.1.0 for my case). This works for me
Exactly! I also tried this way and subsequently successed. But what embarrassed me is the time of building wheel for this. I almost thought that i was wrong but the result is fine.Thank for you emails.
------------------ 原始邮件 ------------------ 发件人: "open-mmlab/mmdetection" @.>; 发送时间: 2024年6月4日(星期二) 下午3:27 @.>; @.@.>; 主题: Re: [open-mmlab/mmdetection] Error in the demos with Google Colab (Issue #11684)
for colab, you may try to run !mim install mmdet to install mmdet straight away; for terminal, you may try mim install mmdet. Seems like it'll help to reinstall the suitable mmcv (2.1.0 for my case). This works for me
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>
You can also set the version directly for mmcv
!mim install "mmcv==2.0.0rc4"
I found a weird solution, when doing following step, it's works !git clone https://github.com/open-mmlab/mmdetection.git !cd mmdetection && pip install -e .
here is a little bit weird things to do, goto mmdetection/mmdet/init.py, change mmcv_maximum_version = '2.2.0' to mmcv_maximum_version = '2.2.1' and run below again
!cd mmdetection && pip install -e .