学术
模块更新于 2026-11-20· 浏览 0· 下载 0

FCB 傅里叶卷积块

卷积搬进频域:利用“空间卷积等价于频域逐元素相乘”,先 FFT、乘可学习频域核、再 IFFT,感受野放大到与输入图像同尺寸;训练后核谱秩最高可达 143,而普通卷积核通常低于 3

医学影像医学影像MRI重建FCB图像复原

结构图

FCB 傅里叶卷积块结构图
FCB 傅里叶卷积块结构图

卷积搬进频域:利用“空间卷积等价于频域逐元素相乘”,先 FFT、乘可学习频域核、再 IFFT,感受野放大到与输入图像同尺寸;训练后核谱秩最高可达 143,而普通卷积核通常低于 3

论文信息

  • 论文:Fourier Convolution Block with global receptive field for MRI reconstruction
  • 出处:Medical Image Analysis 2025

核心痛点

MRI 靠 k-space 欠采样加速扫描,产生全局长程分布的混叠伪影;主流 CNN 堆叠局部卷积,有效感受野远低于理论预期,抓不住全局伪影;ViT 和大核 CNN 感受野够大,但计算量和训练难度也上涨。

模块亮点

  • 卷积搬进频域:利用“空间卷积等价于频域逐元素相乘”,先 FFT、乘可学习频域核、再 IFFT,感受野放大到与输入图像同尺寸;训练后核谱秩最高可达 143,而普通卷积核通常低于 3
  • 消融涨点实打实:膝关节 8× 加速下,基线 UNet 为 34.23 dB PSNR,换入 FCB 升至 35.22 dB;UNet、E2EVar、MoDL、VSNet 四种架构全部显著涨点,F-E2EVar 提升最大(+1.73 dB)
  • 又快又准:F-MoDL PSNR 37.15 dB,前向 50.1 ms 远低于三个 ViT 模型;F-UNet 耗时 10.09 ms,比 11×11 大核 UNet 更快

适用场景

领域为医学影像 / MRI 重建,原文在 fastMRI 脑部、膝关节数据上验证了 8×、12× 加速及径向采样场景;可迁移到去噪、超分等复原任务及需要大感受野的 2D CNN。

插入位置建议

  • 替换深度可分离卷积中的逐通道卷积,保留 1×1 逐点卷积与恒等捷径
  • 优先放网络靠后的层:F-UNet 替换最后 6 层,F-MoDL、F-VSNet 替换第 3、4 层
  • 配合两阶段重参数化:先用 3×3 循环 padding 卷积训练至收敛,再零填充 DFT 成频域核微调

适用任务

  • 医学影像
  • MRI 重建
  • 原文在 fastMRI 脑部

完整代码

fcb.py
import torch
import torch.nn as nn
import numpy as np
from numpy.random import RandomState


def complexinit(weights_real, weights_imag, criterion):
    output_chs, input_chs, num_rows, num_cols = weights_real.shape
    fan_in = input_chs
    fan_out = output_chs
    if criterion == 'glorot':
        s = 1. / np.sqrt(fan_in + fan_out) / 4.
    elif criterion == 'he':
        s = 1. / np.sqrt(fan_in) / 4.
    else:
        raise ValueError('Invalid criterion: ' + criterion)

    rng = RandomState()
    kernel_shape = weights_real.shape
    modulus = rng.rayleigh(scale=s, size=kernel_shape)
    phase = rng.uniform(low=-np.pi, high=np.pi, size=kernel_shape)
    weight_real = modulus * np.cos(phase)
    weight_imag = modulus * np.sin(phase)
    weights_real.data = torch.Tensor(weight_real)
    weights_imag.data = torch.Tensor(weight_imag)


class FCB(nn.Module):
    def __init__(self, input_chs: int, output_chs: int, num_rows: int, num_cols: int, stride=1, init='he'):
        super(FCB, self).__init__()
        self.weights_real = nn.Parameter(torch.Tensor(1, input_chs, num_rows, int(num_cols // 2 + 1)))
        self.weights_imag = nn.Parameter(torch.Tensor(1, input_chs, num_rows, int(num_cols // 2 + 1)))
        complexinit(self.weights_real, self.weights_imag, init)
        self.size = (num_rows, num_cols)
        self.stride = stride

    def forward(self, x):
        x = torch.fft.rfftn(x, dim=(-2, -1), norm=None)
        x_real, x_imag = x.real, x.imag
        y_real = torch.mul(x_real, self.weights_real) - torch.mul(x_imag, self.weights_imag)
        y_imag = torch.mul(x_real, self.weights_imag) + torch.mul(x_imag, self.weights_real)
        x = torch.fft.irfftn(torch.complex(y_real, y_imag), s=self.size, dim=(-2, -1), norm=None)
        if self.stride == 2:
            x = x[..., ::2, ::2]
        return x

    def loadweight(self, ilayer):
        weight = ilayer.weight.detach().clone()
        fft_shape = self.weights_real.shape[-2]
        weight = torch.flip(weight, [-2, -1])
        pad = torch.nn.ConstantPad2d(padding=(0, fft_shape - weight.shape[-1], 0, fft_shape - weight.shape[-2]),
                                     value=0)
        weight = pad(weight)
        weight = torch.roll(weight, (-1, -1), dims=(-2, - 1))
        weight_kc = torch.fft.fftn(weight, dim=(-2, -1), norm=None).transpose(0, 1)
        weight_kc = weight_kc[..., :weight_kc.shape[-1] // 2 + 1]
        self.weights_real.data = weight_kc.real
        self.weights_imag.data = weight_kc.imag


if __name__ == '__main__':
    input_channels = 3
    output_channels = 3

    block = FCB(input_channels, output_channels, 256, 256).to('cuda')

    input_tensor = torch.rand(1, input_channels, 256, 256).to('cuda')

    output_tensor = block(input_tensor)

    print(f"输入尺寸: {input_tensor.size()}")
    print(f"输出尺寸: {output_tensor.size()}")

环境与依赖

Python 3.9+

继续浏览

下一篇FCENet FDSM/FEFM 频率动态选择与增强频域动态选频:依据频率相关性先验,用动态滤波在频域分别筛选两路特征,RGB 留低频颜色、NIR 留中高频纹理

相关资源