Skip to content

Commit 9b414d8

Browse files
committed
release 0.1
1 parent 7cd283a commit 9b414d8

File tree

3 files changed

+44
-2
lines changed

3 files changed

+44
-2
lines changed

README.md

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,38 @@
11
# MAN
2-
PyTorch Implementation of Mixed Attention Network for Hyperspectral Image Denoising
2+
3+
PyTorch Implementation of [Mixed Attention Network for Hyperspectral Image Denoising]()
4+
5+
🌟 Hightlights
6+
7+
- We propose a new adaptive skip connection which weights different features elementwise.
8+
- We propose a lightweight mixed attention block with spectrum attention and channel attention.
9+
10+
## Usage
11+
12+
- Use our model.
13+
14+
```python
15+
import torch
16+
from mans import man
17+
18+
net = man()
19+
x = torch.randn(4,1,31,64,64)
20+
y = net(x)
21+
```
22+
23+
- Training and Testing with [HSIR](https://github.com/bit-isp/HSIR).
24+
25+
```shell
26+
python -m hsirun.test -a mans.man -r ckpt/man_gaussian.pth -t icvl_512_30 icvl_512_50
27+
python -m hsirun.train -a mans.man
28+
```
29+
30+
## Citations
31+
32+
```bibtex
33+
@misc{lai_man2022,
34+
title={Mixed Attention Network for Hyperspectral Image Denoising},
35+
author={Zeqiang Lai, Ying Fu},
36+
year={2022},
37+
}
38+
```

mans.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,6 @@ def _rnn_step(self, z, f, h):
112112
return h_
113113

114114
def forward(self, inputs):
115-
print(self.reverse)
116115
h = None
117116
Z = self.ffn_f(inputs).tanh()
118117
F = self.ffn_w(inputs).sigmoid()

test.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import torch
2+
from mans import man
3+
4+
net = man()
5+
x = torch.randn(2,1,31,64,64)
6+
y = net(x)
7+
print(y.shape)

0 commit comments

Comments
 (0)