SwinTransformer / Swin-Transformer-Semantic-Segmentation

This is an official implementation for "Swin Transformer: Hierarchical Vision Transformer using Shifted Windows" on Semantic Segmentation.
https://arxiv.org/abs/2103.14030
Apache License 2.0
1.18k stars 222 forks source link

MMCV= 1.1.15 is not compatible while the rest versions cannot be installed #51

Open fatemehteimury opened 3 years ago

fatemehteimury commented 3 years ago

Hi, I followed get_started.md to install all the dependencies same as is mentioned in the GitHub.

When I am running the command"python tools/test.py configs/pspnet/pspnet_r50-d8_512x1024_40k_cityscapes.py checkpoints/pspnet_r50-d8_512x1024_40k_cityscapes_20200605_003338-2966598c.pth --eval mIoU" Iam getting this error :

AssertionError: MMCV==1.1.5 is used but incompatible. Please install mmcv>=(1, 3, 13, 0, 0, 0), <=(1, 4, 0, 0, 0, 0). The problem I have is that I cannot install any mmcv versions between 1.3.13 and 1.4.0.

Can you please help how to solve it? Thanks

Interesting6 commented 2 years ago

similar question, I install mmcv from cml ”pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu111/torch1.8.0/index.html“ provided by official doc.

then error raised "Swin-Transformer-Semantic-Segmentation/mmseg/init.py", line 27, in f'MMCV=={mmcv.version} is used but incompatible. ' \ AssertionError: MMCV==1.4.4 is used but incompatible. Please install mmcv>=[1, 1, 4], <=[1, 3, 0]."

so I install mmcv=1.3.0, then another version exception catched: "AssertionError: MMCV==1.3.0 is used but incompatible. Please install mmcv>=(1, 3, 13, 0, 0, 0), <=(1, 5, 0, 0, 0, 0)."

it really confused me!

I give up.

mohammadrezanaderi4 commented 2 years ago

Don't give up brother, we can not even install any version of mmcv <=1.3.0. hold on, be strong.

elimsjxr commented 1 year ago

similar question, I install mmcv from cml ”pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu111/torch1.8.0/index.html“ provided by official doc.

then error raised "Swin-Transformer-Semantic-Segmentation/mmseg/init.py", line 27, in f'MMCV=={mmcv.version} is used but incompatible. ' AssertionError: MMCV==1.4.4 is used but incompatible. Please install mmcv>=[1, 1, 4], <=[1, 3, 0]."

so I install mmcv=1.3.0, then another version exception catched: "AssertionError: MMCV==1.3.0 is used but incompatible. Please install mmcv>=(1, 3, 13, 0, 0, 0), <=(1, 5, 0, 0, 0, 0)."

it really confused me!

I give up.

I have the same error, have you solved this problem?

anamce commented 6 months ago

same error no version is compatible even followed all the mmcv-versions and it doesn't import the other details Whats the correct mmcv cuda, torch and mmcv versions for this github repo?

aakgun commented 4 months ago

I see the similar error, this code could not be working. it is based o mmseg with mmcv version lower then 2.0.0 but those versions looks for some mmcv._ext file which is installed by upper versions.

I see several github applications using mmseg but could ot undertsnad how those are working ?

from mmseg.apis import inference_segmentor, init_segmentor, show_result_pyplot

Any proper solutions for this issue ?

anamce commented 4 months ago

Hi I f you find solution please let me know m facing the same issue no idea how to run any model with mmsegmentation.

Sent from Outlook for iOShttps://aka.ms/o0ukef


From: Ayhan Akgün @.> Sent: Saturday, June 29, 2024 10:34:43 AM To: SwinTransformer/Swin-Transformer-Semantic-Segmentation @.> Cc: anamce @.>; Comment @.> Subject: Re: [SwinTransformer/Swin-Transformer-Semantic-Segmentation] MMCV= 1.1.15 is not compatible while the rest versions cannot be installed (Issue #51)

I see the similar error, this code could not be working. it is based o mmseg with mmcv version lower then 2.0.0 but those versions looks for some mmcv._ext file which is installed by upper versions.

I see several github applications using mmseg but could ot undertsnad how those are working ?

from mmseg.apis import inference_segmentor, init_segmentor, show_result_pyplot

Any proper solutions for this issue ?

— Reply to this email directly, view it on GitHubhttps://github.com/SwinTransformer/Swin-Transformer-Semantic-Segmentation/issues/51#issuecomment-2198068319, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BCVTWXOY63QMT4DDVUBP74LZJZ5THAVCNFSM5HTUWCZ2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TEMJZHAYDMOBTGE4Q. You are receiving this because you commented.Message ID: @.***>

donaghyXu commented 3 months ago

I spent a day solving this environmental problem. First of all, this repository contains get_started.md which will direct you to open-mmlab/mmsegmentation. According to the open-mmlab installation, the mmcv-2.x version is installed by default, and this project was forked at the time when it was mmcv-1.x version. These two versions are not compatible, so mmcv-1.x version needs to be installed.

Here's a version I've tried that works: mmcv-full 1.3.0 mmsegmentation 0.11.0 python 3.7.16 pytorch 1.7.0 cuda 10.2

The version of mmcv and the version of mmsegmentation must correspond, otherwise you will encounter problems on the second and third floors. The mmsegmentation installed by default corresponds to the mmcv-2.x version, so there will be incompatibility problems. The version correspondence can be See the reference at the bottom.

Installation instructions and sequence: conda install pytorch==1.7.0 torchvision==0.8.0 torchaudio==0.7.0 cudatoolkit=10.2 -c pytorch pip install -U openmim mim install mmcv-full==1.3.0 pip install mmsegmentation==0.11.0 pip install -e . (Since swin-transformer is added by this project and is not in mmsegmentation, therefore, it is need to install according to this repository, otherwise the error 'SwinTransformer is not in the backbone registry' will be reported)

References: https://mmcv.readthedocs.io/zh-cn/1.x/get_started/installation.html https://mmsegmentation.readthedocs.io/zh-cn/0.x/faq.html https://github.com/SwinTransformer/Swin-Transformer-Semantic-Segmentation/issues/4

donaghyXu commented 3 months ago

similar question, I install mmcv from cml ”pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu111/torch1.8.0/index.html“ provided by official doc.

then error raised "Swin-Transformer-Semantic-Segmentation/mmseg/init.py", line 27, in f'MMCV=={mmcv.version} is used but incompatible. ' AssertionError: MMCV==1.4.4 is used but incompatible. Please install mmcv>=[1, 1, 4], <=[1, 3, 0]."

so I install mmcv=1.3.0, then another version exception catched: "AssertionError: MMCV==1.3.0 is used but incompatible. Please install mmcv>=(1, 3, 13, 0, 0, 0), <=(1, 5, 0, 0, 0, 0)."

it really confused me!

I give up.

This is due to mmsegmentation version mismatch, see my full comment for details.

anamce commented 3 months ago

Oh Great😍I will try that and let you know.

Sent from Outlook for iOShttps://aka.ms/o0ukef


From: xudong @.> Sent: Thursday, July 25, 2024 4:01:40 AM To: SwinTransformer/Swin-Transformer-Semantic-Segmentation @.> Cc: anamce @.>; Comment @.> Subject: Re: [SwinTransformer/Swin-Transformer-Semantic-Segmentation] MMCV= 1.1.15 is not compatible while the rest versions cannot be installed (Issue #51)

similar question, I install mmcv from cml ”pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu111/torch1.8.0/index.htmlhttps://download.openmmlab.com/mmcv/dist/cu111/torch1.8.0/index.html%E2%80%9C provided by official doc.

then error raised "Swin-Transformer-Semantic-Segmentation/mmseg/init.py", line 27, in f'MMCV=={mmcv.version} is used but incompatible. ' AssertionError: MMCV==1.4.4 is used but incompatible. Please install mmcv>=[1, 1, 4], <=[1, 3, 0]."

so I install mmcv=1.3.0, then another version exception catched: "AssertionError: MMCV==1.3.0 is used but incompatible. Please install mmcv>=(1, 3, 13, 0, 0, 0), <=(1, 5, 0, 0, 0, 0)."

it really confused me!

I give up.

This is due to mmsegmentation version mismatch, see my full comment for details.

— Reply to this email directly, view it on GitHubhttps://github.com/SwinTransformer/Swin-Transformer-Semantic-Segmentation/issues/51#issuecomment-2249267750, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BCVTWXK3YTQKKNO2EZLWYSLZOBTBJAVCNFSM5HTUWCZ2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TEMRUHEZDMNZXGUYA. You are receiving this because you commented.Message ID: @.***>

anamce commented 3 months ago

Hi, I tried the above packages but it not working

Sent from Outlook for iOShttps://aka.ms/o0ukef


From: Anam Manzoor @.> Sent: Thursday, July 25, 2024 8:57:47 AM To: SwinTransformer/Swin-Transformer-Semantic-Segmentation @.>; SwinTransformer/Swin-Transformer-Semantic-Segmentation @.> Cc: Comment @.> Subject: Re: [SwinTransformer/Swin-Transformer-Semantic-Segmentation] MMCV= 1.1.15 is not compatible while the rest versions cannot be installed (Issue #51)

Oh Great😍I will try that and let you know.

Sent from Outlook for iOShttps://aka.ms/o0ukef


From: xudong @.> Sent: Thursday, July 25, 2024 4:01:40 AM To: SwinTransformer/Swin-Transformer-Semantic-Segmentation @.> Cc: anamce @.>; Comment @.> Subject: Re: [SwinTransformer/Swin-Transformer-Semantic-Segmentation] MMCV= 1.1.15 is not compatible while the rest versions cannot be installed (Issue #51)

similar question, I install mmcv from cml ”pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu111/torch1.8.0/index.htmlhttps://download.openmmlab.com/mmcv/dist/cu111/torch1.8.0/index.html%E2%80%9C provided by official doc.

then error raised "Swin-Transformer-Semantic-Segmentation/mmseg/init.py", line 27, in f'MMCV=={mmcv.version} is used but incompatible. ' AssertionError: MMCV==1.4.4 is used but incompatible. Please install mmcv>=[1, 1, 4], <=[1, 3, 0]."

so I install mmcv=1.3.0, then another version exception catched: "AssertionError: MMCV==1.3.0 is used but incompatible. Please install mmcv>=(1, 3, 13, 0, 0, 0), <=(1, 5, 0, 0, 0, 0)."

it really confused me!

I give up.

This is due to mmsegmentation version mismatch, see my full comment for details.

— Reply to this email directly, view it on GitHubhttps://github.com/SwinTransformer/Swin-Transformer-Semantic-Segmentation/issues/51#issuecomment-2249267750, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BCVTWXK3YTQKKNO2EZLWYSLZOBTBJAVCNFSM5HTUWCZ2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TEMRUHEZDMNZXGUYA. You are receiving this because you commented.Message ID: @.***>