File size: 1,446 Bytes
d26b20e c395c55 beeddb4 c395c55 d26b20e |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
---
tags:
- model_hub_mixin
- pytorch_model_hub_mixin
---
# AG-Net
This is an implementation (the first public implementation as far as I know) of AG-Net as described in the paper "Attend and Guide (AG-Net): A Keypoints-driven Attention-based Deep Network for Image Recognition" by Asish Bera, Zachary Wharton, Yonghuai Liu, Nik Bessis, and Ardhendu Behera. I include the weights for the model which achieves 98.3% accuracy on the test data of the [Caltech-256 dataset](ilee0022/Caltech-256).
I include the iPython Notebook in my Github where I derived the model to "show my work", but I also include a few python files which contain the combined code from the notebook. The files and functions are the following: utils.py, which contains the data fetching and augmentations, models.py, which contains the torch modules, train.py, which trains the model and optionally saves it, and test.py, which tests the model.
Note that I coded all of this on my own with the exception of the "Intra Self-Attention" module which I obtained from https://github.com/heykeetae/Self-Attention-GAN/blob/master/sagan_models.py (also note that there it's called Self-Attention (Self_Attn module)).
This model has been pushed to the Hub using the [PytorchModelHubMixin](https://huggingface.co/docs/huggingface_hub/package_reference/mixins#huggingface_hub.PyTorchModelHubMixin) integration:
- Library: [More Information Needed]
- Docs: [More Information Needed] |