Visual_attention_tf
A set of image attention layers implemented as custom keras layers that can be imported dirctly into keras
Currently Implemented layers:
- Pixel Attention : Efficient Image Super-Resolution Using Pixel Attention(Hengyuan Zhao et al)
- Channel Attention : CBAM: Convolutional Block Attention Module(Sanghyun Woo et al)
- Efficient Channel Attention : ECA-Net: Efficient Channel Attention for Deep Convolutional Neural Networks
Installation
You can see the projects official pypi page : https://pypi.org/project/visual-attention-tf/
pip install visual-attention-tf
Use --no-dependencies if you have tensorflow-gpu installed already
Usage:
from tensorflow.keras.models import Model
from tensorflow.keras.layers import Input, Conv2D
from visual_attention import PixelAttention2D , ChannelAttention2D,EfficientChannelAttention2D
inp = Input(shape=(1920,1080,3))
cnn_layer = Conv2D(32,3,,activation='relu', padding='same')(inp)
# Using the .shape[-1] to simplify network modifications. Can directly input number of channels as well
Pixel_attention_cnn = PixelAttention2D(cnn_layer.shape[-1])(cnn_layer)
Channel_attention_cnn = ChannelAttention2D(cnn_layer.shape[-1])(cnn_layer)
EfficientChannelAttention_cnn = EfficientChannelAttention2D(cnn_layer.shape[-1])(cnn_layer)
Metadata
Release files for visual-attention-tf 1.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| visual-attention-tf-1.2.0.tar.gz | 3.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| visual_attention_tf-1.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.7 kB
Release files / visual-attention-tf-1.2.0.tar.gz
| Download URL | visual-attention-tf-1.2.0.tar.gz |
|---|---|
| Size | 3.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2595b764ec1dcbf39a8fc2b981e756c795b9b334fedaf07e34cf58350957da01
|
|
BLAKE2b-256 checksum How to use checksums |
f940f5329f8fca302b6499f21a671b10fcd8f8f4e5a9f84913bc4de785ad840c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.6.12
|
Release files / visual_attention_tf-1.2.0-py3-none-any.whl
| Download URL | visual_attention_tf-1.2.0-py3-none-any.whl |
|---|---|
| Size | 5.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e212a1170bcbb4216ced73c87dfefa1e6c72ab0205952ace59ccef23ba38db36
|
|
BLAKE2b-256 checksum How to use checksums |
9c5d9f038133f7ae7a76a928a7a587f63b3e5823c0c5950725330c974dfc1a44
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.6.12
|