# ModulesContainer **Repository Path**: jiabanxianer/ModulesContainer ## Basic Information - **Project Name**: ModulesContainer - **Description**: 用于收集深度学习模型中的各种模块 - **Primary Language**: Python - **License**: MulanPSL-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2023-07-31 - **Last Updated**: 2023-08-29 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 深度学习模块容器 用于收集各种优秀的深度学习模块。 收集模块时应写明以下内容: - 模块出处(Paper, Github); - 功能描述; - 用法描述(参数、返回值)按照Docstring by Google格式书写; - 贡献者。 容器中已经包含了以下模块: - [1. NoisePrint++](#1-noiseprint) - [2. SRM](#2-srm) - [3. BayarConv2d](#3-bayarconv2d) - [4. MixBlock](#4-mixblock) - [5. Cbam](#5-cbam) - [6. DCbam](#6-dcbam) - [7. DCANet](#7-dcanet) - [8. Pytorch DCT](#8-pytorch-dct) ## 0. Template **Paper Title** [Paper](paper_url) [GitHub](github_url) [Code](code_url) Description. ![img](./assert/Template.png) Description 贡献者:A ## 1. NoisePrint++ **TruFor: Leveraging all-round clues for trustworthy image forgery detection and localization** [Paper](https://arxiv.org/abs/2212.10957) [GitHub](https://github.com/grip-unina/TruFor) [Code](./container/NoisePrintPP.py) 噪声提取模块,利用图像生成时由设备产生的独特噪声实现图像篡改检测,通过自监督的方式训练,该模块可以提取一张图像的噪声分布,并凸显不同源区域图像噪声分布。 ![NoisePrint++](./assert/NoisePrint++.png) 预训练模型参数下载: 链接: https://pan.baidu.com/s/1dscxwnFBq1oQFCGg1jz3Xg 提取码: a8v6 贡献者: Hao.Jia ## 2. SRM **Rich Models for Steganalysis ofDigital Images** [Paper](https://ieeexplore.ieee.org/document/6197267) GitHub [Code](./container/SRM.py) 噪声提取模块,利用手工设置的卷积核来提取图像的噪声。 ![SRM](./assert/SRM.png) 贡献者: Hao.Jia ## 3. BayarConv2d **Constrained convolutional neural networks: A new approach towards general purpose image manipulation detection** [Paper](https://ieeexplore.ieee.org/document/8335799) [GitHub](https://github.com/grasses/Constrained-CNN) [Code](./container/BayarConv2d.py) 噪声提取模块,通过多层卷积来提取图像的噪声。 贡献者:Hao.Jia ## 4. MixBlock **Thinking in Frequency: Face Forgery Detection by Mining Frequency-aware Clues(F3-Net)** [Paper](https://arxiv.org/abs/2007.09355) [GitHub](https://github.com/yyk-wew/F3Net/tree/main) [Code](./container/MixBlock.py) 交叉注意模块,用于双流信息的逐步融合与交互。首先利用两个分支的特征映射计算交叉注意权值。采用交叉注意矩阵将注意特征从一个流扩展到另一个流。 ![MixBlock](./assert/MixBlock.png) 贡献者:Hao.Jia ## 5. Cbam **CBAM: Convolutional Block Attention Module** [Paper](https://arxiv.org/abs/1807.06521) [GitHub](https://github.com/Jongchan/attention-module/tree/master) [Code](./container/Cbam.py) 卷积神经网络注意力模块,包含不同通道之间的通道注意力模块与同一通道上的空间注意力模块。 ![Cbam1](./assert/Cbam1.png) ![Cbam2](./assert/Cbam2.png) 贡献者:Hao.Jia ## 6. DCbam **Learning Second Order Local Anomaly for General Face Forgery Detection** [Paper](https://arxiv.org/abs/2209.15490) GitHub [Code](./container/DCbam.py) 双流通道注意力模块,Cbam基础上实现,用于融合双流上的信息。 ![DCbam](./assert/DCbam.png) 贡献者:Hao.Jia ## 7. DCANet **Dual Channel Attention Networks** [Paper](https://iopscience.iop.org/article/10.1088/1742-6596/1642/1/012004/pdf) GitHub [Code](./container/DCANet.py) 通道注意力模块。 ![dcanet1](./assert/dcanet1.png) ![dcanet2](./assert/dcanet2.png) ![dcanet3](./assert/dcanet3.png) 贡献者:Hao.Jia ## 8. Pytorch DCT **Discrete cosine transform** [Wikipedia](https://en.wikipedia.org/wiki/Discrete_cosine_transform) [GitHub](https://github.com/yyk-wew/F3Net/tree/main) [Code](./container/DCTutils.py) DCT,iDCT和patch_DCT变换的pytorch实现。 ![img](./assert/DCT.png) 贡献者:Hao.Jia ## 9. Self-Enhancement **Exploiting Fine-grained Face Forgery Clues via Progressive Enhancement Learning, AAAI 2022** [Paper](https://arxiv.org/pdf/2112.13977.pdf) GitHub [Code](./container/SelfEnhancement.py) 自增强模块,由一个噪声增强模块和一个通道注意力构成,常用于图像篡改检测任务中,因为噪声作为图像自身的属性可用于判断图像是否经过篡改。 ![img.png](./assert/SelfEnhancement.png) Noise: $$ f^{s}\_{noi}=f^{s}\_{in}-M\left( f^{s}\_{in}\right) $$ Noise Enhancement: $$ f^{s}\_{ne}=f^{s}\_{in}+Conv\left(\sigma\left(f^{s}\_{noi}\right)\right). $$ Channel Attention: $$ f^{s}\_{out}=f^{s}\_{ne}+f^{s}\_{ne}\otimes\sigma\left(MLP\left(GAP\left(f^{s}\_{ne}\right)+GMP\left(f^{s}\_{ne}\right)\right)\right) $$ 贡献者:Hao.Jia