MagNAt Model¶
MagNAt_vanilla
¶
Bases: Model
A vanilla implementation of the MagNAt model.
This version appears to be a baseline or earlier version of the MagNAt model for multi-image super-resolution, built using PyTorch Geometric. It includes a registration network (RegNet) to estimate shifts between input images.
__init__(in_channels: int = 1, d=56, s=16, scale: int = 3, processing_layers: int = 4, attention_heads: int = 1, radius: float = 1.0, filter_size: int = 9, regnet_bias: bool = True, remove_masked=False, magnet_legacy: bool = False, **kwargs)
¶
Initializes the MagNAt_vanilla model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
in_channels
|
int
|
Number of input channels for each image. |
1
|
d
|
int
|
Base feature dimension size. |
56
|
s
|
int
|
Shrinking layer feature dimension size. |
16
|
scale
|
int
|
The target upscaling factor. |
3
|
processing_layers
|
int
|
Number of non-linear mapping layers. |
4
|
attention_heads
|
int
|
Number of heads in EdgeAttentionEmbedding. |
1
|
radius
|
float
|
Radius for graph construction. |
1.0
|
filter_size
|
int
|
Kernel size for the dynamic filter generation in RegNet. |
9
|
regnet_bias
|
bool
|
Whether to use a bias in the final RegNet layer. |
True
|
remove_masked
|
bool
|
If True, removes masked nodes before processing. |
False
|
**kwargs
|
Any
|
Additional keyword arguments. |
{}
|
MagNAt
¶
Bases: Model
The MagNAt model for Multi-Image Super-Resolution using Graph Attention.
This model registers a set of low-resolution images by treating them as nodes in a graph, estimates their alignment, and fuses their features using a graph neural network to produce a super-resolved image. This version includes edge dropout for regularization.
__init__(in_channels: int = 1, d=56, s=16, scale: int = 3, processing_layers: int = 4, attention_heads: int = 1, radius: float = 1.0, filter_size: int = 9, regnet_bias: bool = True, remove_masked=False, edge_dropout: float = 0.3, **kwargs)
¶
Initializes the MagNAt model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
in_channels
|
int
|
Number of input channels for each image. |
1
|
d
|
int
|
Base feature dimension size. |
56
|
s
|
int
|
Shrinking layer feature dimension size. |
16
|
scale
|
int
|
The target upscaling factor. |
3
|
processing_layers
|
int
|
Number of non-linear mapping layers. |
4
|
attention_heads
|
int
|
Number of heads in EdgeAttentionEmbedding. |
1
|
radius
|
float
|
Radius for graph construction. |
1.0
|
filter_size
|
int
|
Kernel size for the dynamic filter generation in RegNet. |
9
|
regnet_bias
|
bool
|
Whether to use a bias in the final RegNet layer. |
True
|
remove_masked
|
bool
|
If True, removes masked nodes before processing. |
False
|
edge_dropout
|
float
|
Dropout probability for graph edges. |
0.3
|
**kwargs
|
Any
|
Additional keyword arguments. |
{}
|