# resattention
A python library for implementing a Residual Attention Convolutional Neural Network and training it for image classification problems. This model supports multi-class classification and is easy to use both for training and testing purposes.
The code is Python 2 and 3 compatible.
# Installation
Fast install:
pip install resattention
For a manual install get this package:
$wget https://github.com/garain/resattention/archive/master.zip
$unzip master.zip
$rm master.zip
$cd resattention-master
Install the package:
python setup.py install
# Example
from resattention import models
import tensorflow as tf
model = models.AttentionResNetCifar10(shape=(32,32,3),n_classes=2,n_channels=3)#RGB images
model = models.AttentionResNetCifar10(shape=(32,32,1),n_classes=6,n_channels=1)#GrayScale images
model.compile(tf.keras.optimizers.Adam(lr=0.0001), loss='categorical_crossentropy', metrics=['accuracy'])
model.summary()
# Models supported
AttentionResNetCifar10
AttentionResNet92
AttentionResNet56
# Please cite this publication if this library comes to any use:
Garain, B. Ray, P. K. Singh, A. Ahmadian, N. Senu and R. Sarkar, “GRANet: A Deep Learning Model for Classification of Age and Gender from Facial Images,” in IEEE Access, doi: 10.1109/ACCESS.2021.3085971.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
resattention-0.0.4.tar.gz
(3.9 kB
view details)
File details
Details for the file resattention-0.0.4.tar.gz.
File metadata
- Download URL: resattention-0.0.4.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
Python-urllib/3.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4aebcf25113391ed907f5a2d7b5a3a2ebaecfcd6cce12784e3acb4238b23767d
|
|
| MD5 |
fd73c6eea14a76fe37cefb64a4805e2f
|
|
| BLAKE2b-256 |
422423e78e9f26732e89b68030ae6baf3591ee08596ac257421247129cfd4908
|