Skip to content

Commit

Permalink
Merge branch 'open-mmlab-master'
Browse files Browse the repository at this point in the history
merge from the main
  • Loading branch information
bowenroom committed Sep 9, 2023
2 parents b600f7c + 30a3f94 commit 7b6d587
Show file tree
Hide file tree
Showing 383 changed files with 16,037 additions and 795 deletions.
25 changes: 13 additions & 12 deletions .circleci/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,11 @@ 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:
name: Build and install
command: |
Expand Down Expand Up @@ -96,21 +97,21 @@ jobs:
name: Clone Repos
command: |
git clone -b main --depth 1 https://github.com/open-mmlab/mmengine.git /home/circleci/mmengine
git clone -b dev-3.x --depth 1 https://github.com/open-mmlab/mmdetection.git /home/circleci/mmdetection
- run:
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 pip install -e /mmdetection
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:
name: Build and install
command: |
Expand Down Expand Up @@ -144,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
Expand Down Expand Up @@ -176,10 +177,10 @@ 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"
cuda: "10.2"
filters:
branches:
only:
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
56 changes: 56 additions & 0 deletions .dev_scripts/benchmark_full_models.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
ann/ann_r50-d8_4xb2-40k_cityscapes-512x1024.py
apcnet/apcnet_r50-d8_4xb4-80k_ade20k-512x512.py
beit/beit-large_upernet_8xb1-amp-160k_ade20k-640x640.py
bisenetv1/bisenetv1_r18-d32_4xb4-160k_coco-stuff164k-512x512.py
bisenetv2/bisenetv2_fcn_4xb4-ohem-160k_cityscapes-1024x1024.py
ccnet/ccnet_r50-d8_4xb2-40k_cityscapes-512x1024.py
cgnet/cgnet_fcn_4xb4-60k_cityscapes-680x680.py
convnext/convnext-tiny_upernet_8xb2-amp-160k_ade20k-512x512.py
danet/danet_r50-d8_4xb2-40k_cityscapes-512x1024.py
deeplabv3/deeplabv3_r50-d8_4xb2-40k_cityscapes-512x1024.py
deeplabv3plus/deeplabv3plus_r101-d8_4xb2-40k_cityscapes-769x769.py
dmnet/dmnet_r50-d8_4xb2-40k_cityscapes-512x1024.py
dnlnet/dnl_r50-d8_4xb2-40k_cityscapes-512x1024.py
dpt/dpt_vit-b16_8xb2-160k_ade20k-512x512.py
emanet/eemanet_r50-d8_4xb2-80k_cityscapes-512x1024.py
encnet/encnet_r50-d8_4xb4-80k_ade20k-512x512.py
erfnet/erfnet_fcn_4xb4-160k_cityscapes-512x1024.py
fastfcn/fastfcn_r50-d32_jpu_aspp_4xb2-80k_cityscapes-512x1024.py
fastscnn/fast_scnn_8xb4-160k_cityscapes-512x1024.py
fcn/fcn_r50-d8_4xb2-40k_cityscapes-512x1024.py
gcnet/gcnet_r50-d8_4xb2-40k_cityscapes-769x769.py
hrnet/fcn_hr18s_4xb4-80k_ade20k-512x512.py
icnet/icnet_r50-d8_4xb2-80k_cityscapes-832x832.py
isanet/isanet_r50-d8_4xb2-80k_cityscapes-512x1024.py
knet/knet-s3_swin-l_upernet_8xb2-adamw-80k_ade20k-640x640.py
mae/mae-base_upernet_8xb2-amp-160k_ade20k-512x512.py
mask2former/mask2former_r50_8xb2-90k_cityscapes-512x1024.py
mask2former/mask2former_swin-t_8xb2-90k_cityscapes-512x1024.py
mask2former/mask2former_swin-s_8xb2-160k_ade20k-512x512.py
mask2former/mask2former_swin-l-in22k-384x384-pre_8xb2-160k_ade20k-640x640.py
maskformer/maskformer_r50-d32_8xb2-160k_ade20k-512x512.py
maskformer/maskformer_r101-d32_8xb2-160k_ade20k-512x512.py
maskformer/maskformer_swin-t_upernet_8xb2-160k_ade20k-512x512.py
maskformer/maskformer_swin-s_upernet_8xb2-160k_ade20k-512x512.py
mobilenet_v2/mobilenet-v2-d8_pspnet_4xb2-80k_cityscapes-512x1024.py
mobilenet_v3/mobilenet-v3-d8-scratch_lraspp_4xb4-320k_cityscapes-512x1024.py
nonlocal_net/nonlocal_r50-d8_4xb2-40k_cityscapes-512x1024.py
ocrnet/ocrnet_hr18_4xb4-80k_ade20k-512x512.py
pidnet/pidnet-l_2xb6-120k_1024x1024-cityscapes.py
point_rend/pointrend_r50_4xb2-80k_cityscapes-512x1024.py
poolformer/fpn_poolformer_m48_8xb4-40k_ade20k-512x512.py
psanet/psanet_r101-d8_4xb4-80k_ade20k-512x512.py
pspnet/pspnet_r50-d8-rsb_4xb2-adamw-80k_cityscapes-512x1024.py
resnest/resnest_s101-d8_deeplabv3_4xb4-160k_ade20k-512x512.py
segformer/segformer_mit-b5_8xb1-160k_cityscapes-1024x1024.py
segformer/segformer_mit-b5_8xb2-160k_ade20k-512x512.py
segmenter/segmenter_vit-t_mask_8xb1-160k_ade20k-512x512.py
segnext/segnext_mscan-t_1xb16-adamw-160k_ade20k-512x512.py
sem_fpn/fpn_r101_4xb2-80k_cityscapes-512x1024.py
setr/setr_vit-l-mla_8xb1-160k_ade20k-512x512.py
stdc/stdc1_in1k-pre_4xb12-80k_cityscapes-512x1024.py
swin/swin-small-patch4-window7-in1k-pre_upernet_8xb2-160k_ade20k-512x512.py
twins/twins_pcpvt-s_uperhead_8xb4-160k_ade20k-512x512.py
unet/unet-s5-d16_fcn_4xb4-160k_cityscapes-512x1024.py
upernet/upernet_r50_4xb2-40k_cityscapes-769x769.py
vit/vit_deit-s16_upernet_8xb2-80k_ade20k-512x512.py
File renamed without changes.
10 changes: 10 additions & 0 deletions .dev_scripts/benchmark_options.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
third_part_libs = [
'pip install mmengine',
'pip install mmcv>=2.0.0',
'pip install mmcls==1.0.0rc6',
'pip install mmdet==3.0.0',
'pip install -r requirements.txt',
'pip install timm',
]

default_floating_range = 0.5
File renamed without changes.
25 changes: 25 additions & 0 deletions .dev_scripts/benchmark_train_models.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
bisenetv1/bisenetv1_r18-d32_4xb4-160k_coco-stuff164k-512x512.py
bisenetv2/bisenetv2_fcn_4xb4-ohem-160k_cityscapes-1024x1024.py
deeplabv3/deeplabv3_r50-d8_4xb2-40k_cityscapes-512x1024.py
deeplabv3/deeplabv3_r101-d8_4xb4-160k_ade20k-512x512.py
deeplabv3plus/deeplabv3plus_r101-d8_4xb2-40k_cityscapes-769x769.py
deeplabv3plus/deeplabv3plus_r50-d8_4xb4-80k_ade20k-512x512.py
hrnet/fcn_hr18s_4xb4-80k_ade20k-512x512.py
hrnet/fcn_hr18_4xb2-160k_cityscapes-512x1024.py
knet/knet-s3_swin-l_upernet_8xb2-adamw-80k_ade20k-512x512.py
knet/knet-s3_r50-d8_pspnet_8xb2-adamw-80k_ade20k-512x512.py
mae/mae-base_upernet_8xb2-amp-160k_ade20k-512x512.py
mask2former/mask2former_swin-l-in22k-384x384-pre_8xb2-160k_ade20k-640x640.py
maskformer/maskformer_swin-s_upernet_8xb2-160k_ade20k-512x512.py
mobilenet_v2/mobilenet-v2-d8_deeplabv3_4xb2-80k_cityscapes-512x1024.py
ocrnet/ocrnet_hr48_4xb4-80k_ade20k-512x512.py
pidnet/pidnet-m_2xb6-120k_1024x1024-cityscapes.py
pspnet/pspnet_r50-d8-rsb_4xb2-adamw-80k_cityscapes-512x1024.py
pspnet/pspnet_r101-d8_4xb4-80k_ade20k-512x512.py
segformer/segformer_mit-b5_8xb2-160k_ade20k-512x512.py
segmenter/segmenter_vit-t_mask_8xb1-160k_ade20k-512x512.py
segnext/segnext_mscan-t_1xb16-adamw-160k_ade20k-512x512.py
swin/swin-base-patch4-window12-in22k-384x384-pre_upernet_8xb2-160k_ade20k-512x512.py
twins/twins_pcpvt-l_uperhead_8xb2-160k_ade20k-512x512.py
unet/unet-s5-d16_fcn_4xb4-160k_cityscapes-512x1024.py
upernet/upernet_r101_4xb2-40k_cityscapes-512x1024.py
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def parse_args():
parser.add_argument(
'--out',
type=str,
default='.dev/benchmark_evaluation.sh',
default='.dev_scripts/benchmark_evaluation.sh',
help='path to save model benchmark script')

args = parser.parse_args()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def parse_args():
parser.add_argument(
'--out',
type=str,
default='.dev/benchmark_train.sh',
default='.dev_scripts/benchmark_train.sh',
help='path to save model benchmark script')

args = parser.parse_args()
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ def get_model_info(md_file: str, config_dir: str,
if line.startswith('<!-- [DATASET]'):
is_dataset = True

if '<!-- [SKIP DEV CHECK] -->' in line:
return None, None

# get dataset names
if line.startswith('###'):
current_dataset = line.split('###')[1].strip()
Expand Down Expand Up @@ -279,14 +282,20 @@ def update_model_index(config_dir_list: List[str]) -> bool:
collection_name_list: List[str] = get_collection_name_list(md_file_list)
# hard code to add 'FPN'
collection_name_list.append('FPN')
remove_config_dir_list = []
# parse md file
for md_file, config_dir in zip(md_file_list, config_dir_list):
results, collection_name = get_model_info(md_file, config_dir,
collection_name_list)
if results is None:
remove_config_dir_list.append(config_dir)
continue
filename = osp.join(config_dir, 'metafile.yaml')
file_modified |= dump_yaml_and_check_difference(results, filename)
if collection_name != '':
collection_name_list.append(collection_name)

# remove config dir
for config_dir in remove_config_dir_list:
config_dir_list.remove(config_dir)
file_modified |= update_model_index(config_dir_list)
sys.exit(1 if file_modified else 0)
File renamed without changes.
27 changes: 0 additions & 27 deletions .github/workflows/lint.yml

This file was deleted.

Loading

0 comments on commit 7b6d587

Please sign in to comment.