Git Product home page Git Product logo

cloformer's Introduction

CloFormer

The official code of "Rethinking Local Perception in Lightweight Vision Transformer". Pretrained models and the code for detection and segmenatation will come soon

[arxiv]

Introduction

Vision Transformers (ViTs) have been shown to be effective in various vision tasks. However, resizing them to a mobile-friendly size leads to significant performance degradation. Therefore, developing lightweight vision transformers has become a crucial area of research. This paper introduces CloFormer, a lightweight vision transformer that leverages context-aware local enhancement. CloFormer explores the relationship between globally shared weights often used in vanilla convolutional operators and token-specific context-aware weights appearing in attention, then proposes an effective and straightforward module to capture high-frequency local information. In CloFormer, we introduce AttnConv, a convolution operator in attention's style. The proposed AttnConv uses shared weights to aggregate local information and deploys carefully designed context-aware weights to enhance local features. The combination of the AttnConv and vanilla attention which uses pooling to reduce FLOPs in CloFormer enables the model to perceive high-frequency and low-frequency information. Extensive experiments were conducted in image classification, object detection, and semantic segmentation, demonstrating the superiority of CloFormer.

cloformer's People

Contributors

qhfan avatar

Stargazers

Kuo Pang avatar cyj avatar 7K avatar  avatar Mr.wen avatar  avatar  avatar  avatar miaosonic avatar YanSun avatar  avatar lkx avatar Yuchong Yao avatar  avatar  avatar  avatar catkin_ws avatar 123 avatar  avatar Kourze avatar  avatar  avatar  avatar zz avatar  avatar Chandler avatar  avatar see小高 avatar  avatar Douglas_D avatar YuxuanLi avatar  avatar  avatar Cccp421 avatar  avatar  avatar Spider Man avatar  avatar jackyfourteen avatar  avatar SmartCloud avatar chandler ye avatar Gary Gu avatar  avatar  avatar ChenJingyi avatar xln-tj avatar  avatar  avatar  avatar  avatar  avatar LiuZhangyang avatar  avatar public_gsq avatar  avatar  avatar 胡杨 HU YANG avatar  avatar An-zhi WANG avatar  avatar 姐姐晚上一个人睡吗O.o avatar Fei Wang avatar Wen avatar ZCJ avatar Julien avatar  avatar  avatar SammyZZZZ avatar  avatar Caas Talking Heads avatar Chenlin avatar Busby avatar 魔鬼面具 avatar Ning Li avatar maodou_ddup avatar Junlin Chang avatar  avatar Mike avatar  avatar  avatar Xiaoyu Zhang avatar 41 avatar Ther avatar

Watchers

Mike avatar Sanny Liu avatar Kostas Georgiou avatar  avatar

cloformer's Issues

to_qkv

I'm sorry to intrude. I didn't find a definition self.qkv in high_fre_attntion. it's probably a silly question, can you tell me why?

input_size=240

Hello, your work is excellent. I would like to ask how to modify the network to change the input size to 240.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.