Skip to content

Commit 4d6c934

Browse files
authored
Merge dev-1.x into main
2 parents c4fc8b4 + 982de66 commit 4d6c934

File tree

219 files changed

+14293
-3559
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

219 files changed

+14293
-3559
lines changed

.circleci/test.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,17 @@ jobs:
6666
mim install 'mmcv >= 2.0.0'
6767
pip install git+https://[email protected]/open-mmlab/[email protected]
6868
pip install git+https://github.com/open-mmlab/[email protected]
69+
pip install git+https://github.com/open-mmlab/mmpretrain.git@dev
6970
pip install git+https://github.com/open-mmlab/[email protected]
7071
pip install -r requirements.txt
7172
- run:
7273
name: Install timm
7374
command: |
7475
pip install timm
76+
- run:
77+
name: Install transformers
78+
command: |
79+
pip install transformers
7580
- when:
7681
condition:
7782
equal: [ "0.10.0", << parameters.torchvision >> ]
@@ -117,6 +122,10 @@ jobs:
117122
command: |
118123
docker exec mmaction pip install timm
119124
docker exec mmaction python -m pip install pytorchvideo
125+
- run:
126+
name: Install transformers
127+
command: |
128+
docker exec mmaction pip install transformers
120129
- run:
121130
name: Install mmaction dependencies
122131
command: |
@@ -126,6 +135,7 @@ jobs:
126135
docker exec mmaction pip install git+https://[email protected]/open-mmlab/[email protected]
127136
docker exec mmaction pip install git+https://[email protected]/open-mmlab/[email protected]
128137
docker exec mmaction pip install git+https://github.com/open-mmlab/[email protected]
138+
docker exec mmaction pip install git+https://github.com/open-mmlab/mmpretrain.git@dev
129139
docker exec mmaction pip install -r requirements.txt
130140
- run:
131141
name: Build and install

.github/workflows/merge_stage_test.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,17 @@ jobs:
6060
run: pip install git+https://github.com/open-mmlab/[email protected]
6161
- name: Install MMCls
6262
run: pip install git+https://github.com/open-mmlab/[email protected]
63+
- name: Install MMPretrain
64+
run: pip install git+https://github.com/open-mmlab/mmpretrain.git@dev
6365
- name: Install MMPose
6466
run: pip install git+https://github.com/open-mmlab/[email protected]
6567
- name: Install PytorchVideo
6668
run: pip install pytorchvideo
6769
if: ${{matrix.torchvision == '0.10.0'}}
6870
- name: Install timm
6971
run: pip install timm
72+
- name: Install transformers
73+
run: pip install transformers
7074
- name: Build and install
7175
run: rm -rf .eggs && pip install -e .
7276
- name: Run unittests and generate coverage report
@@ -108,6 +112,8 @@ jobs:
108112
run: pip install lmdb
109113
- name: Install timm
110114
run: pip install timm
115+
- name: Install transformers
116+
run: pip install transformers
111117
- name: Install TurboJpeg lib
112118
run: sudo apt-get install -y libturbojpeg
113119
- name: Install PyTorch
@@ -122,6 +128,8 @@ jobs:
122128
run: pip install git+https://github.com/open-mmlab/[email protected]
123129
- name: Install MMCls
124130
run: pip install git+https://github.com/open-mmlab/[email protected]
131+
- name: Install MMPretrain
132+
run: pip install git+https://github.com/open-mmlab/mmpretrain.git@dev
125133
- name: Install MMPose
126134
run: pip install git+https://github.com/open-mmlab/[email protected]
127135
- name: Install unittest dependencies
@@ -179,13 +187,16 @@ jobs:
179187
run: pip install librosa soundfile
180188
- name: Install lmdb
181189
run: pip install lmdb
190+
- name: Install transformers
191+
run: pip install transformers
182192
- name: Install mmaction dependencies
183193
run: |
184194
pip install git+https://github.com/open-mmlab/mmengine.git@main
185195
pip install -U openmim
186196
mim install 'mmcv >= 2.0.0'
187197
pip install git+https://github.com/open-mmlab/[email protected]
188198
pip install git+https://github.com/open-mmlab/[email protected]
199+
pip install git+https://github.com/open-mmlab/mmpretrain.git@dev
189200
pip install git+https://github.com/open-mmlab/[email protected]
190201
pip install -r requirements.txt
191202
- name: Install PytorchVideo
@@ -228,12 +239,15 @@ jobs:
228239
mim install 'mmcv >= 2.0.0'
229240
pip install git+https://github.com/open-mmlab/[email protected]
230241
pip install git+https://github.com/open-mmlab/[email protected]
242+
pip install git+https://github.com/open-mmlab/mmpretrain.git@dev
231243
pip install git+https://github.com/open-mmlab/[email protected]
232244
pip install -r requirements.txt
233245
- name: Install PytorchVideo
234246
run: python -m pip install pytorchvideo
235247
- name: Install timm
236248
run: python -m pip install timm
249+
- name: Install transformers
250+
run: python -m pip install transformers
237251
- name: Build and install
238252
run: |
239253
pip install -e . -v

.github/workflows/pr_stage_test.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ jobs:
5151
run: pip install git+https://github.com/open-mmlab/[email protected]
5252
- name: Install MMCls
5353
run: pip install git+https://github.com/open-mmlab/[email protected]
54+
- name: Install MMPretrain
55+
run: pip install git+https://github.com/open-mmlab/mmpretrain.git@dev
5456
- name: Install MMPose
5557
run: pip install git+https://github.com/open-mmlab/[email protected]
5658
- name: Install unittest dependencies
@@ -119,6 +121,7 @@ jobs:
119121
mim install 'mmcv >= 2.0.0'
120122
pip install git+https://github.com/open-mmlab/[email protected]
121123
pip install git+https://github.com/open-mmlab/[email protected]
124+
pip install git+https://github.com/open-mmlab/mmpretrain.git@dev
122125
pip install git+https://github.com/open-mmlab/[email protected]
123126
pip install -r requirements.txt
124127
- name: Install PytorchVideo
@@ -168,6 +171,7 @@ jobs:
168171
mim install 'mmcv >= 2.0.0'
169172
pip install git+https://github.com/open-mmlab/[email protected]
170173
pip install git+https://github.com/open-mmlab/[email protected]
174+
pip install git+https://github.com/open-mmlab/mmpretrain.git@dev
171175
pip install git+https://github.com/open-mmlab/[email protected]
172176
pip install -r requirements.txt
173177
- name: Install PytorchVideo

README.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -75,14 +75,13 @@ English | [简体中文](/README_zh-CN.md)
7575

7676
**The default branch has been switched to `main`(previous `1.x`) from `master`(current `0.x`), and we encourage users to migrate to the latest version with more supported models, stronger pre-training checkpoints and simpler coding. Please refer to [Migration Guide](https://mmaction2.readthedocs.io/en/latest/migration.html) for more details.**
7777

78-
**Release (2023.07.04)**: v1.1.0 with the following new features:
79-
80-
- Support CLIP-based multi-modality models: ActionCLIP(Arxiv'2021) and CLIP4clip(ArXiv'2022)
81-
- Support rich projects: gesture recognition, spatio-temporal action detection tutorial, and knowledge distillation
82-
- Support HACS-segments dataset(ICCV'2019), MultiSports dataset(ICCV'2021), Kinetics-710 dataset(Arxiv'2022)
83-
- Support VideoMAE V2(CVPR'2023), and VideoMAE(NeurIPS'2022) on action detection
84-
- Support TCANet(CVPR'2021)
85-
- Support [Pure Python style Configuration File](https://mmengine.readthedocs.io/en/latest/advanced_tutorials/config.html#a-pure-python-style-configuration-file-beta) and downloading datasets by MIM with one command
78+
**Release (2023.10.12)**: v1.2.0 with the following new features:
79+
80+
- Support VindLU multi-modality algorithm and the Training of ActionClip
81+
- Support lightweight model MobileOne TSN/TSM
82+
- Support video retrieval dataset MSVD
83+
- Support SlowOnly K700 feature to train localization models
84+
- Support Video and Audio Demos
8685

8786
## 📖 Introduction [🔝](#-table-of-contents)
8887

README_zh-CN.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
[![Percentage of issues still open](https://isitmaintained.com/badge/open/open-mmlab/mmaction2.svg)](https://github.com/open-mmlab/mmaction2/issues)
2727

2828
[📘中文文档](https://mmaction2.readthedocs.io/zh_CN/latest/index.html) |
29-
[🛠️安装指南](https://mmaction2.readthedocs.io/zh_CN/get_started/installation.html) |
29+
[🛠️安装指南](https://mmaction2.readthedocs.io/zh_CN/latest/get_started/installation.html) |
3030
[👀模型库](https://mmaction2.readthedocs.io/zh_CN/latest/modelzoo_statistics.html) |
3131
[🆕更新日志](https://mmaction2.readthedocs.io/en/latest/notes/changelog.html) |
3232
[🚀进行中项目](https://github.com/open-mmlab/mmaction2/projects) |
@@ -380,10 +380,10 @@ MMAction2 是一款由来自不同高校和企业的研发人员共同参与贡
380380

381381
## ❤️ 欢迎加入 OpenMMLab 社区 [🔝](#-table-of-contents)
382382

383-
扫描下方的二维码可关注 OpenMMLab 团队的 [知乎官方账号](https://www.zhihu.com/people/openmmlab)加入 OpenMMLab 团队的 [官方交流 QQ 群](https://jq.qq.com/?_wv=1027&k=aCvMxdr3) 或联络 OpenMMLab 官方微信小助手
383+
扫描下方的二维码可关注 OpenMMLab 团队的 [知乎官方账号](https://www.zhihu.com/people/openmmlab)扫描下方微信二维码添加喵喵好友,进入 MMAction2 微信交流社群。【加好友申请格式:研究方向+地区+学校/公司+姓名】
384384

385385
<div align="center">
386-
<img src="./resources/zhihu_qrcode.jpg" height="400"/> <img src="./resources/xiaozhushou_weixin_qrcode.jpeg" height="400"/>
386+
<img src="./resources/zhihu_qrcode.jpg" height="400"/> <img src="./resources/miaomiao_qrcode.jpg" height="400"/>
387387
</div>
388388

389389
我们会在 OpenMMLab 社区为大家
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# model settings
2+
preprocess_cfg = dict(
3+
mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375])
4+
5+
checkpoint = ('https://download.openmmlab.com/mmclassification/'
6+
'v0/mobileone/mobileone-s4_8xb32_in1k_20221110-28d888cb.pth')
7+
model = dict(
8+
type='Recognizer2D',
9+
backbone=dict(
10+
type='MobileOneTSM',
11+
arch='s4',
12+
shift_div=8,
13+
num_segments=8,
14+
is_shift=True,
15+
init_cfg=dict(
16+
type='Pretrained', checkpoint=checkpoint, prefix='backbone')),
17+
cls_head=dict(
18+
type='TSMHead',
19+
num_segments=8,
20+
num_classes=400,
21+
in_channels=2048,
22+
spatial_type='avg',
23+
consensus=dict(type='AvgConsensus', dim=1),
24+
dropout_ratio=0.5,
25+
init_std=0.001,
26+
is_shift=True,
27+
average_clips='prob'),
28+
# model training and testing settings
29+
data_preprocessor=dict(type='ActionDataPreprocessor', **preprocess_cfg),
30+
train_cfg=None,
31+
test_cfg=None)
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
checkpoint = ('https://download.openmmlab.com/mmclassification/'
2+
'v0/mobileone/mobileone-s0_8xb32_in1k_20221110-0bc94952.pth')
3+
model = dict(
4+
type='Recognizer2D',
5+
backbone=dict(
6+
type='mmpretrain.MobileOne',
7+
arch='s0',
8+
init_cfg=dict(
9+
type='Pretrained', checkpoint=checkpoint, prefix='backbone'),
10+
norm_eval=False),
11+
cls_head=dict(
12+
type='TSNHead',
13+
num_classes=400,
14+
in_channels=1024,
15+
spatial_type='avg',
16+
consensus=dict(type='AvgConsensus', dim=1),
17+
dropout_ratio=0.4,
18+
init_std=0.01,
19+
average_clips='prob'),
20+
data_preprocessor=dict(
21+
type='ActionDataPreprocessor',
22+
mean=[123.675, 116.28, 103.53],
23+
std=[58.395, 57.12, 57.375],
24+
format_shape='NCHW'),
25+
train_cfg=None,
26+
test_cfg=None)

configs/_base_/models/tsn_r18_audio.py

Lines changed: 0 additions & 11 deletions
This file was deleted.

configs/detection/acrn/slowfast-acrn_kinetics400-pretrained-r50_8xb8-8x8x1-cosine-10e_ava21-rgb.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
shared_head=dict(type='ACRNHead', in_channels=4608, out_channels=2304),
4747
bbox_head=dict(
4848
type='BBoxHeadAVA',
49+
background_class=True,
4950
in_channels=2304,
5051
num_classes=81,
5152
multilabel=True,
@@ -88,9 +89,6 @@
8889
proposal_file_val = f'{anno_root}/ava_dense_proposals_val.FAIR.recall_93.9.pkl'
8990

9091
file_client_args = dict(io_backend='disk')
91-
file_client_args = dict(
92-
io_backend='petrel',
93-
path_mapping=dict({'data/ava': 's254:s3://openmmlab/datasets/action/ava'}))
9492
train_pipeline = [
9593
dict(type='SampleAVAFrames', clip_len=32, frame_interval=2),
9694
dict(type='RawFrameDecode', **file_client_args),

configs/detection/acrn/slowfast-acrn_kinetics400-pretrained-r50_8xb8-8x8x1-cosine-10e_ava22-rgb.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
shared_head=dict(type='ACRNHead', in_channels=4608, out_channels=2304),
4747
bbox_head=dict(
4848
type='BBoxHeadAVA',
49+
background_class=True,
4950
in_channels=2304,
5051
num_classes=81,
5152
multilabel=True,

configs/detection/lfb/slowonly-lfb-infer_r50_ava21-rgb.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
with_temporal_pool=True),
3535
bbox_head=dict(
3636
type='BBoxHeadAVA',
37+
background_class=True,
3738
in_channels=2048,
3839
num_classes=81,
3940
multilabel=True,

configs/detection/lfb/slowonly-lfb-nl_kinetics400-pretrained-r50_8xb12-4x16x1-20e_ava21-rgb.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
with_temporal_pool=True),
3838
bbox_head=dict(
3939
type='BBoxHeadAVA',
40+
background_class=True,
4041
in_channels=2560,
4142
num_classes=81,
4243
multilabel=True,

configs/detection/lfb/slowonly-lfb_ava-pretrained-r50_infer-4x16x1_ava21-rgb.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
with_temporal_pool=True),
3535
bbox_head=dict(
3636
type='BBoxHeadAVA',
37+
background_class=True,
3738
in_channels=2048,
3839
num_classes=81,
3940
multilabel=True,

configs/detection/slowfast/slowfast_kinetics400-pretrained-r50_8xb16-4x16x1-20e_ava21-rgb.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
with_temporal_pool=True),
4545
bbox_head=dict(
4646
type='BBoxHeadAVA',
47+
background_class=True,
4748
in_channels=2304,
4849
num_classes=81,
4950
multilabel=True,

configs/detection/slowfast/slowfast_kinetics400-pretrained-r50_8xb6-8x8x1-cosine-10e_ava22-rgb.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
with_temporal_pool=True),
4646
bbox_head=dict(
4747
type='BBoxHeadAVA',
48+
background_class=True,
4849
in_channels=2304,
4950
num_classes=81,
5051
multilabel=True,

configs/detection/slowfast/slowfast_kinetics400-pretrained-r50_8xb8-8x8x1-20e_ava21-rgb.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
with_temporal_pool=True),
4646
bbox_head=dict(
4747
type='BBoxHeadAVA',
48+
background_class=True,
4849
in_channels=2304,
4950
num_classes=81,
5051
multilabel=True,

configs/detection/slowonly/slowonly_k400-pre-r50_8xb8-4x16x1-10e_ava-kinetics-rgb.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
with_temporal_pool=True),
3030
bbox_head=dict(
3131
type='BBoxHeadAVA',
32+
background_class=True,
3233
in_channels=2048,
3334
num_classes=81,
3435
multilabel=True,

configs/detection/slowonly/slowonly_k400-pre-r50_8xb8-8x8x1-10e_ava-kinetics-rgb.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
with_temporal_pool=True),
3030
bbox_head=dict(
3131
type='BBoxHeadAVA',
32+
background_class=True,
3233
in_channels=2048,
3334
num_classes=81,
3435
multilabel=True,

configs/detection/slowonly/slowonly_kinetics400-pretrained-r101_8xb16-8x8x1-20e_ava21-rgb.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
with_temporal_pool=True),
2929
bbox_head=dict(
3030
type='BBoxHeadAVA',
31+
background_class=True,
3132
in_channels=2048,
3233
num_classes=81,
3334
multilabel=True,

configs/detection/slowonly/slowonly_kinetics400-pretrained-r50-nl_8xb16-4x16x1-20e_ava21-rgb.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
with_temporal_pool=True),
3737
bbox_head=dict(
3838
type='BBoxHeadAVA',
39+
background_class=True,
3940
in_channels=2048,
4041
num_classes=81,
4142
multilabel=True,

configs/detection/slowonly/slowonly_kinetics400-pretrained-r50-nl_8xb16-8x8x1-20e_ava21-rgb.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
with_temporal_pool=True),
3737
bbox_head=dict(
3838
type='BBoxHeadAVA',
39+
background_class=True,
3940
in_channels=2048,
4041
num_classes=81,
4142
multilabel=True,

configs/detection/slowonly/slowonly_kinetics400-pretrained-r50_8xb16-4x16x1-20e_ava21-rgb.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
with_temporal_pool=True),
3030
bbox_head=dict(
3131
type='BBoxHeadAVA',
32+
background_class=True,
3233
in_channels=2048,
3334
num_classes=81,
3435
multilabel=True,

configs/detection/slowonly/slowonly_kinetics400-pretrained-r50_8xb16-4x16x1-8e_multisports-rgb.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
with_temporal_pool=True),
3131
bbox_head=dict(
3232
type='BBoxHeadAVA',
33+
background_class=False,
3334
in_channels=2048,
3435
num_classes=num_classes,
3536
multilabel=False,

configs/detection/slowonly/slowonly_kinetics700-pretrained-r50_8xb16-4x16x1-20e_ava21-rgb.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
with_temporal_pool=True),
3030
bbox_head=dict(
3131
type='BBoxHeadAVA',
32+
background_class=True,
3233
in_channels=2048,
3334
num_classes=81,
3435
multilabel=True,

configs/detection/videomae/vit-base-p16_videomae-k400-pre_8xb8-16x4x1-20e-adamw_ava-kinetics-rgb.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
with_temporal_pool=True),
3232
bbox_head=dict(
3333
type='BBoxHeadAVA',
34+
background_class=True,
3435
in_channels=768,
3536
num_classes=81,
3637
multilabel=True,

configs/detection/videomae/vit-large-p16_videomae-k400-pre_8xb8-16x4x1-20e-adamw_ava-kinetics-rgb.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
with_temporal_pool=True),
3333
bbox_head=dict(
3434
type='BBoxHeadAVA',
35+
background_class=True,
3536
in_channels=1024,
3637
num_classes=81,
3738
multilabel=True,

0 commit comments

Comments
 (0)