[Fix] Fix dependency (#3136)
## Motivation Change the dependency `mmcls` to `mmpretrain` ## Modification - modify `mmcls` to `mmpretrain` - modify CI requirements ## BC-breaking (Optional) If users have installed mmcls but not install mmpretrain, it might raise some error.pull/3138/head
parent
d3f2922ff5
commit
ffb7e2e239
|
@ -61,9 +61,9 @@ jobs:
|
|||
command: |
|
||||
pip install git+https://github.com/open-mmlab/mmengine.git@main
|
||||
pip install -U openmim
|
||||
mim install 'mmcv>=2.0.0rc4'
|
||||
pip install mmcls==1.0.0rc6
|
||||
pip install git+https://github.com/open-mmlab/mmdetection.git@main
|
||||
mim install mmcv>=2.0.0
|
||||
pip install mmpretrain>=1.0.0rc7
|
||||
pip install mmdet>=3.0.0
|
||||
pip install -r requirements/tests.txt -r requirements/optional.txt
|
||||
python -m pip install albumentations>=0.3.2 --no-binary qudida,albumentations
|
||||
- run:
|
||||
|
@ -101,15 +101,15 @@ jobs:
|
|||
name: Build Docker image
|
||||
command: |
|
||||
docker build .circleci/docker -t mmseg:gpu --build-arg PYTORCH=<< parameters.torch >> --build-arg CUDA=<< parameters.cuda >> --build-arg CUDNN=<< parameters.cudnn >>
|
||||
docker run --gpus all -t -d -v /home/circleci/project:/mmseg -v /home/circleci/mmengine:/mmengine -v /home/circleci/mmclassification:/mmclassification -v /home/circleci/mmdetection:/mmdetection -w /mmseg --name mmseg mmseg:gpu
|
||||
docker run --gpus all -t -d -v /home/circleci/project:/mmseg -v /home/circleci/mmengine:/mmengine -v /home/circleci/mmpretrain:/mmpretrain -v /home/circleci/mmdetection:/mmdetection -w /mmseg --name mmseg mmseg:gpu
|
||||
- run:
|
||||
name: Install mmseg dependencies
|
||||
command: |
|
||||
docker exec mmseg pip install -e /mmengine
|
||||
docker exec mmseg pip install -U openmim
|
||||
docker exec mmseg mim install 'mmcv>=2.0.0rc4'
|
||||
docker exec mmseg pip install mmcls==1.0.0rc6
|
||||
docker exec mmseg mim install mmdet==3.0.0
|
||||
docker exec mmseg mim install mmcv>=2.0.0
|
||||
docker exec mmseg pip install mmpretrain>=1.0.0rc7
|
||||
docker exec mmseg mim install mmdet>=3.0.0
|
||||
docker exec mmseg pip install -r requirements/tests.txt -r requirements/optional.txt
|
||||
docker exec mmseg python -m pip install albumentations>=0.3.2 --no-binary qudida,albumentations
|
||||
- run:
|
||||
|
@ -145,8 +145,8 @@ workflows:
|
|||
- main
|
||||
- build_cpu:
|
||||
name: minimum_version_cpu
|
||||
torch: 1.6.0
|
||||
torchvision: 0.7.0
|
||||
torch: 1.8.1
|
||||
torchvision: 0.9.1
|
||||
python: "3.7"
|
||||
requires:
|
||||
- lint
|
||||
|
@ -177,7 +177,7 @@ workflows:
|
|||
jobs:
|
||||
- build_cuda:
|
||||
name: minimum_version_gpu
|
||||
torch: 1.6.0
|
||||
torch: 1.8.1
|
||||
# Use double quotation mark to explicitly specify its type
|
||||
# as string instead of number
|
||||
cuda: "10.1"
|
||||
|
|
|
@ -4,7 +4,8 @@ checkpoint_file = 'https://download.openmmlab.com/mmclassification/v0/poolformer
|
|||
# TODO: delete custom_imports after mmcls supports auto import
|
||||
# please install mmcls>=1.0
|
||||
# import mmcls.models to trigger register_module in mmcls
|
||||
custom_imports = dict(imports=['mmcls.models'], allow_failed_imports=False)
|
||||
custom_imports = dict(
|
||||
imports=['mmpretrain.models'], allow_failed_imports=False)
|
||||
data_preprocessor = dict(
|
||||
type='SegDataPreProcessor',
|
||||
mean=[123.675, 116.28, 103.53],
|
||||
|
@ -16,7 +17,7 @@ model = dict(
|
|||
type='EncoderDecoder',
|
||||
data_preprocessor=data_preprocessor,
|
||||
backbone=dict(
|
||||
type='mmcls.PoolFormer',
|
||||
type='mmpretrain.PoolFormer',
|
||||
arch='s12',
|
||||
init_cfg=dict(
|
||||
type='Pretrained', checkpoint=checkpoint_file, prefix='backbone.'),
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
norm_cfg = dict(type='SyncBN', requires_grad=True)
|
||||
custom_imports = dict(imports='mmcls.models', allow_failed_imports=False)
|
||||
custom_imports = dict(imports='mmpretrain.models', allow_failed_imports=False)
|
||||
checkpoint_file = 'https://download.openmmlab.com/mmclassification/v0/convnext/downstream/convnext-base_3rdparty_32xb128-noema_in1k_20220301-2a0ee547.pth' # noqa
|
||||
data_preprocessor = dict(
|
||||
type='SegDataPreProcessor',
|
||||
|
@ -13,7 +13,7 @@ model = dict(
|
|||
data_preprocessor=data_preprocessor,
|
||||
pretrained=None,
|
||||
backbone=dict(
|
||||
type='mmcls.ConvNeXt',
|
||||
type='mmpretrain.ConvNeXt',
|
||||
arch='base',
|
||||
out_indices=[0, 1, 2, 3],
|
||||
drop_path_rate=0.4,
|
||||
|
|
|
@ -9,7 +9,7 @@ checkpoint_file = 'https://download.openmmlab.com/mmclassification/v0/convnext/d
|
|||
model = dict(
|
||||
data_preprocessor=data_preprocessor,
|
||||
backbone=dict(
|
||||
type='mmcls.ConvNeXt',
|
||||
type='mmpretrain.ConvNeXt',
|
||||
arch='base',
|
||||
out_indices=[0, 1, 2, 3],
|
||||
drop_path_rate=0.4,
|
||||
|
|
|
@ -9,7 +9,7 @@ checkpoint_file = 'https://download.openmmlab.com/mmclassification/v0/convnext/d
|
|||
model = dict(
|
||||
data_preprocessor=data_preprocessor,
|
||||
backbone=dict(
|
||||
type='mmcls.ConvNeXt',
|
||||
type='mmpretrain.ConvNeXt',
|
||||
arch='large',
|
||||
out_indices=[0, 1, 2, 3],
|
||||
drop_path_rate=0.4,
|
||||
|
|
|
@ -8,7 +8,7 @@ checkpoint_file = 'https://download.openmmlab.com/mmclassification/v0/convnext/d
|
|||
model = dict(
|
||||
data_preprocessor=data_preprocessor,
|
||||
backbone=dict(
|
||||
type='mmcls.ConvNeXt',
|
||||
type='mmpretrain.ConvNeXt',
|
||||
arch='small',
|
||||
out_indices=[0, 1, 2, 3],
|
||||
drop_path_rate=0.3,
|
||||
|
|
|
@ -8,7 +8,7 @@ checkpoint_file = 'https://download.openmmlab.com/mmclassification/v0/convnext/d
|
|||
model = dict(
|
||||
data_preprocessor=data_preprocessor,
|
||||
backbone=dict(
|
||||
type='mmcls.ConvNeXt',
|
||||
type='mmpretrain.ConvNeXt',
|
||||
arch='tiny',
|
||||
out_indices=[0, 1, 2, 3],
|
||||
drop_path_rate=0.4,
|
||||
|
|
|
@ -9,7 +9,7 @@ checkpoint_file = 'https://download.openmmlab.com/mmclassification/v0/convnext/d
|
|||
model = dict(
|
||||
data_preprocessor=data_preprocessor,
|
||||
backbone=dict(
|
||||
type='mmcls.ConvNeXt',
|
||||
type='mmpretrain.ConvNeXt',
|
||||
arch='xlarge',
|
||||
out_indices=[0, 1, 2, 3],
|
||||
drop_path_rate=0.4,
|
||||
|
|
|
@ -39,7 +39,7 @@ Transformers have shown great potential in computer vision tasks. A common belie
|
|||
- PoolFormer backbone needs to install [MMClassification](https://github.com/open-mmlab/mmclassification) first, which has abundant backbones for downstream tasks.
|
||||
|
||||
```shell
|
||||
pip install "mmcls>=1.0.0rc0"
|
||||
pip install "mmpretrain>=1.0.0rc7"
|
||||
```
|
||||
|
||||
- The pretrained models could also be downloaded from [PoolFormer config of MMClassification](https://github.com/open-mmlab/mmclassification/tree/master/configs/poolformer).
|
||||
|
|
|
@ -8,7 +8,7 @@ The compatible MMSegmentation, MMCV and MMEngine versions are as below. Please i
|
|||
|
||||
| MMSegmentation version | MMCV version | MMEngine version | MMClassification (optional) version | MMDetection (optional) version |
|
||||
| :--------------------: | :----------------------------: | :---------------: | :---------------------------------: | :----------------------------: |
|
||||
| dev-1.x branch | mmcv >= 2.0.0rc4 | MMEngine >= 0.7.1 | mmcls==1.0.0rc6 | mmdet >= 3.0.0 |
|
||||
| dev-1.x branch | mmcv >= 2.0.0 | MMEngine >= 0.7.4 | mmpretrain>=1.0.0rc7 | mmdet >= 3.0.0 |
|
||||
| main branch | mmcv >= 2.0.0rc4 | MMEngine >= 0.7.1 | mmcls==1.0.0rc6 | mmdet >= 3.0.0 |
|
||||
| 1.0.0 | mmcv >= 2.0.0rc4 | MMEngine >= 0.7.1 | mmcls==1.0.0rc6 | mmdet >= 3.0.0 |
|
||||
| 1.0.0rc6 | mmcv >= 2.0.0rc4 | MMEngine >= 0.5.0 | mmcls>=1.0.0rc0 | mmdet >= 3.0.0rc6 |
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
| MMSegmentation version | MMCV version | MMEngine version | MMClassification (optional) version | MMDetection (optional) version |
|
||||
| :--------------------: | :----------------------------: | :---------------: | :---------------------------------: | :----------------------------: |
|
||||
| dev-1.x branch | mmcv >= 2.0.0rc4 | MMEngine >= 0.7.1 | mmcls==1.0.0rc6 | mmdet >= 3.0.0 |
|
||||
| dev-1.x branch | mmcv >= 2.0.0 | MMEngine >= 0.7.4 | mmpretrain>=1.0.0rc7 | mmdet >= 3.0.0 |
|
||||
| main branch | mmcv >= 2.0.0rc4 | MMEngine >= 0.7.1 | mmcls==1.0.0rc6 | mmdet >= 3.0.0 |
|
||||
| 1.0.0 | mmcv >= 2.0.0rc4 | MMEngine >= 0.7.1 | mmcls==1.0.0rc6 | mmdet >= 3.0.0 |
|
||||
| 1.0.0rc6 | mmcv >= 2.0.0rc4 | MMEngine >= 0.5.0 | mmcls>=1.0.0rc0 | mmdet >= 3.0.0rc6 |
|
||||
|
|
Loading…
Reference in New Issue