kaira.models.image.Yilmaz2024DeepJSCCWZConditionalEncoder

Inheritance diagram for Yilmaz2024DeepJSCCWZConditionalEncoder
- class kaira.models.image.Yilmaz2024DeepJSCCWZConditionalEncoder(N: int, M: int, *args: Any, **kwargs: Any)[source]
Bases:
BaseModelDeepJSCC-WZ Conditional Encoder Module [Yilmaz et al., 2024].
This variant of the DeepJSCC-WZ encoder actively incorporates side information during the encoding process. This model is designed for scenarios where side information is available at both encoder and decoder, serving as an upper bound for performance comparison.
The conditional encoder features three processing paths: - g_a: Main encoding path that fuses the input with side information features - g_a2: Processing path for side information for the decoder - g_a3: Auxiliary path for feature extraction from side information for the encoder
By leveraging correlations between the main signal and side information at encoding time, this model achieves more efficient compression and better reconstruction quality compared to the standard DeepJSCC-WZ model, at the cost of requiring side information during encoding.
Architecture highlights: - Early fusion of input and side information (6-channel input) - Multi-scale feature fusion with side information - 4 stages of downsampling (16× spatial reduction) - Channel-adaptive processing with AFModule
Methods
Initialize the conditional DeepJSCC-WZ encoder.
Encode the input image with conditional side information.
- __init__(N: int, M: int, *args: Any, **kwargs: Any) None[source]
Initialize the conditional DeepJSCC-WZ encoder.
- Parameters:
N (int) – Number of intermediate channels in the residual blocks. Controls the network capacity and feature dimension.
M (int) – Number of output channels in the final latent representation. Determines the compression rate and bandwidth usage.
*args – Variable positional arguments passed to the base class.
**kwargs – Variable keyword arguments passed to the base class.
- forward(x: Tensor, x_side: Tensor, csi: Tensor, *args: Any, **kwargs: Any) Tensor[source]
Encode the input image with conditional side information.
This method processes both the main input image and side information in parallel, fusing features from the side information stream into the main encoding path at multiple scales. The side information is available at the encoder, allowing for more efficient compression compared to the standard DeepJSCC-WZ model.
- Parameters:
x (torch.Tensor) – Input image tensor of shape [B, 3, H, W].
x_side (torch.Tensor) – Side information tensor of shape [B, 3, H, W] used during encoding.
csi (torch.Tensor) – Channel state information tensor of shape [B, 1, 1, 1].
*args – Additional positional arguments (passed to internal layers).
**kwargs – Additional keyword arguments (passed to internal layers).
- Returns:
- Encoded representation ready for transmission.
Shape: [B, M, H/16, W/16], where M is the number of channels specified during initialization.
- Return type: