Implementasi resmi operator saraf seperti yang dijelaskan dalam Involution: Membalikkan Warisan Konvolusi untuk Pengakuan Visual (CVPR'21)
Oleh Duo Li, Jie Hu, Changhu Wang, Xiangtai Li, Qi She, Lei Zhu, Tong Zhang, dan Qifeng Chen

Tl; Dr. involution adalah primitif saraf tujuan umum yang serba guna untuk spektrum model pembelajaran mendalam pada tugas penglihatan yang berbeda. involution menjembatani convolution dan self-attention dalam desain, sementara lebih efisien dan efektif daripada convolution , lebih sederhana daripada self-attention dalam bentuk.


Jika Anda menemukan pekerjaan kami berguna dalam penelitian Anda, silakan kutip:
@InProceedings{Li_2021_CVPR,
author = {Li, Duo and Hu, Jie and Wang, Changhu and Li, Xiangtai and She, Qi and Zhu, Lei and Zhang, Tong and Chen, Qifeng},
title = {Involution: Inverting the Inherence of Convolution for Visual Recognition},
booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
month = {June},
year = {2021}
}
Repositori ini sepenuhnya dibangun di atas toolkit OpenMMLAB. Untuk setiap tugas individu, file konfigurasi dan model mengikuti organisasi direktori yang sama dengan MMCLS, MMDET, dan MMSEG masing-masing, jadi cukup salin-dan-paste mereka ke lokasi yang sesuai untuk memulai.
Misalnya, dalam hal mengevaluasi detektor
git clone https://github.com/open-mmlab/mmdetection # and install
# copy model files
cp det/mmdet/models/backbones/ * mmdetection/mmdet/models/backbones
cp det/mmdet/models/necks/ * mmdetection/mmdet/models/necks
cp det/mmdet/models/dense_heads/ * mmdetection/mmdet/models/dense_heads
cp det/mmdet/models/roi_heads/ * mmdetection/mmdet/models/roi_heads
cp det/mmdet/models/roi_heads/mask_heads/ * mmdetection/mmdet/models/roi_heads/mask_heads
cp det/mmdet/models/utils/ * mmdetection/mmdet/models/utils
cp det/mmdet/datasets/ * mmdetection/mmdet/datasets
# copy config files
cp det/configs/_base_/models/ * mmdetection/configs/_base_/models
cp det/configs/_base_/schedules/ * mmdetection/configs/_base_/schedules
cp det/configs/involution mmdetection/configs -r
# evaluate checkpoints
cd mmdetection
bash tools/dist_test.sh ${CONFIG_FILE} ${CHECKPOINT_FILE} ${GPU_NUM} [--out ${RESULT_FILE} ] [--eval ${EVAL_METRICS} ]Untuk panduan yang lebih terperinci, silakan merujuk ke MMCL asli, MMDET, dan tutorial MMSEG.
Saat ini, kami memberikan implementasi yang efisien memori dari operator Involuton berdasarkan CUPY. Harap instal perpustakaan ini terlebih dahulu. Kernel CUDA yang disesuaikan akan membawa akselerasi lebih lanjut pada perangkat keras. Setiap kontribusi dari komunitas mengenai hal ini disambut!
Parameter/FLOPS ↓ dan kinerja ↑ dibandingkan dengan baseline konvolusi ditandai dalam tanda kurung. Bagian dari pos -pos pemeriksaan ini diperoleh dalam proses penerimaan ulang kami, yang kinerjanya mungkin menunjukkan sedikit perbedaan dengan yang dilaporkan dalam makalah kami. Model dilatih dengan 64 GPU di Imagenet, 8 GPU pada Coco, dan 4 GPU pada Cityscapes.
| Model | Params (m) | FLOPS (G) | Top-1 (%) | Top-5 (%) | Konfigurasi | Unduh |
|---|---|---|---|---|---|---|
| Rednet-26 | 9.23 (32,8%↓) | 1,73 (29,2%↓) | 75.96 | 93.19 | konfigurasi | model | log |
| Rednet-38 | 12.39 (36.7%↓) | 2.22 (31,3%↓) | 77.48 | 93.57 | konfigurasi | model | log |
| Rednet-50 | 15,54 (39,5%↓) | 2.71 (34.1%↓) | 78.35 | 94.13 | konfigurasi | model | log |
| Rednet-101 | 25.65 (42.6%↓) | 4,74 (40,5%↓) | 78.92 | 94.35 | konfigurasi | model | log |
| Rednet-152 | 33,99 (43,5%↓) | 6.79 (41.4%↓) | 79.12 | 94.38 | konfigurasi | model | log |
Sebelum finetuning pada tugas hilir berikut, unduh bobot RedNet-50 pra-terlatih Imagenet dan atur argumen pretrained di det/configs/_base_/models/*.py atau seg/configs/_base_/models/*.py
| Tulang punggung | Leher | Kepala | Gaya | LR Schd | Params (m) | FLOPS (G) | Kotak AP | Konfigurasi | Unduh |
|---|---|---|---|---|---|---|---|---|---|
| Rednet-50-fpn | lilitan | lilitan | Pytorch | 1x | 31.6 (23.9%↓) | 177.9 (14.1%↓) | 39.5 (1.8 ↑) | konfigurasi | model | log |
| Rednet-50-fpn | kerumitan | lilitan | Pytorch | 1x | 29,5 (28,9%↓) | 135.0 (34.8%↓) | 40.2 (2.5 ↑) | konfigurasi | model | log |
| Rednet-50-fpn | kerumitan | kerumitan | Pytorch | 1x | 29.0 (30.1%↓) | 91.5 (55,8%↓) | 39.2 (1,5 ↑) | konfigurasi | model | log |
| Tulang punggung | Leher | Kepala | Gaya | LR Schd | Params (m) | FLOPS (G) | Kotak AP | Topeng ap | Konfigurasi | Unduh |
|---|---|---|---|---|---|---|---|---|---|---|
| Rednet-50-fpn | lilitan | lilitan | Pytorch | 1x | 34.2 (22,6%↓) | 224.2 (11,5%↓) | 39.9 (1,5 ↑) | 35.7 (0,6 ↑) | konfigurasi | model | log |
| Rednet-50-fpn | kerumitan | lilitan | Pytorch | 1x | 32.2 (27.1%↓) | 181.3 (28.5%↓) | 40.8 (2.4 ↑) | 36.4 (1.3 ↑) | konfigurasi | model | log |
| Rednet-50-fpn | kerumitan | kerumitan | Pytorch | 1x | 29,5 (33,3%↓) | 104.6 (58.7%↓) | 39.6 (1.2 ↑) | 35.1 (0,0 ↑) | konfigurasi | model | log |
| Tulang punggung | Leher | Gaya | LR Schd | Params (m) | FLOPS (G) | Kotak AP | Konfigurasi | Unduh |
|---|---|---|---|---|---|---|---|---|
| Rednet-50-fpn | lilitan | Pytorch | 1x | 27.8 (26.3%↓) | 210.1 (12.2%↓) | 38.2 (1.6 ↑) | konfigurasi | model | log |
| Rednet-50-fpn | kerumitan | Pytorch | 1x | 26.3 (30.2%↓) | 199.9 (16.5%↓) | 38.2 (1.6 ↑) | konfigurasi | model | log |
| Metode | Tulang punggung | Leher | Ukuran tanaman | LR Schd | Params (m) | FLOPS (G) | Miou | Konfigurasi | unduh |
|---|---|---|---|---|---|---|---|---|---|
| FPN | Rednet-50 | lilitan | 512x1024 | 80000 | 18.5 (35.1%↓) | 293.9 (19.0%↓) | 78.0 (3.6 ↑) | konfigurasi | model | log |
| FPN | Rednet-50 | kerumitan | 512x1024 | 80000 | 16.4 (42,5%↓) | 205.2 (43,4%↓) | 79.1 (4.7 ↑) | konfigurasi | model | log |
| Upernet | Rednet-50 | lilitan | 512x1024 | 80000 | 56.4 (15.1%↓) | 1825.6 (3,6%↓) | 80.6 (2.4 ↑) | konfigurasi | model | log |