《An attempt at beating the 3D U-Net》 2019

U-Net在肾和肾肿瘤分割挑战中的应用与改进
本文介绍了将3D U-Net应用于2019年肾和肾肿瘤分割挑战,并通过添加残差和预激活残差块进行增强。尽管交叉验证结果显示改进微小,但基于略高的Dice分数,选择残差3D U-Net进行测试集预测。最终,我们的方法在测试集上以91.23的Composite Dice分数超过了105个竞争对手,赢得了KiTS2019挑战赛。

一、Abstract

The U-Net is arguably the most successful segmentation architecture in the medical domain. Here we apply a 3D U-Net to the 2019 Kidney and Kidney Tumor Segmentation Challenge and attempt to improve upon it by augmenting it with residual and pre-activation residual blocks. Cross-validation results on the training cases suggest only very minor, barely measurable improvements. Due to marginally higher dice scores, the residual 3D U-Net is chosen for test set prediction. With a Composite Dice score of 91.23 on the test set, our method outperformed all 105 competing teams and won the KiTS2019 challenge by a small margin.

二、Method

Based on the success of the U-Net architecture, we develop and train three different U-Net inspired architectures: a 3D ’plain’ U-Net (no residual/dense connections), a residual [4] 3D U-Net and a pre-activation [5] residual 3D UNet.

As stated previously, we employ three 3D U-Net architectures for our experiments. All U-Nets use 3D convolutions, ReLU/LReLU nonlinearities and instance normalization. Upsampling is done via transposed convolution and downsampling is done with strided convolutions. All networks start with some number of feature maps at the highest resolution. This number is is doubled with each downsampling operation(up to a maximum of 320 feature maps) in the encoder and halved with each transposed convolution in the decoder. We always downsample by a factor of 2. Downsampling is done until further downsampling would result in a spatial feature map size < 4.

Plain 3D U-Net For both the encoder and decoder we use two conv-instnorm LReLU blocks between poolings/upsamplings. This architecture uses 30 feature maps at the highest resolution.

Residual 3D U-Net This architecture uses residual blocks in the encoder as opposed to a simple sequence of convolutions. The residual blocks are implemented similar to [4]: conv-instnorm-ReLU-conv-instnorm-ReLU(where the addition of the residual takes place before the last ReLU activation). We start with just one residual block at the highest resolution and increase the number of residual blocks after each downsampling operation. The decoder uses only one conv-instnorm-ReLU per resolution. To accommodate the larger memory footprint of residual networks, we reduce the initial number of feature maps from 30 to 24.

Pre-activation residual 3D U-Net Inspired by [5] we also use a variant of the residual 3D U-Net that uses pre-activation residual blocks: instnorm-ReLU-conv-instnorm-ReLU-conv.

All networks are trained with stochastic gradient descent and a batch size of 2. We found that a patch size of 80 × 160 × 160 yields sufficient contextual information while retaining necessary fine grained image information. We define an epoch as iteration over 250 batches and train for a total of 1000 epochs. The sum of cross-entropy and dice loss is used as training objective and we use supervision at different resolutions to encourage gradient flows deeper into the network. The training of a single network utilizes 12 GB of VRAM and runs for about 5 days. Training was done on Nvidia Titan Xp GPUs (single GPU training). All networks were implemented with the PyTorch framework [12] (version 1.1). We base our implementation on nnU-Net3 [7].

Dice scores for kidney were computed by treating both the actual kidney label as well as the tumor label as foreground and everything else as background. This constitutes the same setup that is used in the challenge evaluation. The dice computation of the tumors is done simply on the tumor labels. No other metrics are considered as the challenge is evaluated on the geometric mean of kidney and tumor dice.

三、References

  • 2、《3d u-net: learning dense volumetric segmentation from sparse
    annotation》2016
  • 4、《Deep residual learning for image recognition 》2016
  • 11、《Fully convolutional neural networks for volumetric medical
    image segmentation》2016

四、Code

(1)readme.md

In 3D biomedical image segmentation, dataset properties like imaging modality, image sizes, voxel spacings, class ratios etc vary drastically. For example, images in the Liver and Liver Tumor Segmentation Challenge dataset are computed tomography (CT) scans, about 512x512x512 voxels large, have isotropic voxel spacings and their intensity values are quantitative (Hounsfield Units). The Automated Cardiac Diagnosis Challenge dataset on the other hand shows cardiac structures in cine MRI with a typical image shape of 10x320x320 voxels, highly anisotropic voxel spacings and qualitative intensity values. In addition, the ACDC dataset suffers from slice misalignments and a heterogeneity of out-of-plane spacings which can cause severe interpolation artifacts if not handled properly.

In current research practice, segmentation pipelinesare designed manually and with one specific dataset in mind. Hereby, many pipeline settingsdepend directly or indirectly on the properties of the dataset and display a complex co-dependence: image size, for example, affects the patch size, which in turn affects the required receptive field of the network, a factor that itself influences several other hyperparameters in the pipeline. As a result, pipelines that were developed on one (type of) dataset are inherently incomaptible with other datasets in the domain.

nnU-Net is the first segmentation method that is designed to deal with the dataset diversity found in the domain. It condenses and automates the keys decisions for designing a successful segmentation pipeline for any given dataset.

问题与思考:
1、segmentation pipelines是什么意思?
2、pipeline settings是什么意思?
3、patch size是什么意思?

nnU-Net makes the following contributions to the field:
1、Standardized baseline: nnU-Net is the first standardized deep learning benchmark in biomedical segmentation. Without manual effort, researchers can compare their algorithms against nnU-Net on an arbitrary number of datasets to provide meaningful evidence for proposed improvements.
2、Out-of-the-box segmentation method: nnU-Net is the first plug-and-play tool for state-of-the-art biomedical segmentation. Inexperienced users can use nnU-Net out of the box for their custom 3D segmentation problem without need for manual intervention.
3、Framework: nnU-Net is a framework for fast and effective development of segmentation methods. Due to its modular structure, new architectures and methods can easily be integrated into nnU-Net. Researchers can then benefit from its generic nature to roll out and evaluate their modifications on an arbitrary number of datasets in a standardized environment.

在使用仿真器烧写固件时,若遇到 JTAG IR(指令寄存器)和 DR(数据寄存器)扫描路径无法循环比特(scan path may be broken, stuck-at-ones 或 stuck-at-zero fault)的问题,可能的原因和解决方案如下: ### 可能原因 1. **硬件连接问题** - JTAG 接口的物理连接不良可能导致 IR 或 DR 扫描路径异常。例如,连接线松动、引脚接触不良或信号干扰等问题都可能影响扫描路径的完整性[^1]。 - JTAG 接口的电压不匹配也可能导致扫描路径失败。例如,目标设备与仿真器之间的电压差异可能引起信号不稳定。 2. **目标设备电源或复位问题** - 如果目标设备的电源供电不稳定,或者设备未正确复位,JTAG 接口可能无法正常工作。这会导致 IR 或 DR 扫描路径无法正确识别或循环比特。 3. **目标设备 JTAG 接口损坏** - 如果目标设备的 JTAG 接口硬件损坏(例如,引脚短路或内部电路故障),可能会导致 IR 或 DR 扫描路径无法正常运行。 4. **仿真器配置问题** - 仿真器的配置错误可能导致 JTAG 扫描路径失败。例如,仿真器可能未正确识别目标设备的 JTAG 链配置,或者仿真器固件版本不兼容目标设备。 5. **软件或固件问题** - 烧写工具或仿真器的驱动程序可能存在兼容性问题,导致 JTAG 扫描路径无法正常工作。此外,目标设备的固件可能包含错误的 JTAG 配置,导致扫描路径失败。 ### 解决方案 1. **检查 JTAG 接口的物理连接** - 确保 JTAG 接口的所有引脚(包括 TCK、TMS、TDI、TDO 和 TRST)连接正确且无松动。可以使用万用表或示波器检查信号完整性。 - 确保 JTAG 接口的电压匹配。例如,如果目标设备的 JTAG 接口电压为 3.3V,而仿真器输出为 5V,则需要使用电平转换器。 2. **检查目标设备的电源和复位状态** - 确保目标设备的电源供电稳定,且电压符合规格要求。使用稳压电源或万用表检查电源电压。 - 确保目标设备正确复位。可以通过手动复位按钮或软件复位功能测试设备是否能够正常启动。 3. **测试目标设备的 JTAG 接口** - 使用 JTAG 测试工具(如 JTAG 接口测试软件或硬件)检查目标设备的 JTAG 接口是否正常工作。例如,通过扫描 IR 和 DR 寄存器测试接口的完整性。 - 如果怀疑 JTAG 接口损坏,可以尝试更换目标设备进行测试。 4. **更新仿真器配置和固件** - 检查仿真器的配置文件是否与目标设备的 JTAG 链配置匹配。例如,确保仿真器正确识别目标设备的 IDCODE。 - 更新仿真器的固件和驱动程序到最新版本,以确保兼容性和稳定性。 5. **检查烧写工具和固件配置** - 使用不同的烧写工具或仿真器测试 JTAG 扫描路径是否正常工作。例如,尝试使用其他厂商提供的工具测试目标设备。 - 检查目标设备的固件配置,确保 JTAG 接口未被禁用或配置错误。 6. **调试与日志分析** - 启用烧写工具的调试模式,查看详细的日志信息,以定位 JTAG 扫描路径失败的具体原因。 - 通过示波器或逻辑分析仪捕获 JTAG 信号,分析信号波形是否正常。 ### 示例代码:JTAG IR/DR 扫描测试 以下是一个简单的 JTAG IR 和 DR 扫描测试的伪代码示例,用于验证 JTAG 接口的基本功能: ```c // 初始化 JTAG 接口 void jtag_init() { // 配置 JTAG 引脚为输出/输入模式 configure_jtag_pins(); } // 扫描 IR 寄存器 void jtag_scan_ir(uint32_t *ir_value) { // 进入 Shift-IR 状态 jtag_tms_sequence(0x01, 4); // 发送 TMS 信号进入 Shift-IR 状态 // 写入 IR 值并读取返回值 *ir_value = shift_jtag_bits(*ir_value, 32); // 假设 IR 寄存器长度为 32 位 } // 扫描 DR 寄存器 void jtag_scan_dr(uint32_t *dr_value) { // 进入 Shift-DR 状态 jtag_tms_sequence(0x03, 4); // 发送 TMS 信号进入 Shift-DR 状态 // 写入 DR 值并读取返回值 *dr_value = shift_jtag_bits(*dr_value, 32); // 假设 DR 寄存器长度为 32 位 } // 主函数测试 JTAG 扫描 int main() { uint32_t ir_value = 0x12345678; uint32_t dr_value = 0x87654321; jtag_init(); jtag_scan_ir(&ir_value); jtag_scan_dr(&dr_value); // 打印扫描结果 printf("IR Value: 0x%08X\n", ir_value); printf("DR Value: 0x%08X\n", dr_value); return 0; } ``` ###
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值