CoT is a unified self-attention building block, and acts as an alternative to standard convolutions in ConvNet. As a result, it is feasible to replace convolutions with their CoT counterparts for strengthening vision backbones with contextualized self-attention.
2021/3/25-2021/6/5: CVPR 2021 Open World Image Classification Challenge
The training scripts for CoTNet (e.g., CoTNet-50) can be found in the cot_experiments folder.
Inference Time vs. Accuracy
CoTNet models consistently obtain better top-1 accuracy with less inference time than other vision backbones across both default and advanced training setups. In a word, CoTNet models seek better inference time-accuracy trade-offs than existing vision backbones.
Introduction
This repository is the official implementation of Contextual Transformer Networks for Visual Recognition.
CoT is a unified self-attention building block, and acts as an alternative to standard convolutions in ConvNet. As a result, it is feasible to replace convolutions with their CoT counterparts for strengthening vision backbones with contextualized self-attention.
2021/3/25-2021/6/5: CVPR 2021 Open World Image Classification Challenge
Rank 1 in Open World Image Classification Challenge @ CVPR 2021. (Team name: VARMS)
Usage
The code is mainly based on timm.
Requirement:
Clone the repository:
Train
First, download the ImageNet dataset. To train CoTNet-50 on ImageNet on a single node with 8 gpus for 350 epochs run:
The training scripts for CoTNet (e.g., CoTNet-50) can be found in the cot_experiments folder.
Inference Time vs. Accuracy
CoTNet models consistently obtain better top-1 accuracy with less inference time than other vision backbones across both default and advanced training setups. In a word, CoTNet models seek better inference time-accuracy trade-offs than existing vision backbones.
Results on ImageNet
Access code for Baidu is cotn
CoTNet on downstream tasks
For Object Detection and Instance Segmentation, please see CoTNet for Object Detection and Instance Segmentation.
Citing Contextual Transformer Networks
Acknowledgements
Thanks the contribution of timm and awesome PyTorch team.