首页 > 其他分享 >Bracketing Image Restoration and Enhancement with High-Low Frequency Decomposition-高频分解

Bracketing Image Restoration and Enhancement with High-Low Frequency Decomposition-高频分解

时间:2024-11-12 10:20:16浏览次数:1  
标签:channels nn Image High Restoration x2 x1 self size

paper
通过密集连接的小卷积核实现细节特征(高频特征提取)提取

import torch.nn as nn
class Dense(nn.Module):
    def __init__(self, in_channels):
        super(Dense, self).__init__()

        # self.norm = nn.LayerNorm([in_channels, 128, 128])  # Assuming input size is [224, 224]
        self.conv1 = nn.Conv2d(in_channels, in_channels, kernel_size=3, padding=1,stride=1)
        self.conv2 = nn.Conv2d(in_channels, in_channels, kernel_size=3, padding=1,stride=1)
        self.conv3 = nn.Conv2d(in_channels, in_channels, kernel_size=3, padding=1,stride=1)
        self.conv4 = nn.Conv2d(in_channels, in_channels, kernel_size=3, padding=1,stride=1)
        self.conv5 = nn.Conv2d(in_channels, in_channels, kernel_size=3, padding=1,stride=1)
        self.conv6 = nn.Conv2d(in_channels, in_channels, kernel_size=3, padding=1, stride=1)

        self.gelu = nn.GELU()

    def forward(self, x):

        x1 = self.conv1(x)
        x1 = self.gelu(x1+x)

        x2 = self.conv2(x1)
        x2 = self.gelu(x2+x1+x)

        x3 = self.conv3(x2)
        x3 = self.gelu(x3+x2+x1+x)

        x4 = self.conv4(x3)
        x4 = self.gelu(x4+x3+x2+x1+x)

        x5 = self.conv5(x4)
        x5 = self.gelu(x5+x4+x3+x2+x1+x)

        x6= self.conv6(x5)
        x6 = self.gelu(x6+x5+x4+x3+x2+x1+x)

        return x6

标签:channels,nn,Image,High,Restoration,x2,x1,self,size
From: https://www.cnblogs.com/plumIce/p/18541269

相关文章

  • 【PIL】Torch.tensor和PIL.Image之间互相转换
    A.格式转换过程fromPILimportImageimportnumpyasnpimportmatplotlib.pyplotaspltimporttorchfromtorchvisionimporttransformsimg=Image.open("test.png")#查看shapeprint(np.array(img).shape)#得到(936,1809,4),如果要转化成神经网络可读的......
  • OpenAI 再发 Sora 新短片,传 Sora 两周内推出;李飞飞团队出品空间智能版 ImageNet丨 RTE
       开发者朋友们大家好: 这里是「RTE开发者日报」,每天和大家一起看新闻、聊八卦。我们的社区编辑团队会整理分享RTE(Real-TimeEngagement)领域内「有话题的新闻」、「有态度的观点」、「有意思的数据」、「有思考的文章」、「有看点的会议」,但内容仅代表编......
  • 《Consensus-Aware Visual-Semantic Embedding for Image-Text Matching》中文校对版
    文章汉化系列目录文章目录文章汉化系列目录摘要关键词引言2相关工作2.1基于知识的深度学习2.2图文匹配3共识感知的视觉-语义嵌入3.1利用共识知识增强概念表示3.2共识感知表示学习3.3训练和推理4实验4.1数据集和设置4.2实现细节4.3与最新技术的比较4.4消......
  • 图像处理实验二(Image Understanding and Basic Processing)
            ......
  • freeway和highway的区别(highway到底是什么?)
    freeway对应于中文的"高速公路"的概念。路上没有信号灯,限速100公里以上。只不过freeway通常不收费。highway是中国不存在的事物,所以其实是没法翻译的。但是我们一般翻译成"公路"。Highway含义非常多,但总的来说就是一条地位更高、设施更好的路。英语世界通常使用street指代普通的......
  • 内存管理-41-highatomic预留内存
    基于msm-5.4一、相关结构体1.structzonestructzone{unsignedlongnr_reserved_highatomic;...};成员介绍:nr_reserved_highatomic:记录为高优先级原子分配预留的内存页面数量。二、赋值逻辑赋值路径只有两个,一个是对高阶原子分配进行页面预留,另一个是减......
  • EMCAD: Efficient Multi-scale Convolutional Attention Decoding for Medical Image
    论文代码`importtorchimporttorch.nnasnnfromfunctoolsimportpartialfromtorch.nn.initimporttrunc_normal_importmathfromtimm.models.helpersimportnamed_applydefact_layer(act,inplace=False,neg_slope=0.2,n_prelu=1):#activationlayeract=......
  • CMPT 401 Create Image From
    CMPT401–Assignment1(DueOct11th23:59)InstructionsYouaregoingtosubmitAssignment1.cpp,Solution1.pngandSolution2.png.FilloutthefunctionsCreateImageFromTextFile()andDiamondFilter()inAssignment1.cpp.UseCreateImageFromTextFile()......
  • Neural Networks for Image  Classification Duration
    Lab2:NeuralNetworksforImage ClassificationDuration:2hoursTools:JupyterNotebookIDE:PyCharm==2024.2.3(oranyIDEofyourchoice)Python:3.12Libraries:oPyTorch==2.4.0oTorchVision==0.19.0oMatplotlib==3.9.2LearningObjectives:Unders......
  • 《DNK210使用指南 -CanMV版 V1.0》第三十六章 image图像色块追踪实验
    第三十六章image图像色块追踪实验1)实验平台:正点原子DNK210开发板2)章节摘自【正点原子】DNK210使用指南-CanMV版V1.03)购买链接:https://detail.tmall.com/item.htm?&id=7828013987504)全套实验源码+手册+视频下载地址:http://www.openedv.com/docs/boards/k210/ATK-DNK210.htm......