原始 MediaWiki 页面

我知道编辑这个网站吗?

N2V

自迁移出 MediaWiki 以来,本页内容尚未经过审查。如果您愿意帮忙,请查看帮助指南

Examples of N2V denoised images. Examples of N2V denoised images.

Noise2Void (N2V) 是一种功能强大、上下文调用且灵活的图像去噪算法。它使用人工神经网络来了解图像的属性以及如何最好地进行唤醒。N2V 唤醒传统的睡眠技术。

本页介绍 N2V 斐济插件。 N2V 斐济插件提供了一种在斐济使用 N2V 的非常简单的方法。您所需要的只是一台配备 NVIDIA 显卡的计算机、斐济安装和嘈杂的图像。

N2V的执行有两个步骤。第一步将训练人工神经网络以消除您所拥有的图像中的噪声。这个训练步骤比较慢,可能需要12小时左右才能得到最好的结果。但不用担心。只需让计算机运行整晚的训练即可。您不需要做任何事情。培训只需进行一次,您将在进行的培训期间看到预览。训练的结果就是一个模型。第二步称为预测。预测步骤将使用经过训练的模型对图像进行去噪。同一个模型可用于任意数量图像的相似图像。每张图像通常不到一秒的时间。因此,一天之内即可轻松实现数千张图像的需要噪点。

有关该算法的详细描述,请参阅论文。

这个斐济插件是 CSBDeep 的一部分。斐济的一套开源神经网络算法。有关更多信息、示例和图像,请单击here

书籍:Noise2Void - 从单个噪声图像中学习去噪

摘要

图像去噪领域目前以判别式深度训练方法为主,这些方法是在噪声输入和干净目标图像对上进行的。最近的研究表明,这种方法也可以在没有干净目标的情况下进行训练。相反,使用独立的噪声图像对,可以这种方法称为Noise2Noise (N2N)。在这里,我们介绍Noise2Void (N2V),这是将想法训练更进一步的训练方案。它不需要噪声图像对,也不需要干净的目标图像。因此,N2V允许我们直接对这种厌恶的数据体进行因此,可以在其他方法无法实现的情况下应用。特别有趣的生物医学数据图像的应用,其中获取干净或有序杂的训练目标通常是不可能的。我们将N2V的性能与具有清晰目标图像和/或噪声图像对的方法进行比较。因此,尽管我们观察到Noise2Void的去噪去性能有所下降,并且与免训练去噪方法相比具有优势。

Full-text

安装

1.启动ImageJ/斐济 2.通过Help > Update...打开更新程序 3.单击Manage update sites 4.选择CSBDeep更新站点 5.单击Apply changes 6.(可选)阅读this page了解GPU支持 7.重启ImageJ/斐济

您现在应该可以访问这些插件:

Available N2V plugins

方便

培训

没有 GPU 支持的训练是可能的,但需要很长时间。请阅读 this page 上的注释,了解如何在 GPU 上运行工具。

在单个图像上进行训练

N2V train parameters N2V train parameters

1.启动ImageJ/斐济 2.打开您选择的有疑点的图像(它应该足够大) 3.(可选)打开另一张噪声图像进行验证(选择训练的表现方式) 4.点击Plugins > CSBDeep > N2V > N2V train并调整以下参数: - Image used for training Choose the image which will be used for training - Image used for validation Choose the image which will be used for training (you can also choose the same for both images, in this case 10% of the tiled image will be used for validation and 90% for training) - Use 3D model instead of 2D Select this checkbox if you want to train on 3D data (this needs much more GPU memory) - Number of epochs How many epochs should be performed during training - Number of steps per epoch How many steps per epoch should be performed - Batch size per step How many tiles are batch processed by the network per training step - Patch shape The length of X, Y (and Z) of one training patch (needs to be a multiple of 16) - Neighborhood radius n2V specific parameter describing the distance of the neighbor pixel replacing the center pixel

  1. 点击Ok
  2. 请参阅下面的第 What happens during and after training 部分,了解接下来会发生什么

###单幅图像的训练和预测(一键解决方案)

N2V train & predict parameters N2V train & predict parameters

1.启动ImageJ/斐济 2.打开您选择的有疑点的图像(它应该足够大) 3.训练后直接打开另一张想要去噪声的噪声图像(这也将用于验证) 4.点击Plugins > CSBDeep > N2V > N2V train & predict并调整以下参数: - Image used for training Choose the image which will be used for training - Image to denoise after training Choose the image which will be used for prediction - Axes of prediction input This parameter helps to figure out how your input data is organized. It’s a string with one letter per dimension of the input image. For 2D images, this should be XY. If your data has another axis which should be batch processed, set this parameter to XYB - Regarding the other parameters please have a look at the descriptions in Training on a single image

  1. 点击Ok
  2. 请参阅下面的第 What happens during and after training 部分,了解接下来会发生什么

多训练图像

N2V train on folder parameters N2V train on folder parameters

1.启动ImageJ/斐济 2.点击Plugins > CSBDeep > N2V > N2V train on folder并调整以下参数: - Folder containing images used for training Choose the folder containing images which should be used for training - Folder containing images used for validation Choose the folder containing images which should be used for validation (can be same as training folder, in this case 10% of the generated tiles will be used for validation and 90% for training) - Regarding the other parameters please have a look at the descriptions in Training on a single image

  1. 点击Ok
  2. 请参阅下面的第 What happens during and after training 部分,了解接下来会发生什么

训练期间和训练之后会发生什么

N2V training progress window N2V training progress window
N2V training preview window N2V training preview window

During training, you will see two windows:

  • 细节窗口让您随时了解培训过程发起的训练步骤。它还不足以实现当前的和验证损失。
  • 预览窗口显示的是从第一个验证批次生成的。它被中断了两部分。左上部分显示原始噪声数据,右下部分显示当前训练状态下的预测。

训练后,应该会出现两个附加窗口。它们代表两个经过训练的模型。一个是来自验证损失最低的纪元的模型,另一个是来自最后一个纪元步骤的模型。对于N2V,几乎总是建议使用上一个纪元的模型。窗口看起来与此类似:

N2V model archive window

其中存储处于临时位置,您可以在模型窗口的概述部分中的Saved to..下看到该位置。 如果您想保留此经过训练的模型,则该模型从那里复制到磁盘上的另一个永久目的地。

预测

有两种方法可以根据经过训练的模型进行预测。

您可以直接打开模型:<div class="thumbnail" > N2V prediction parameters N2V prediction parameters </div>

  1. 出发斐济 2.您打开想要去噪的图像,并且您有一个ZIP文件格式的预训练模型 3.点击Import > bioimage.io.zip并选择训练您的模型。该模型将在如上图的窗口中打开 4.点击模型窗口中的Predict并调整以下参数:
    • Input The image you want to denoise
    • Axes of prediction input This parameter helps to figure out how your input data is organized. It’s a string with one letter per dimension of the input image. For 2D images, this should be XY. If your data has another axis which should be batch processed, set this parameter to XYB 或者,您可以使用N2V菜单:<div class="thumbnail" > N2V prediction from model parameters N2V prediction from model parameters

</div>

  1. 出发斐济 2.您打开想要去噪的图像,并且您有一个ZIP文件格式的预训练模型 3.点击Plugins > N2V > N2V predict并按上述方式调整参数,并添加以下内容:
    • Trained model file The ZIP file containing the pretrained model (it should end with .bioimage.io.zip)

      将训练好的模型从Python导出到ImageJ / Fiji

可以使用Python训练Noise2Void神经网络。所需的代码和说明可以在here中找到。用Python训练的模型也可以在斐济使用:

  1. 在Python中,在训练结束时运行此命令:model.export_TF() 2.找到导出的模型文件 3.按照 Prediction 中的说明进行操作

如何处理斐济N2V第一个早期版本中的宏/脚本/模型

感谢您测试第一个早期发布版本!以下是更改的内容,如果这不能帮助您运行已经训练好的模型或脚本,请在论坛中发表帖子!

更新站点

您需要N2V更新站点,CSBDeep更新站点就足够了。请不再删除N2V更新站点。

宏/脚本

  • predict命令被重命名为N2V predict
  • train命令被重命名为N2V train
  • train + predict命令被重命名为N2V train + predict
  • train on folder命令被重命名为N2V train on folder
  • 有一个新的强制预测参数,称为 axes(请参阅上面的文档)
  • 训练参数batchDimLength永久消失
  • 训练参数patchDimLength被重命名为patchShape
  • 训练输出latestTrainedModelPath更改为latestTrainedModel(现在是可显示的模型对象)
  • 训练输出bestTrainedModelPath更改为bestTrainedModel(现在是可显示的模型对象)

训练好的模型

使用济斐版本的第一个 N2V 训练的模型不能与较新的模型预测命令一起使用。请先使用命令Plugins > CSBDeep > N2V > Upgrade old N2V model升级它们。!注意:测试时,我必须先解压并压缩新模型,然后才能使用它。我会尝试解决这个问题,但如果您在转换后的模型中遇到问题,请再次尝试解压缩并压缩它。