kaira.models.image.DeepJSCCFeedbackModel

Inheritance diagram for DeepJSCCFeedbackModel
- class kaira.models.image.DeepJSCCFeedbackModel(channel_snr: float, conv_depth: int, channel_type: str, feedback_snr: float | None, refinement_layer: bool, layer_id: int, forward_channel: BaseChannel | None = None, feedback_channel: BaseChannel | None = None, target_analysis: bool = False, max_iterations: int = 3, *args: Any, **kwargs: Any)[source]
Bases:
FeedbackChannelModelDeep Joint Source-Channel Coding with Feedback implementation [Kurka and Gündüz, 2020].
This model implements the DeepJSCC with feedback architecture from Kurka et al. 2020, which uses channel feedback to enhance image transmission quality in wireless channels. The model supports multiple iterations of feedback to progressively refine the reconstruction quality at the receiver.
- Parameters:
channel_snr (float) – Signal-to-noise ratio of the forward channel in dB.
conv_depth (int) – Depth of the convolutional features, controls bandwidth usage.
channel_type (str) – Type of channel (‘awgn’, ‘fading’, etc.).
feedback_snr (float) – Signal-to-noise ratio of the feedback channel in dB. If None, assumes perfect feedback.
refinement_layer (bool) – Whether this is a refinement layer (True) or base layer (False).
layer_id (int) – ID of the current layer for multi-layer configurations.
forward_channel (BaseChannel, optional) – The forward channel model. Defaults to None.
feedback_channel (BaseChannel, optional) – The feedback channel model. Defaults to None.
target_analysis (bool, optional) – Whether to perform target analysis. Defaults to False.
max_iterations (int, optional) – Maximum number of feedback iterations. Defaults to 3.
Methods
Initialize the DeepJSCCFeedbackModel.
Forward pass of the DeepJSCC Feedback model.
- __init__(channel_snr: float, conv_depth: int, channel_type: str, feedback_snr: float | None, refinement_layer: bool, layer_id: int, forward_channel: BaseChannel | None = None, feedback_channel: BaseChannel | None = None, target_analysis: bool = False, max_iterations: int = 3, *args: Any, **kwargs: Any)[source]
Initialize the DeepJSCCFeedbackModel.
- Parameters:
channel_snr (float) – Signal-to-noise ratio of the forward channel in dB.
conv_depth (int) – Depth of the convolutional features, controls bandwidth usage.
channel_type (str) – Type of channel (‘awgn’, ‘fading’, etc.).
feedback_snr (Optional[float]) – Signal-to-noise ratio of the feedback channel in dB. If None, assumes perfect feedback.
refinement_layer (bool) – Whether this is a refinement layer (True) or base layer (False).
layer_id (int) – ID of the current layer for multi-layer configurations.
forward_channel (Optional[BaseChannel]) – The forward channel model. Defaults to None.
feedback_channel (Optional[BaseChannel]) – The feedback channel model. Defaults to None.
target_analysis (bool) – Whether to perform target analysis. Defaults to False.
max_iterations (int) – Maximum number of feedback iterations. Defaults to 3.
*args – Variable positional arguments passed to the base class.
**kwargs – Variable keyword arguments passed to the base class.
- forward(input_data: Any, *args: Any, **kwargs: Any) dict[str, Any][source]
Forward pass of the DeepJSCC Feedback model.
Processes the input through the encoder, channel, and decoder, potentially with multiple rounds of feedback. Handles both base layer and refinement layer cases.
- Parameters:
input_data – Either: - For base layer: the input image tensor of shape [B, C, H, W] - For refinement layer: a tuple containing (input_image, previous_feedback_image, previous_feedback_channel_output, previous_decoded_image, previous_decoded_channel_output, previous_channel_gain)
*args – Additional positional arguments passed to internal components.
**kwargs – Additional keyword arguments passed to internal components.
- Returns:
- Dictionary containing:
’decoded_img’: Reconstructed image
’decoded_img_fb’: Reconstructed image using feedback
’channel_output’: Channel output used for decoding
’feedback_channel_output’: Feedback channel output
’channel_gain’: Channel gain if applicable
- Return type: