├── .gitattributes ├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md └── workflows │ ├── lint.yml │ ├── publish_to_pypi.yml │ └── tests.yml ├── .gitignore ├── CITATION.cff ├── LICENSE.md ├── README.md ├── _config.yml ├── app.py ├── example ├── bus.jpg ├── cat_dog.JPG ├── chelsea.png ├── german_shepherd.jpg ├── hot_air_ballon.jpg ├── jellyfish.jpg ├── panda.jpg └── penguin.JPG ├── gcvit ├── __init__.py ├── layers │ ├── __init__.py │ ├── attention.py │ ├── block.py │ ├── drop.py │ ├── embedding.py │ ├── feature.py │ ├── level.py │ ├── pooling.py │ └── window.py ├── models │ ├── __init__.py │ └── gcvit.py ├── utils │ ├── __init__.py │ ├── conv_utils.py │ └── gradcam.py └── version.py ├── image ├── arch.PNG ├── arch_annot.png ├── block2.JPG ├── down.png ├── down_annot.png ├── flower_gradcam.PNG ├── fmb_annot.png ├── fmb_block.png ├── global_token.JPG ├── global_token_annot.png ├── gradio_demo.JPG ├── level.png ├── lvg_arch.PNG ├── lvg_msa.PNG ├── result.PNG ├── se_annot.png ├── shifted_window.JPG ├── swin_arch.JPG ├── swin_vs_vit.JPG └── vit_gif.gif ├── notebooks ├── GCViT_Flower_Classification.ipynb └── flower-classification-gcvit-global-context-vit.ipynb ├── requirements.txt ├── setup.cfg ├── setup.py ├── shell ├── format.sh └── lint.sh └── tests ├── __init__.py └── test_gcvit.py /.gitattributes: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awsaf49/gcvit-tf/HEAD/.gitattributes -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awsaf49/gcvit-tf/HEAD/.github/ISSUE_TEMPLATE/bug_report.md -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awsaf49/gcvit-tf/HEAD/.github/ISSUE_TEMPLATE/feature_request.md -------------------------------------------------------------------------------- /.github/workflows/lint.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awsaf49/gcvit-tf/HEAD/.github/workflows/lint.yml -------------------------------------------------------------------------------- /.github/workflows/publish_to_pypi.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awsaf49/gcvit-tf/HEAD/.github/workflows/publish_to_pypi.yml -------------------------------------------------------------------------------- /.github/workflows/tests.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awsaf49/gcvit-tf/HEAD/.github/workflows/tests.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awsaf49/gcvit-tf/HEAD/.gitignore -------------------------------------------------------------------------------- /CITATION.cff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awsaf49/gcvit-tf/HEAD/CITATION.cff -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awsaf49/gcvit-tf/HEAD/LICENSE.md -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awsaf49/gcvit-tf/HEAD/README.md -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awsaf49/gcvit-tf/HEAD/_config.yml -------------------------------------------------------------------------------- /app.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awsaf49/gcvit-tf/HEAD/app.py -------------------------------------------------------------------------------- /example/bus.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awsaf49/gcvit-tf/HEAD/example/bus.jpg -------------------------------------------------------------------------------- /example/cat_dog.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awsaf49/gcvit-tf/HEAD/example/cat_dog.JPG -------------------------------------------------------------------------------- /example/chelsea.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awsaf49/gcvit-tf/HEAD/example/chelsea.png -------------------------------------------------------------------------------- /example/german_shepherd.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awsaf49/gcvit-tf/HEAD/example/german_shepherd.jpg -------------------------------------------------------------------------------- /example/hot_air_ballon.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awsaf49/gcvit-tf/HEAD/example/hot_air_ballon.jpg -------------------------------------------------------------------------------- /example/jellyfish.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awsaf49/gcvit-tf/HEAD/example/jellyfish.jpg -------------------------------------------------------------------------------- /example/panda.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awsaf49/gcvit-tf/HEAD/example/panda.jpg -------------------------------------------------------------------------------- /example/penguin.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awsaf49/gcvit-tf/HEAD/example/penguin.JPG -------------------------------------------------------------------------------- /gcvit/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awsaf49/gcvit-tf/HEAD/gcvit/__init__.py -------------------------------------------------------------------------------- /gcvit/layers/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awsaf49/gcvit-tf/HEAD/gcvit/layers/__init__.py -------------------------------------------------------------------------------- /gcvit/layers/attention.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awsaf49/gcvit-tf/HEAD/gcvit/layers/attention.py -------------------------------------------------------------------------------- /gcvit/layers/block.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awsaf49/gcvit-tf/HEAD/gcvit/layers/block.py -------------------------------------------------------------------------------- /gcvit/layers/drop.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awsaf49/gcvit-tf/HEAD/gcvit/layers/drop.py -------------------------------------------------------------------------------- /gcvit/layers/embedding.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awsaf49/gcvit-tf/HEAD/gcvit/layers/embedding.py -------------------------------------------------------------------------------- /gcvit/layers/feature.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awsaf49/gcvit-tf/HEAD/gcvit/layers/feature.py -------------------------------------------------------------------------------- /gcvit/layers/level.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awsaf49/gcvit-tf/HEAD/gcvit/layers/level.py -------------------------------------------------------------------------------- /gcvit/layers/pooling.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awsaf49/gcvit-tf/HEAD/gcvit/layers/pooling.py -------------------------------------------------------------------------------- /gcvit/layers/window.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awsaf49/gcvit-tf/HEAD/gcvit/layers/window.py -------------------------------------------------------------------------------- /gcvit/models/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awsaf49/gcvit-tf/HEAD/gcvit/models/__init__.py -------------------------------------------------------------------------------- /gcvit/models/gcvit.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awsaf49/gcvit-tf/HEAD/gcvit/models/gcvit.py -------------------------------------------------------------------------------- /gcvit/utils/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awsaf49/gcvit-tf/HEAD/gcvit/utils/__init__.py -------------------------------------------------------------------------------- /gcvit/utils/conv_utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awsaf49/gcvit-tf/HEAD/gcvit/utils/conv_utils.py -------------------------------------------------------------------------------- /gcvit/utils/gradcam.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awsaf49/gcvit-tf/HEAD/gcvit/utils/gradcam.py -------------------------------------------------------------------------------- /gcvit/version.py: -------------------------------------------------------------------------------- 1 | __version__ = "1.1.6" 2 | -------------------------------------------------------------------------------- /image/arch.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awsaf49/gcvit-tf/HEAD/image/arch.PNG -------------------------------------------------------------------------------- /image/arch_annot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awsaf49/gcvit-tf/HEAD/image/arch_annot.png -------------------------------------------------------------------------------- /image/block2.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awsaf49/gcvit-tf/HEAD/image/block2.JPG -------------------------------------------------------------------------------- /image/down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awsaf49/gcvit-tf/HEAD/image/down.png -------------------------------------------------------------------------------- /image/down_annot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awsaf49/gcvit-tf/HEAD/image/down_annot.png -------------------------------------------------------------------------------- /image/flower_gradcam.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awsaf49/gcvit-tf/HEAD/image/flower_gradcam.PNG -------------------------------------------------------------------------------- /image/fmb_annot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awsaf49/gcvit-tf/HEAD/image/fmb_annot.png -------------------------------------------------------------------------------- /image/fmb_block.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awsaf49/gcvit-tf/HEAD/image/fmb_block.png -------------------------------------------------------------------------------- /image/global_token.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awsaf49/gcvit-tf/HEAD/image/global_token.JPG -------------------------------------------------------------------------------- /image/global_token_annot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awsaf49/gcvit-tf/HEAD/image/global_token_annot.png -------------------------------------------------------------------------------- /image/gradio_demo.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awsaf49/gcvit-tf/HEAD/image/gradio_demo.JPG -------------------------------------------------------------------------------- /image/level.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awsaf49/gcvit-tf/HEAD/image/level.png -------------------------------------------------------------------------------- /image/lvg_arch.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awsaf49/gcvit-tf/HEAD/image/lvg_arch.PNG -------------------------------------------------------------------------------- /image/lvg_msa.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awsaf49/gcvit-tf/HEAD/image/lvg_msa.PNG -------------------------------------------------------------------------------- /image/result.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awsaf49/gcvit-tf/HEAD/image/result.PNG -------------------------------------------------------------------------------- /image/se_annot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awsaf49/gcvit-tf/HEAD/image/se_annot.png -------------------------------------------------------------------------------- /image/shifted_window.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awsaf49/gcvit-tf/HEAD/image/shifted_window.JPG -------------------------------------------------------------------------------- /image/swin_arch.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awsaf49/gcvit-tf/HEAD/image/swin_arch.JPG -------------------------------------------------------------------------------- /image/swin_vs_vit.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awsaf49/gcvit-tf/HEAD/image/swin_vs_vit.JPG -------------------------------------------------------------------------------- /image/vit_gif.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awsaf49/gcvit-tf/HEAD/image/vit_gif.gif -------------------------------------------------------------------------------- /notebooks/GCViT_Flower_Classification.ipynb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awsaf49/gcvit-tf/HEAD/notebooks/GCViT_Flower_Classification.ipynb -------------------------------------------------------------------------------- /notebooks/flower-classification-gcvit-global-context-vit.ipynb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awsaf49/gcvit-tf/HEAD/notebooks/flower-classification-gcvit-global-context-vit.ipynb -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | typing 2 | gradio 3 | numpy 4 | matplotlib -------------------------------------------------------------------------------- /setup.cfg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awsaf49/gcvit-tf/HEAD/setup.cfg -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awsaf49/gcvit-tf/HEAD/setup.py -------------------------------------------------------------------------------- /shell/format.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awsaf49/gcvit-tf/HEAD/shell/format.sh -------------------------------------------------------------------------------- /shell/lint.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awsaf49/gcvit-tf/HEAD/shell/lint.sh -------------------------------------------------------------------------------- /tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/test_gcvit.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awsaf49/gcvit-tf/HEAD/tests/test_gcvit.py --------------------------------------------------------------------------------